Jump to content

Leaderboard


Popular Content

Showing content with the highest reputation since 06/09/20 in Posts

  1. 29 points
    so apparently it's been a week since last post???? and i didn't even notice. anyway the bois n i have been at this coding shit and it's all like dam gurl so fast like wo lemme show u a sample of what we got. Zoom so let's start off with an easy one this code is parked at the end of the script that updates every single event that has a sprite. each of these lines calls a function that calculates a lot of data about where the event is relative to you, and how zoomed in its sprite should be. i'm mostly interested in the zoom lines. now, TILEWIDTH and TILEHEIGHT are both defined variables. their purpose is kind of obvious. both of them have set values since the tile size doesn't change when you're in game. let me show you those values. now, class. could someone please tell me what you get when you divide either of the two tilesize variables by 32? anyone? essentials? here's what the code looks like now. better. this probably doesn't look like that substantive of a change, and, yes, compared to the sheer number of calculations that need to be done per frame, this is kind of a drop in the bucket. to this, i counter: - this keeps two functions from being called per event per frame. if you're in, say, charlotte's gym, these functions would get called a grand total of 9,120 times each every second - it's literally just one - it doesn't even do anything - it's just like "oh hey let's change the zoom from 1 to *shuffles notes um, 1" which is literally not even a thing which leads me to Math if you read through my entire last post (thx btw!) you'll remember that i was very tilted by the fact that essentials calculated the value of 128*4 a grand total of 8 times per event per frame via the in_range? function (which i'll be coming back to!). so, 72,960 times per second in charlotte's gym. this was not necessary. it was never necessary. it filled my heart with despair and my soul with rage. well. WE GOT A WHOLE LOT MORE WHERE THAT CAME FROM Weather Updates! the snow and sandstorm lines hurt me. why would you have the thing multiply something by two and then divide by four. why not just divide by two? better yet, why not just set them all to the same value in the first place and then drop the value in there? this isn't even nearly as big of an issue as the 128*4 thing but it just bugs me. you can't even see the whole time because rmxp's script editor is ass, but i think you can get the idea here: all this does is multiply a bunch of shit together that doesn't need to be multiplied, and it gets called thousands of times every second. it doesn't have to be this way. i could go on, but like, do you really want to see me complain about math more? no, you don't. suffice it to say that about half the time i see a function is running absurdly often or absurdly long, it tends to be doing a whole bunch of stupid math. it offends my sense of justice. are you SURE you're in range?? this one i particularly wanted to include in the event that you also happen to make these games and are particularly interested in some shit that can help speed things up. good news! this is some easy shit that you can just grab for yourself. nearly every single aspect of the code that affects the overworld operates through one central script: the Scene_Map update function. nearly every aspect of your entire gaming experience has some sort of roots in that single function. it pushes all the overworld processing to two separate scripts: Game_Map which deals with the mechanics of the map itself (where events are, what maps are connected to it, etc) and Spriteset_Map, which handles everything you see on your screen. essentials comes with some helpful anti-lag scripts that use the in_range? function and the event trigger to determine if an event actually needs to be updated. it's actually helpful! it saves some time updating events that literally do not matter. here's the thing. despite the fact that the two major functions handle a lot of the same objects, they don't coordinate with each other at all. that leads to a lot of duplicated calculations. but there's a fix for that! in game_event: in game_map: in spriteset_map: and boom. ur game already goes at the speed of zoom. is this a deep bush? this is gonna be a short one because i'm getting tired. i've mentioned functions that run on a per event per frame basis. what this basically means is that the code runs for every event on the map regardless of what is, every single frame of the game. these functions are the core of why some places simply lag to hell: the game is updating so much shit that your computer- even with the hippest, hoppest, newest CPUs- can't keep up (especially on speedup). the reason that 18.4 was such a huge improvement is because it took a massive chunk of those updates and yeeted them. well, i'd now like to give you part 2: bush edition. when something is in a bush in pokemon, it looks different. we all know this. when something is in a big bush, it looks big different. but in reborn, nothing is in a big bush- except for you. so we just yeeted the code that dealt with that! and wow is it faster. you can even see for yourself! (i've updated the patch on the downloads page, too, but not the main downloads. it's not worth that level of effort.) anyway. trying not to pass out on my keyboard. there's still a lot of fixes i haven't mentioned that will be in e19 and just require more testing before i let them out into the wild. but that patch has some fancy new in_range functions along with it. if it breaks someone's game i will cry.
  2. 29 points
    good morning. let's talk optimizations. we all know that essentials is, uh, slow. in fact, it's so slow, that 18.4 isn't even the first release to be at least partially based on making it faster. what is difficult to overstate is just the sheer extent to which this is not necessary. everyone who makes the game knows this. that second meme was a big enough deal that it got me to make another release. after everything i've been through. it was just such a big speedup that keeping it to just the devs actively felt bad. so let's do storytime. Event Optimizing this is the real basic stuff. in-game events on the map (trainers, doors, anything that results in a change to the map as a result of some kind of interaction) are easily the biggest sources of lag. you can tell what maps have a large number of events simply based on how slowly the map runs. calcenon Gym is my baseline for how laggy the game is simply because of the sheer event density on that map. so a few months ago, when all this optimization shit started, it began by seeing what events were unnecessary and could simply be condensed to a smaller number without resulting in any changes to the overall gameplay. an excellent example of this is spinel. every disappearance in spinel takes up some quantity of events. originally this was done with one event per tile that changed as a result of one teleport. take the pokemart. here's how it disappears in 18.4: the pokemart uses 16 events to disappear. here's how it is in e19: three! one for the graphic, and two to trigger the change if you touch them. the entire graphic is just moved into the one event. some areas will definitely be faster because of this, but the downside of this sort of optimization is that it's limited to the areas that have been checked over- and we really have a lot of places that would need to be checked. which leads me to Script Optimizing we've known that there's bloat in the scripts for a while, but the script-side of things is so obscenely large that it'd take ages to find anything to fix that has any sort of impact on actual gameplay. and then: toothpastefairy. toothpastefairy is our newest, freshest dev. i've mentioned him before as the person behind the battle factory- y'know, the thing that we literally did not expect to happen. this was before he joined the team, too. the sheer number of bugs on our to-do list was enough for him to be promoted from honorary dev to actual real life dev. since then we've been getting shit done left and right. bugs getting squished. memes gettin made. then, one day, he comes in with this. i hooked up the profiler for myself, and we just went to town on this shit. here's some of what we've got. Quad-calcing the terrain tag the above snippet of code is used to determine whether or not a sprite would reflect off the tile in front of it. in doing so, it grabbed the terrain tag four separate times- which is, itself, a time consuming process. fixing this was as easy as assigning the output to a variable and then using the variable for the comparison. is this a map? the terrain tag checking process itself involves taking the coordinates of a tile on the map and shuffling through every layer until you hit one that correctly has a tag. however, it also includes this. are you on a map? of course you are. you're playing the game. this was removed. 128*4 so we know that 128*4 = 512 because we can do math. the in_range? function calculates it again just in case. and it does so four times. and is one of the most frequently called functions in the entire scripts. why. this was changed to 512. is this a control? every frame, the game processes whether or not you have a button pressed down. it does so using a process along the lines of this: here's the thing. there aren't 256 keys on the keyboard. we barely even have half of that. this was carved into three separate sections that go through the keys that actually exist. the one line change this is the big one. *breathes okay. so let's talk about what this does. essentials uses a function to determine whether or not a sprite should have a reflection. this conditional is what essentials uses to add sprites to the list of sprites that should be reflected. under normal circumstances, this is determined by whether the event itself specifically says it is not to be reflected. essentials will assume that all sprites should be reflected unless they are explicitly told not to. the issue here is that we literally have thousands of events. no one is ever going to put /noreflect/ on every single one of them so instead, the new code checks one thing and one thing only: whether the player is currently in serra's gym (map 506). do you know what's easier than quad-calcing the terrain tag? literally never calling that function at all. we've been working up a storm over at Not GameFreak HQ with patching things up left and right but it is truly difficult to overstate exactly how huge of a change this is. every single event in the game used to go through this giant function, and now it doesn't. the change was so freakishly huge, it dropped the frame time reported by the profiler by over 60%. now granted the profiler isn't exactly the best at calculating the total time spent on individual functions... but look at the sheer size of that drop for such a minor change. it was inspirational- so much so that i put out another update. after everything i've been through. my computer crashed twice. i had to rebuild my mac vm. but we did it. it's here. it's worth noting that 18.4 only includes the one line change right now. it's small enough that it doesn't need to be tested in advance. anything else and i'm worried some weird aspect of this engine will just make everything break completely. but you bet your ass this shit'll be in e19.
  3. 25 points
    look, i know i said i was never going to do this again. but. we have another version. here's the entire changelog: added a line to the scripts and that's it. that's all we did. it is much faster than 18.3. and it was already fast. and i thought about this for exactly 5 seconds so you know it's gonna be great. please enjoy. the files are still uploading at the time of writing. i'd wait for them to finish, but the sun is coming up and i want to go to bed*. so we are also featuring a patch! you can find it on the downloads page, right at the top. (the full length classic story-style dev blog post about it will be here tomorrow. or today- since, y'know, the sun's up.) *edit: haha lol i absolutely waited and now the files are up. hello, sun. my old nemesis
  4. 12 points
    today's devblog comes straight off of discord, where i was very angry at some things earlier. i had noticed while playing a certain pokemon desolation that in four-person double battles (you and a partner vs two opponents) the AI phase of the turn would occasionally lag just a bit. deso uses the reborn ai (because they're not, y'know, animals), and so earlier today i took a peek at its inner functionality. it is, uh, something. firstly, it makes the "movescore" calculations (the ai's entire claim to fame) three times per round instead of, y'know, one. this was kind of an oversight on our part. silly, really. with some restructuring, it was patched out and now runs a lot smoother. however, upon further investigation, it became clear that fixing this issue did not yield the expected improvements. i identified a culprit: the hasWorkingAbility function. this function does two things: it checks to see if you have an ability and it checks to see if it functions (not moldbroken, etc) it's not very good at those things. and that frustrated me. in a fit of righteous fury at this function that had wronged us all, i prepared to re-code all 1002 calls inside the move scoring system. but then. things changed. what follows is a direct transcript of my angy in its purest form. (for reference that 15.8s -> 14s thing is just how long it took to profile- so by the end of this the profiler ran about 20% faster) *sighs anyway what i'm trying to say here is fuck essentials.
  5. 1 point
    hi. at long last, the postgame progress bars have been unlocked. as you may have noticed, it is, uh..... lil big. so lemme break it down for ya. first we got the CONTENT. some LEGENDARY content. see what i did there. but actually there are like 76 legendaries and you've Gotta Catch 'Em All™ 'cept we already gave you, like, five. so you'll have to Get 71 More™ now i'm sure you're wondering. "But Cass, that's so many legendaries! How do you intent to pu-" QUESTS. 39 of them to be exact. it is why this bar is so big. see, we _could_ just be like "oh look! it's a mew in the corner in byxbysion and you have to go to this specific spot to get it!" but nah, man. that ain't us. we have quests. for all of them. *nervous chuckle the quest style/length will very depending on the lengendary. some will be simple and fairly uninvolved, a la your "finding eevee in chrysolia cave" quest. others will be longer and more story heavy, a la your "lower your relationship points with adrienn! feat. Sandy" quest. there's no saying what lengendary will have what quest length, but it's worth noting that people keep having to remind me that Zeraora exists and to this day i have no idea what exactly it does. it's like.... an electro cat? maybe? idk. good luck finding it in chrysolia cave. for the progress bars, each lengendary will magically gain its own set of "eventing/story/mapping" bars while it is being worked on. otherwise there'd be something like 110 bars in total and like yikes no i'll pass on that thanks. what kind of jerk would have a progress bar list with 110 bars. yikes. secondly on content. you will, at long last, gain access to a location that has been taunting you with its presence the entire game yet has so far remained unyielding in its efforts to deny you entry. but, at long, long last, your triumph over the reborn league will finally give you access to: THE FERRIS WHEEL jk. its the nightclub. ame said she doesn't wanna make ferris wheel graphics so y'all crazy kids who wanna get real high and shit are fucked. unless you go to seventh street. but anyway. the point is that there's a nightclub. in that nightclub, there will be lots of FITE. yeah, bet you thought you were done with that. this FITE will include a Battle Tower- style system. i'd be more specific about it but, uh, we, kinda, sorta, maybe, uh, like, y'know, don't....know what we're doing for it? but it has a bar so it'll be there. next in the FITE will be the Mix and Match battle system. do you think fields are cool? do you wanna FITE all the leaders on them? well you're in luck, because this will let you FITE any leader on any field with any partner! it'll basically make you do my work for me. thanks, by the way! as the new champion of reborn, there will also be other people who will try and FITE you to become the champion, and you will have to FITE to defend your title! but this will actually be in charous mountain. and there's not a progress bar for it. i just wanted to talk about it. ANYWAY. i mentioned that Mix and Match will have you do my work for me. and that's because my work will be on the Boss Rush and the Theme Teams. the Boss Rush is kind of like FITE-ing the Reborn league the way that it operated back in the olden days- you get one team and you have to FITE all 18 leaders with that team. the boss rush will have two levels: one where each leader is limited to a single lengendary, and one where each leader will have as many as they want. this does not make a difference for noel, though. poor noel. (also, if it isn't already clear, you won't be fighting the original teams- you'll be fighting teams that are updated for the fact that you are CHAMPION and can do FITE.) the theme teams are the more creative side of this. it's for anyone who has ever looked at the field notes and thought, "hey, mountain field seems like it would be particularly good for Decidueye". these teams are more designed to be fun! rather than hard. some things involve, idk, psychic teams on glitch field, which, uh, might actually be kinda hard. but, then, i also unironically put tropius on a different team. what i'm saying is that it'll be pretty varied. there are currently 103 of them planned. if there is a bar that is likely to change during development, it'll be this one. finally, there is fwends. though out the game, you have grown close to the different characters. this is your chance to hang out with them! (the exception here, of course, is titania, who probably hates you, but that's normal for a titania her age.) lastly, of course, there is the Boring Background stuff; ie the bugs, the animations, and everyone's favorite Misc Updates bar 2.0 that now occasionally goes backwards instead of forwards! our innovations here at Definitely GameFreak™ are truly astounding. it is also worth noting that the Bugs and the Animations will not have your typical progress bars and will instead slowly tick down towards 0 to indicate completion. we like it when you pick up an item and your game doesn't crash. so, to summarize: Legendary Quests are the bulk of postgame. Each quest will have its own set of bars while we are working on it. there will be Much Bar. Nightclub bars will contain lots of FITE. the biggest FITEs will be the Theme Teams and the Boss Rush, though it will also include something Battle Tower-esque, a Mix and Match system, and Fwends™. Champion Defense will also be a feature. it still doesn't have a bar. it still isn't in the nightclub. i am still talking about it. the misc updates bar will go up and down depending on what work is done on the game and what we decide to add during development. it is not real. pay no mind to it. (edited to mention legendary bars will expand while their respective quests are being worked on)
  6. 1 point
    Remember that time I said Gen VII content wouldn't be implemented until the last episode? Well it turns out I'm kind of impulsive and I want my Ninetales. even if it's already too late for me ...among other reasons. So yeah Gen VII coming to a Reborn near you featuring all the bells and Wishi's. Those of you who were around for the Gen VI update (or who know that I didn't even finish Mega sprites until much more recently) will probably know that spriting is the major hurdle here. Fortunately, I've already gotten quite the jump on that during community release, and with the help of Jan, Zumi and previous animator Koyo, we are fast tearing through them. Our plan is to release a Gen 7 sprite pack for all fan games to use. But until then, there's a lot of work to be done, especially on the back sprites. Have a few of the finished fronts in the mean time.
  7. 1 point
    Hi! Welcome to the new development blog! The old forum was a bit cluttered, so I figured a new system would be best. Unfortunately I don't really have anything to blog about just now given the fact that we're coming right up on the community release-- and it'll be available by the time you read this after all. But we'll put it to good use soon, along with the progress bar widget we all know and love right in the top right of the page. For now, we're going to wait just a little bit before making the episode public. To restate, the reason we do Community Releases is because it's kind of a second wave of beta testing. Sometimes fixes we make during the beta break other things, but since that group of people has already played through it, it doesn't get caught. So it helps to have more people play just in case! After a week or two-- hopefully not longer-- when I'm confident the Community Release is stable, it'll be pushed to the main page for the Public Release, and then I can start work on E17! I hope everyone is looking forward to that as much as I am! Please feel free to leave comments down below; I always enjoy reading what everyone says.
×
×
  • Create New...