Jump to content

andracass

Administrators
  • Content Count

    1573
  • Joined

  • Last visited

  • Days Won

    32

 Content Type 

Profiles

Forums

Calendar

Pokemon Reborn Development Blog

Pokemon Rejuvenation Development Blog

Post Comments posted by andracass

  1. 5 hours ago, M3rein said:

    But I disagree with the way you criticized it in these recent optimization posts.

    you could have at least apologized, but maybe that's asking too much....

  2. 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 3
    • Thanks 1
  3. 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

  4. 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
  5. 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.

  6. 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

  7. 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.

  8. 1 minute ago, Joboshy said:

    Oh so game-z was like a little beta of what ep19 would have? also does that mean we won't have game-z in the ep19 update?

    game-z is an entirely different engine, but they both run off the same set of scripts. both game and game-z are included to make sure that everyone can play the game (some computers can't run game-z) so they'll both still be in e19.

  9. 30 minutes ago, Joboshy said:

    Not gonna lie with all this optimizations it's kind of hard to play the normal game.exe as Game-z.exe is just too good to pass up

    so you're not wrong about game-z, but the good news about this is that game.exe should also be a lot faster!

  10. 1 hour ago, KolinKat said:

    I bet you guys could rewrite the entirety of Essentials to be better as it could possibly be or create your own Essentials.

    the original essentials itself had a shitload of bugs in it

    so like

    we're probably already there

    • Like 1
  11. 1 minute ago, RoyChaos said:

    OK but I have other things to do before making decision about downloading E18.4.

    good for you, bud.

  12. 2 minutes ago, RoyChaos said:

    Yeah, I understand. I was just talking about if there has errors that might crash the game during playing the game. Because I never tested this version.

    try it and find out

  13. 2 hours ago, BRS swag said:

    Do i have to patch 18.2, 18.3 and 18.4 or only 18.4? 

    the patch is for 18.3

    1 minute ago, RoyChaos said:

    I don't know if it's a good thing or not. Does this game may have bug in E18.4? That's why I coudn't try to download E18.3.

    i too also indeed quite yes very much do not interpret such actions as either good nor bad but rather simply emergent of the neurological capabilities which that which one might consider "human" may produce. it is significantly beyond the teleological scope of such an insignificant comment such as this for a person of my nature, stature, statue, eminence to report as to the nature of such a condition. in fact one must take great heed to consider the various entomological/etymological methods for defining the word known as "bug" should a person of the human variety desire to produce any sort of coherent answer to such an inquiry as the one you posit before myself

  14. 1 minute ago, Burningocean2012 said:

    Even with the breakdown I only understand like half of all this but it's a great surprise! ❤️

    its ok fam i gotchu

    *ahem

     

    optimization o'clock: abridged version

    SEE THIS SHIT

    IT BAD

     

    thx

    • Like 1
  15. 2 minutes ago, Sardines said:

    Yooo, this is awesome (lemme just take this and incorporate it). While simultaneously being tilting cause some of this is such basic stuff being done wrong in the first place (what the hell is with quad-calcing terrain tag, that makes me mad). But if anything, I respect your bravery. We all know how you can make one tiny change to something non-battle related and the code goes "no, I shall not run now, at all"

    no seriously take it

    we have a thing for map connections too

    and we're working on speeding up load times for maps

    i wonder if we could do a preloader.......

  16. 1 minute ago, netbean said:

    Does ruby have structures like hashmaps?

    If so iteration with couples [key:values] is way faster... at least in java 🙂

    ...."flies aways cause none asked my opinion i guess" 😄

    dude I barely know how to code

×
×
  • Create New...