Jump to content

andracass

Administrators
  • Posts

    1815
  • Joined

  • Last visited

  • Days Won

    122

andracass last won the day on May 16

andracass had the most liked content!

Reputation

3526 General Royal

About andracass

  • Birthday 10/16/1996

Profile Information

  • Alias
    cass
  • Gender
    Female

Contact Methods

  • Discord
    andracass#9999

Recent Profile Visitors

52498 profile views
  1. last time i bitched about essentials they got really angry and ranted about me among themselves on their server. wow this is incredible can we start a post hall-of-fame
  2. we removed them on our own??????????????? this wasn't something we were coerced into????????????????????????????????
  3. hi kids! so after talking about things last night, i realized that there were some changes that i could make to the anim file easily that will make things slightly better for everyone while we work on the Way Better stuff. it cuts half a second off the load time! so that's pretty neat. but also yo what the FUCK was that post yesterday???? who reads this shit??? there's a distinct lack of quality here and someone's got to do something about it. so without further ado, welcome to today's episode of how not to write a devblog post now, out of respect for their privacy, i will not refer to the offending poster by name. they might not even be real. you never know. exhibit A: so right off the bat, i don't know who the fuck this person thinks they are, but what kind of asshole just refuses to use capital letters??? do you have an allergy???? are so you full of shit that it's interfering with your optical nerves and you are unable to see the shift key? while we're here, this paragraph (if you can call it that) is entirely incoherent. "blowing up bullshit"? the fuck does that even mean? if you have a backlog of bullshit, find a bathroom. exhibit B: this is actually entirely accurate. no problems here. post was shit. exhibit C: let's talk about that first section. there's a severely unhealthy mixture of technical explanation mixed in with meaningless bullshit. how is this supposed to mean anything for anyone? now, to be fair, the subject matter itself is about borderline meaningful bullshit. perhaps the post composition is actually an artistic reference to this, in which: kudos. but i don't think so. what the fuck does that even mean??? exhibit D: bro what sometimes people are just pointless assholes in the internet! get over yourself! in what world does this wind up in a devblog post? exhibit E: this paragraph false starts twice and fails to even explain anything when it finally settles on a subject. what's a symbol? what's a hash? how does this even pertain to the screenshot you just posted? these are basic questions! you're not going to be making shit easier for anyone if you explain it like this. now the next bit of this post is actually fine. it's probably the most coherent part of the whole thing. this bit feels like i'm not actively losing brain cells while reading it. but, uh oh! exhibit F: grammar fail!!!!! can i get an XD in the comments???? SO embarrassing. frankly i should probably dm the author to inform them that they don't know what words are. the rest of the post is honestly a lot cleaner. it's practically like it was written by an entirely different person! it's just too bad that person didn't write the whole thing to begin with. so today we're going to have a REAL devblog post. a good one. strong. professional. informative. today i'm going to tell you about data structures this is a tale of Ruby and Marshal. obviously ruby is the programming language. marshal is the method of loading/saving ruby objects. the animations file is 14.1 11.3MB. it consists of 1400 PBAnimation objects (as of right now). there are a lot of attributes that belong to each object, but if we're talking about data size, the attributes account for ~750KB of the file size. the true villains of this story are the cell arrays. so, it's hard to precisely gauge exactly how "large" a specific value is in ruby. data types have specific sizes: in, say, c++ a number between 0-255 is a byte, 256-65535 is two bytes, and those sizes are specifically defined. with ruby it's harder to know exactly what data type a number is, or how large an object is. so you just kind of have to guess. which brings me to bullshit. let's talk hawt features. hitting f6 lets us run arbitrary code. it's great for running little snippets of code like this. we can print out data to the console, rescue people out of emergencies, run single functions from the scripts... and, in this case, dump bullshit. this line of code has Ruby tell Marshal to make a file that just has a zero in it. so if i want to see how large something is, i can just dump it and take a look! that 0 is four bytes. neat! if you're a compy nerd, you can literally just use the f6 menu to see how big...anything is. how big's a pokemon? just save it and find out. how big's a battle? you can just save that too! the possibilities are endless. so i did some experimenting. the bulk of the animation file is nested arrays filled with nils and numbers, with some other objects strewn throughout. one such object is the animation timing: so a raw timing is 257 bytes. i mentioned earlier that you don't necessarily know how large an object really is on observation in ruby. the 0 that i dumped earlier isn't actually four bytes itself- the file that gets dumped includes some overhead that ruby uses to process the object. since the animation timing is a non-standard object, the information about what that object is has to be marshaled out with the object itself. so let's say i marshal out five of them. the know-it-alls in the peanut gallery are screaming out to their monitors that this is NOT 5*257. and that's true. ruby lied to us :( so in reality a raw timing object is 100 bytes. now, 100 bytes is nothing. it takes 100 bytes to display a line of text. it probably takes 100 bytes to eat a pizza. 100 bytes matters here because we have 1400 animations with (a rough estimate of), say, 5 timings each. that's 750KB. (i'm actually researching this stuff as i write this post- i hadn't tried dumping multiple objects to find the size of a single one until just now. but it turns out this accounts for almost all of the overhead i mentioned a little bit ago! so that's kind of weird.) now, the main reason i care about this is because of how it affects performance. (i'm sure the people with shit internet connections wouldn't mind some size reductions either.) i have to open and close this game a lot and it has to reload everything in the cache each time you do that. that 14MB animation file takes 3 seconds to load on my computer. that's a really long time. ...granted, i'm horribly impatient- the last thing that i want to do while i'm testing something is sit and wait. but i also have a beefy compy. my processor, according to an arbitrary benchmark, gets a score of about 3200. let's take a shit computer. like this guy: this is probably the minimum spec computer you'd need in order to run the game. coincidentally, it's also one of the most common desktop computers, so it's more likely that at some point you've seen or used one of these. this compy, according to that same arbitrary benchmark, gets a score of about 700. i'm ~4.5x faster than it is. so if it takes me 3 seconds to load the animation file, it takes this computer almost fourteen to load it. it'd be worse if you're still using the rxmp engine! (again, dear god, if you are a fan game and you're using our animations via the old method, my sense of justice compels me to fix that. god, imagine spending one minute each turn of a battle loading the animation file.) coincidentally the math on this works out great: it takes that poor crap computer about 1 second to marshal 1MB of data. cutting the size of a timing in half would mean cutting load times by half a second. that's not bad! but the timings aren't the biggest contributor to the filesize. that honor goes to the cel arrays. every cel, every frame, has an array of data associated with it. that array has 27 elements, each containing a number between 0 and 255. i'm pretty sure that, if you count every cel-frame, you'll have a total number of arrays around 240,000. so let's call up marshal. marshal is screaming. yikes! so the current system, by necessity, has this ridiculously large file size associated with it. what can we do about that? 1. get rid of the garbage values someone (not me, ofc) mentioned last post that 7 of the values in each of the 240,000 arrays are completely unused. that knocks us down from 6.5 million array entries to 5 million. that shaves almost 25% of the filesize right off the bat. it's also practically free- and by practically free, i mean that this change will be out next patch and it cuts 2.8MB off the file. that's three seconds of life that the person with the shitty shitty computer gets back! 2. maybe don't use numbers for everything every parameter in the array is defined as a number, even if it's just to indicate whether a value is true or false. sure, a number is only a few bytes, but a few bytes millions of times matters! so let's try this out. that's half the size! crazy. ...now obviously i can't just do this. most of the parameters need to be more than just a boolean. but the parameters that this can be done for get half their filesize shaved off! it's like shaving another 1.5 values from that array. 3. symbols are literally magic... now, ordinarily, i would try and explain symbols to you right now. but that's actually really difficult. integers are easy to understand. strings are concrete. symbols are abstract. they're borderline magic. when you use a symbol, you are willing something into existence. want something to be a :THING? just call it a :THING! that :THING will always be the exact same :THING across anything that you do in ruby. let's say that later you need some :STUFF. just call it some :STUFF! again, anything you describe as :STUFF will always be the same :STUFF no matter where in the scripts you talk about :STUFF. so let's slap some in that array. for the size cost of a number, you can save a :THING! and unlike strings, the length of the :THING doesn't matter. *googles for good copypasta why not? same size. so symbols are great for defining :THINGs. hashes are where they really shine. you can think of a hash like an array that can use anything as an index. like, say, a symbol! take, for example, this bit of code: celhash is my hash, :FOCUS/:PRIORITY is my index (the technical term is "key"), and then :BACK/:FRONT/:BEHIND/etc.... are my symbols. instead of using a number to define a state, i just.... define the state. (this is done a LOT in the PBS rewrites. it's basically the foundational idea behind them. the rewrite just has a ton of symbols that point at each other.) now, turning everything into a hash isn't just what makes things smaller. hashing an array will have the opposite effect: (yikes!) the advantage of a hash is that i get to leave a ton of things blank. 3.5 ...and hashes let you do sorcery you can search for anything in a hash. so what happens if you search for something that isn't there? the hash will return a default value. default values are just *chef's kiss most of those array elements in each cel-frame are unused. we're not using every parameter at the same time, so those unused parameters just have useless garbage data sitting in them. hashes let me ignore those. so let's say that i set a default value of 100 for my zoom. any time that my zoom value on a cel-frame is 100, i don't have to record it. and that means that i don't have to record... well, most of the array values. and that's the secret of how i pulled off doing this: *chef's kiss delicioso. 4. what does the future hold? i've mentioned that every cel-frame has those same 27 parameters regardless of what the cel is actually doing, but one other major disadvantage of the current system is it has the same parameters regardless of what the cell is doing. if a cell is sitting still and doing nothing for 60 frames, that nothing will be copied over to each one of the 60 frames. also, the user and target both count as cels. i had originally made an edit to the file that would use the previous cel as a reference under certain circumstances, but we ran into some problems with partner animations not working and it had to be scrapped. since we're making larger backend changes to the system, i'm inclined to revisit it- it cut a solid third off the animation file when i had tried it before. if we managed to squish this file down to 5MB, i could sleep well at night knowing that shitty compy guy gets a whole 9 seconds of his life back each time he opens the game. 5. hi cass i'm one of the people who uses your animations. is this going to break everything for me? wow look at me breaking structural rules to turn this into a Q&A! so meta. so, yes. right now we're only planning to release bullet point 1. that'll cause some crashes if you don't do anything else and just drop the animation file in. there'll be some code that you can copy in to fix everything, though. replace class AnimFrame with this: class AnimFrame X = 0 Y = 1 ZOOMX = 2 ANGLE = 3 MIRROR = 4 BLENDTYPE = 5 PATTERN = 6 OPACITY = 7 ZOOMY = 8 COLORRED = 9 COLORGREEN = 10 COLORBLUE = 11 COLORALPHA = 12 TONERED = 13 TONEGREEN = 14 TONEBLUE = 15 TONEGRAY = 16 LOCKED = 17 PRIORITY = 18 FOCUS = 19 end and then delete these lines: bam! your animation loading will suck slightly less ass. once we keep going, though, i have no idea what will happen. i'm hoping it'll still be pretty easy to change things- the animation code is almost entirely unchanged between essentials versions, so you might be able to drag and drop our code into your game and it'll just work. hard to know for sure. see, now this was a post. that fucker from yesterday is so getting fired.
  4. god this was so not my best work
  5. hi! i bet some of you were expecting this dev blog to never get used again. and that's fair. we're, like, half a step away from the "final" release. community beta has gone shockingly well. it has blown everyone's expectations out of the water devside. gamebreaking bugs have been few and far between. the site didn't crash (though it came close!). the discord server somehow managed to stay fairly tame despite the massive amounts of hype. (which, if you want to drop some nice words to the devs, check out this thread!) we're all like what???? so the next step between now and the actual release is to just, like, say that one of the patches is the final release. there's not really a big process that determines when we're there- eventually we'll hit a patch that seems stable and be like "yeah, okay, i think we can be done with this." and that means i can get back to work one of the downsides of needing to release something stable is that i can't just run around and break whatever shit i want. so over the past few months i've built up a backlog of bullshit that i'm just absolutely sick of, and now i get to blow all of it up! hype. so who wants a coding post. (quick disclaimer: this post is kind of a disjointed mess- i got interrupted by some moderation stuff and it definitely threw me off a bit. sorry!) the pbs is garbage and i hate it 90% of people who know what a pbs is only know because they're asking for debug. but did you know that the pbs actually does something? the pbs is where all of the game-related data is held. it's basically a bunch of text files that have information that, say, defines what a move is, or what a pokemon is, or what teams different trainers have. it is organized like actual ass garbage. here's what the moves list looks like: the fuck are any of those numbers. you need a manual for this shit. tm learnsets are in here too! and they look like this: ughhhhhhh it's so gross. good luck finding out if someone's missing from that. the pbs is a horrible mess to work with. - legally required disclosure notice - my lawyers have advised me to throw in this disclaimer because otherwise i risk being cancelled by relic castle again. this is not what the updated version of essentials uses. it's laid out a little bit more nicely. it's not what we work with because we can't get the newer version. all characters in this post are fictional. any relation to persons, living, dead, or not yet in existence, is entirely coincidental. - legally required disclosure notice - so i have made some changes and i think they're pretty neat so i'm going to tell you about them. here's what the moves pbs looks like now: omg check that hawt code out. i feel like every once in a while i find out some cool new coding trick and feel the need to use it everywhere. today that cool trick is a symbol! and also hashes. obviously the primary advantage of this layout is that it's way easier to understand and edit. the additional bonus is that i can change anything about this move whenever i want, however i want. all i have to do is, say, add this: bam. all i gotta do is slip a line into the code that checks if the move i'm using instantly wins the game, and it just works. i can do that with anything! anywhere! it's easy. simple. clean. even better: i don't have to compile this shit! ever! i can just load it in the game straight from the text file and the shit just works. it's beautiful. it's also not quite ready for primetime yet. i'm mentioning it now because i'm hyped about it and i think it's going to make things a lot easier for future devs. the main reason for this post is: the animation editor is garbage and i hate it right off the bat, let's state some facts. the reborn animations are the best in the business. the animation squad has put a stupid amount of effort into making some high-quality animations for every move in the game and mon transformations and field changes and probably even more shit than that??? if you even do a cursory skimming of other fangames, you'll see the phrase "uses the reborn battle animations" all over the place. go appreciate your friendly local animator. i'll even call them in here to make it easy: @smeargletail, @Voctrode, @VulpesDraconis, @crimsoncrim (on occasion!) and if you're not appreciating them for the visual quality, appreciate them for suffering through the animation editor. the animation editor is ass. the animation editor is ass this gets two headings because i really can't overstate what a horrible experience using the animation editor is. longtime readers of my posts will recall that i originally started as an animator! i made one animation. before mkxp the animation editor was, in my opinion, borderline unusable. people with more patience than me may disagree. i think they're wrong. basic changes took forever to do because you had to click and hold an arrow to make them happen and the rmxp engine stuttered between every single increment. the people who got pinged a little earlier have suffered immensely for their art. in particular, this is a callout post for vulpes. one day, back in-- holy shit this only happened in january what the actual fuck one day, back in january, i had made some changes to try and reduce the file size of the animations. (more on this in a bit!) vulpes popped in one day and was like "hey! this thing isn't working right. i took a look at the code and think this might be the problem." she nailed the problem in one try. perry and i immediately indicted her into the script team. since then she's been doing a shitload of work to make the animation editor less ass. there's third reasons for this callout post. first, vulpes is doing some great work and we are very proud. second, the animation editor is so ass that it literally led two people to become scripters. third, this incident happened in the first place because i desperate to do something about the giant-ass animation file. the animation data structure is ass reborn first started the project to redo all of the animations in e16. the base essentials animations were ass and we* wanted them to be better. *we is ame- i didn't exist at this point, and one of the animators on the team, MDE, has since left the community the base essentials animation file supplied in v17 was about 1MB. our animation file in e16 was almost 6MB. as of right now, in e19, it is 14.1MB. one of my original optimizations was that i set the game up to only load the animation file once at the start of the game. prior to that, it loaded the animation file every time you needed an animation. the game would hang for a second every time you used a move. it was a bad system back in e18. it would be crippling in e19. i have a top of the line computer, and it still takes 3 seconds to load the animation file. i shudder to think about whether or not other fangames still use our animations with the old system. i posted a disclaimer earlier absolving essentials of responsibility for the PBS edits. there is no disclaimer here. the base system still works like this. if i don't get cancelled before i finish my modifications, i'm going to push for this to get put into the base engine. we're kind of doing our own thing nowadays, but this is self contained enough that i think it can still be passed off to other people easily. make your animations file half the size with one easy trick! (relic castle admins HATE this) imagine 1400 boxes. they each have their own labels and information written on them. imagine that inside each of those boxes are another 15 boxes. and then, finally, inside each of those boxes are another 20 boxes. that's the animation data structure. at its core, the animation file is a triple nested array. you have the individual animations. then you have the individual frames of the animations. then you have the individual cells. there's something like 140,000 of them. each of those arrays has a specific prescribed layout. it looks something like this: this is everything you can do a sprite in the animation editor. all the effects, colors, blending, etc. the first thing you will notice, if you are able to count, is that slots 9 and 10 are just straight up missing. that's wasted space. not good. a number of these parameters are never used. FLASH in particular uses four slots in this array. all of those slots are wasted. VISIBLE isn't used. that's a wasted slot. you have a 27 element array and 7 of those elements are wasted. of the remaining 20, not every element is used on every sprite. most sprites just need to exist in a place with no special effects. those sprites will use the same amount of space as a stretched sprite that's tinted blue and zoomed in. the fundamental cell data structure is very ineffecient. so i ripped it out and replaced it with a hash. here's a nice before/after of my lazy implementation of it. i cut out the 7 unused elements. i set some default values for every parameter and excluded things that matched the default. i changed some values to more efficient data types. it's almost half the size it used to be. okay, so this post was a minor disaster. if people are really really curious about how big of a deal each of these changes are, i can make a follow up post! but if nothing else, now you know the posts aren't over. ame's moving on to starlight, but a lot of the squad is still involved with rejuv and/or deso. and i've still got plenty of shit in the scripts to be mad at.
  6. andracass

    The AI?

    :'( no we're still here to fix up the ai, bud. c'mon now. this wasn't funny before, and it's not funny now.
  7. come back once you've had a chance to play it!!!
  8. hey y'all so you've had a chance to play e19 now, and i've seen lots of comments directed towards the devs about how much people are enjoying the game but stuff flies by so fast on discord, and i'd hate for anyone's comments to get missed. so here's a forum thread (those exist!) where all y'all can post whatever kind words you want to send our way. we'll probably send some back come time for the release~
  9. wow you nailed it. incredible.
  10. tomorrow (US time)
  11. yup! a number of devs, myself included, currently work on both games.
  12. i believe they're the same. community release? no this comment made so little sense that the thread went quiet for six hours
  13. yeah there's rejuv and deso
×
×
  • Create New...