Some time ago I was talking to a good friend of mine about the state of development in Triplane: Furball. I explained how I just started coding a stat tracker – “a little block” that should take about ” a week or so..”. She asked; “How can one little block take a week or so..”. Well now that it is “ready” about a MONTH later :D .. Here is how to code a stat tracker for Triplane: Furball in a week or so..
Before starting on the stat tracker there was some preliminary work done, like planning some of the wanted stats to be tracked, how many levels players can gain, which ranks to implement and how the level progression system would work. As we dont really have any “actual” knowledge how fast the leveling works and about the xp amounts you would get per game we used an method called “educated guess” and how the system is now designed it should be easy enough(change the xp modifier) to change the amount of xp needed per level to change the progression speed. We ended up having 30 ranks or “levels” and Iiro got the FUN task of designing the rank embroideries based on the names we came up with. So all of this was done beforehand and not counting in my work of desiging the actual tracker “in a week or so”…
It was clear from the start that I wouldn’t want to use ‘precious memory’ to store player data and stats so doing some sort of external system was in order. I whipped up a system that used gamemakers own “ds_map” function that resembles arrays but are dynamic so editing them is much easier. Arrays can be compared to excell tables for those not technically adjusted reading this. Then saving some basic player data like name and some come up stats and converting them to the beloved json formatted file. This took care of the problem and I could free up the memory when not needed and always have the data available at an external source without the need to worry it would just disappear from memory.
Next step was to design the stat track saving and loading system so that it could be easily expanded if there would occur any need to add more tracked stats, also figure a smart way to save the current stats (and load) and to keep in mind the expandability. This would later provide very usefull as it will simplify things when doing altercations to the stat files.
Looking at my git history, next job was to design a layout for the “Roster” menu where all pilots would be listed and what stats there would be shown. I also had been using surfaces to create the other menu pages but I found them really hard and unuseful and stupid! So I wanted to create a better way to reload menupage without drawing everything again and again in the step event. Point of doing menu pages in surfaces was that I could draw it once and only display the surface, and if something changed in that specific page I would only need to reload that but in the end this turned out to just add boilerplate code and would make things unseemly difficult! So all this was changed in the “Roster” menu, and I intend to .. at some point refactor other menu pages aswell.. Of course.. all of this adds time.. and now text to this blog because I was supposed talk about LAYOUT! :D
Well atleast I used it as a base for what it COULD look like and what stats to show the player.. We already had “a plan” from past that we need trinkets and ranks and medals and cool stuf! But when you’re working with LIMITED pixels… there really is so much you can do. Sorry Iiro.. thats your problem really.. xD With the main part of the stat page figured out, meaning the position of the stats… it was time for TRINKETS! As said.. with limited space there must be compromises! I left the design part at this point and went back to stat tracker to actually show some “real” stats for user. The above image only had ‘hardcoded’ values. At this point we were getting at the end of week 2 and there was lot of work to be done..
After “baseStats” was worked out, it needed to be attached somewhere. So when first time starting the game it ask you to “enlist a pilot” (this was a mechanic implement like a year ago? and menu would show the “active pilot”). I made this thingy to add basestats to this pilot and then use the stat tracked block to actually save it in json. This was the first time anything real from the game was actually saved in a file! :O Huzzah! … Ofcourse this needed little refactoring later.. as this was only in the enlist screen which had an keyboard input system that I made also ?a year ago..? .. which I ALSO made again from scratch .. :D to better suit my new needs. (its perfect now?)
Before adding the button functions located on the image above in the first page… I did more tweaking on the stat page design.. created some placeholder sprites for ranks and emblems and medals and.. stuff.. Did a bit of coding also to get everything functioning with the new menu draw system. Once you start to dig in, its better to dig deep right? Also “finalized” the basic stats we will be showing to the user in this page, so I could also finalize the layout and finally code the button functions to work with the stat tracker.
…still having some space issues with the longest rank but little “\n” should take care of that right? This was maybe somewhere in week 3? I also coded the rank function that it would show the correct sprite based on the pilots “totalXp”. Under the name is also planned little xp progression bar but because of the lenght issues this still needs to be tweaked a bit.. Probably in a way that pilot name will end up in the blue line and IF the rank is long it will be above the name… This way the xpbar could stay in its original position.. Plez moar height ty? .. This is called design limitations by choice for those wondering.. :D
Button functions I added over the last weekend so that would make it end of week 3, start of week 4… They were pretty easy to do thanks to my ground work with the stat system earlier, and the new menu draw system. I made the decission to change the “edit pilot” button to “Make active” as this was needed when choosing what pilot to use to play “Solo Missions” and I wouldn’t want to crowd the button space with more buttons.. I’ll maybe change the “next” pilot button to a different method altogether and it would probably make room for the “edit pilot” button. That isn’t really needed? Who would want to change their precious name anyway?
So its ready ? … Well.. Everything is working right.. WELL.. I still need to add the stats to track inGame.. which SHOULD? be pretty easy as I already have a basic system in place to collect “some” stats.. Knowing me I end up refactoring a bunch of code and see how “a week” turns into a month again… You gotta remember I have my dayjob to attend to so in hours this month of work really was like.. 10-25h per week..? but no more than 40h in any way or not too much over.. So in reality it was 1 full work week.. ;D (I dont keep track of the hours I put in..for reasons..). Sometimes you just want to play videogames..
If you have any questions you can hit me up on our twitter @MansikkaMarmel8
OTHER MansikkaMarmeladi NEWS
No we are still not dead and the game is moving forward.. It really is. This is just a “part time serious hobby” so.. Things take time and myself as I do software development by day.. sometimes there is no energy left to do game development by night. Good things come for those who wait right?
We also took part in a 48h charity stream for https://www.nuori.fi/en/ (Children and youth foundation) that was hosted in TIOTRADEplays twitch channel. This happened in July and unfortunately the stream is no longer available and currently we have no video material of the event eather.. Which is sad because we had awesome 2h slot playing Triplane: Furball in 4-player skirmish. It was mayhem and chaos just as we like it. *All shots are bombs ;)*. If we should acquire this material some maybe posted online..
Iiro has been hard at working doing lots of sprites, finishing the multiplayer maps, destructible buildings and terrain objects.. Finalizing the writing of the solo campaing.. I mean.. we still have lot left but after this LOONG straight u can almost see the finish line.. The light at the end of the tunnel. But.. there still is length to cover! Stay tuned!