Jump to content

andracass

Veterans
  • Posts

    1827
  • Joined

  • Last visited

  • Days Won

    132

 Content Type 

Profiles

Forums

Events

Reborn Development Blog

Rejuvenation Development Blog

Starlight Divide Devblog

Desolation Dev Blog

Post Comments posted by andracass

  1. 1 hour ago, Mindlack said:

    Just a stupid question: what exactly does the compiler do? Does it gather Pokemon, move, and ability data from .dat/.rxdata files (as I think I understood from your post, which already sounds really not-straightforward)? Does it do something else? 

    basically, the compiler is what takes the PBS and puts it into a data structure that is easier to use/process by the scripts. PBS data is way easier to access/edit than the scripts themselves since you only need a text editor to work with them. the compiler then imports what you wrote in the text files and puts it into an array.

    • Like 1
    • Thanks 1
  2. 1 hour ago, silverlime said:

    It's great to see new ways to improve game speed, and I'm glad you're still giving updates about this. The level thing with saving it as a new variable so it's not called thousands of times seemed pretty simple, so I tried adding it in my copy of essentials, but for some reason, the Pokemon's level doesn't increase when it levels up. I guess there are some other places that have to be updated to account for this variable as well?

    there are! it's also tossed into the initialization function for initialization like so:

    image.png

  3. 9 hours ago, Marcello said:

    I appreciate this post, both for detailing all your hard work

     

    And also because you politely did not point out how much of the deeply inefficient code you optimised was written by me oops

     

    ❤️

    i meeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeean.............................................................................................................................................

    • Like 1
  4. Just now, Gengar768 said:

    .....wooooow i wouldnt even have the patience to do a little of that script😂

     

    also...Ice face?? isnt that like a gen 8 abillity?

    Quote

    you've seen my scripts. gen 8 is already there. we helped out with rejuv on developing it.

    it's okay i don't have the patience to read my posts either

    i never wanna see this shit again

    who does this bitch think she is

    • Like 3
  5. 13 hours ago, SpenceMcFence said:

    when is the 52% gonna change to 53%, you've been optimizing this shit all year thats gotta be at least 1%

     

    technically we, uh, don't really count this since it wasn't planned 😕

  6. o my. hello there.

    I'll put on my serious face for this.

    Before getting into the more active quote/explanation back-and-forth that usually emerges from this, I want to clarify two things that seem to generally apply to a lot of your comments: first, that there's a lot of stuff I've worked on that is very much reborn-specific and I fully realize that it won't apply for a starter-kit meant to apply for all fan games; second, we're also running on an older version of essentials, and I'll clarify whether what I've worked on is in the newer version or not. Regardless, none of this is meant to be a personal attack on you or anyone else involved in the development of the engine itself- if this eases some of the hostility at all.

    Anyway, into the nitty-gritty.

    59 minutes ago, M3rein said:

    Essentials supports 4 hidden abilities, which is why it loads four individual abilities.

    Essentials is built around the whole "dexdata" approach. species/abilities/forms and all that are loaded by opening the relevant data file, reading from the relevant section at the desired offset. This is an archaic data structure, but removing three string read points isn't going to make a difference. A real difference would be switching to a Hash-based data structure, like how item data is stored ($ItemData). This would actually have a noticeable impact on performance, unlike what is suggested here.

    This is going to require some additional clarification.

    After some later probing at the system, it appears that this was not the primary source of the issues I was seeing. The real issue was PBMoveData.new. I'll consider your comments towards dexdata to be effectively the same as what you may say towards this, as the two functions work very similarly.

    You may say that cutting the number of abilities read by 3 is insignificant. In many cases, I would agree. Inefficiencies of that sort are so minor as to not be worth fixing. However, my assumption going into this fix was that this function was called a lot. Our data showed that we had 5250 calls to hasWorkingAbility and I had (wrongly) assumed that every call corresponded with a call to the ability function. Had that been the case, the decrease in CPU load caused by this would've been substantially greater.

    The real culprit, PBMoveData.new, instead does... 11 string reads? each time it's called. And it ends up taking a significant amount of times to process this. Changing this function lead to a noticeable speedup during AI processing.

    1 hour ago, M3rein said:

    I also can't help but comment on your older optimization claims. The idea that "something*2/4" versus "something/2" makes any difference or what-so-ever, is ridiculous.

    So, sure, if the function was called once, I'd agree. And, in general, fixing some minor math functions is not the focus of what our optimizations have been about.

    I mentioned them because I find them irritating.

    It really puts the cherry on top of the "why is this here" feeling that I often have while working in the code. It certainly doesn't help that there's a noticeable lack of comments.

    I also can't help but notice there's more of this in 17.2's in_range function.

    1 hour ago, M3rein said:

    This would take one processor cycle, of which there are roughly 3,000,000,000 on modern computers. Even if it did run some 76000 times per second as per your claim, that would use 0.0025% of your processor's capacity in one single second. And then you claim that it makes an impact.

    But this isn't quite how interpretive languages work. Nor is it quite how CPUs work. Pure machine code instruction for multiplication can take 1-4 cycles depending on number size. Division takes at least 10. This is further complicated depending on how exactly Ruby decides to send the instructions in the first place (which, considering we run 1.8, is likely not done very well). This is a bit more of a technical gripe, but the point I'm trying to make is that this isn't quite as clear-cut as you may want it to be.

    1 hour ago, M3rein said:

    You also talk about using constants for tile width/height and subpixel calculations, and ridicule Essentials for it. I think you've forgotten that Pokémon Essentials is a kit that was built to suit everyone's needs, and those may including variable tile width and height. As such, this needs to be reflected in the math. Perhaps Reborn, or most other fangames don't use this, but that doesn't make it Essentials' fault for including it.

    In our version, this was set as a specific number and never changed (aside from a random dungeon generator that, I believe, doesn't work), which thus incurred the same ire as normal excessive multiplication.

    1 hour ago, M3rein said:

    Then how in the world can you use said profiler to measure performance increases? After all, addition, subtraction, muliplication and division and all other mathematical operator all call functions too. As for the profiler, does it take into account averages, or do you just run it 10 times and pick the biggest speed difference to advertise your "improvements"? Based on some of the percentual increases you've shared, I wouldn't say you're using a particular reliable profiling method at all. Note that the context of quote was for event reflections, which was a good improvement.

    So, I say this about the profiler a lot, but it's probably worth repeating again since I'm sure a lot of this was specifically on the dev server:
    It's bad.

    It was designed for RMVXA which has a much faster version of ruby. It adds a shitload of overhead to every function, and the ms/call readouts that it produces need to be taken with a grain of salt.

    That said, some of this seems... mildly insulting?

    Quote

    do you just run it 10 times and pick the biggest speed difference to advertise your "improvements"?

    No? That would be dishonest?

    I'm not here to flex on essentials or some bullshit. I'm here because people regularly complain about the performance. It has been a thorn in my side for a very long time. Lying about improvements does no one any good. If you'd like to see some actual evidence of improvements, I have a lot of it. Perhaps it would be worth making a devblog post to better document this.

    Quote

    If you want to tackle real performance issues, 

    I feel like this highlights a pretty fundamental difference between how you and I view this problem. You're here for the engine, I'm here for the game. If these performance issues are fake, as you imply, then why am I seeing improvements?

    1 hour ago, M3rein said:

    But from what I've seen, you prefer memeing over programming.

    Yikes.

    Uh.

    Okay.

    So.

    Firstly, as, well, self defense, this is a devblog post for the game, not the engine. I write with a very informal style that people seem to find entertaining. The optimizations I've discussed are not exhaustive, they do not represent everything I've worked on, they are specifically chosen because of the blend of information/enjoyment value I feel they offer the reader. If you read the optimization posts and think there's a lot of memes in there....that's the point. If you think that is all I do, then, well, that's insulting. 

    2 hours ago, M3rein said:

    You're claiming that Pokémon Essentials is the offender in most cases here. However, what you've shared is largely to be attributed to your ancient version of Essentials, or to things that are highly specific to Reborn. And that's not even to mention all the factual inaccuracies and exaggerations. Yes, Pokémon Essentials runs poorly, and yes, it needs improvements. But what you're doing is oftentimes wrongfully alienating Pokémon Essentials to your playerbase, and giving other fangame developers the impression that these changes are meaningful. I have read some decent improvements, like assuming a sprite does not warrant a reflection, as opposed to assuming it does. Or checking less input keys (although, if this is only called once during Input.update, you're going to have a hard time convincing me that it made any difference at all).

    I... look, I don't want to break this down here, because overall it seems like this is just a knee-jerk reaction to a series of posts that disparage essentials. And, like, I understand that.

    But I feel like there's a disconnect here between what you're talking about and what's really happening.

    I'll put my money where my mouth is. 

    I implemented three changes into Desolation: the needs_update variable for events; the updated in-range? function; and the new controls checker.

    unknown.png

    50% improvement in FPS on the overworld.

    If you still doubt me, I can personally show you what I did as I did it. We can use vanilla scripts and everything.

    But I also really don't think that it's worth fighting this out.

    I'd like to call a truce on this and, perhaps, work on making the next release of essentials more efficient.

    We can backport some other improvements to our version and push some improvements to yours.

    • Like 4
    • Thanks 1
  7. 24 minutes ago, Venonaut97 said:

    Am I the only one that remembers that there are Pokemon with 4 abilities? Both Rockruff and Chandelure have 4 abilities. How will they work with these changes? Can I never get dusk Lycanroc anymore?

    so

    chandelure does not have 4 abilities

    and rockruff doesn't get own tempo in reborn in the first place

    so neither of these things are affected

  8. 1 hour ago, Acetic said:

    These optimization posts are always super interesting to me as an aspiring computer scientist. Love it!

     

    Is it possible to (somewhat easily) apply some of these Essentials engine changes to other fangames? Pokemon Insurgence, for example, would likely benefit greatly from the work you've done here.

    sometimes, yes! i passed off a few of our less dangerous improvements to deso. the need_update code from from the prior post is a good example of something that's reasonably safe. other times the optimizations are pretty reborn-specific and targets features that we don't use.

    i'm generally fine with passing stuff around if they end up being interested in it.

    • Thanks 2
  9. 58 minutes ago, Firecage said:

    Could similar reasons be why so, so many pokemon fangames tends  to either 'lag' when they really shouldn't, or 'lag' at rather unexpected areas?

    yup.

    everyone uses the same engine, which means it has the same flaws.

    unfortunately, there isn't really a great way to just take what we've done and move it into a different game since a number of optimizations are reborn specific.

  10. 9 minutes ago, Aeodyn said:

    Jeeze, nice work. I'd like to think that those math things come from someone being used to compiled programming where that is optimized-out... but considering how messed up other stuff in Essentials is, I'm not optimistic. 😅

    big same.

    hear that there have been updates to some of this.

    but after hearing about past incidents where the reborn team (before my time) tried to implement new versions

    (and considering what i've seen)

    i am not optimistic here

  11. 15 minutes ago, Mindlack said:

    Am the only one who's interested to see what the code looked like before your fixes (in the section "are you sure you're in range")?

     

    What do you call a "deep bush"? Aren't there some on Route 1?

    well, if you have an old version of the game (or really any version of essentials) you can probably find something.

     

    and yes, those are the deep bushes. that just happens to be what they're called in the code.

×
×
  • Create New...