Alpha Release
Welp, it is technically before Christmas so does releasing an alpha count? The game is in a fully playable state so I am going ahead and making it public with the hope of getting some feedback. Whether this feedback involves suggestions, criticism, bug reports, or crash reports, I would love to hear anything anyone has to say!
What's New?
A lot! The game is playable now, so that's something! I ended up going ahead with implementing more than just the 2 power-ups I was initially planning on for this first release. I added 6 power-ups so far and will likely add 2 more down the line.
While play-testing with some family they revealed a lot of "what does this do?" and "what is that?" problems. For some items (such as the spinning plates) a simple graphic redesign was plenty to address the problem. For the rest I ended up adding a help-page with clickable elements so people can see what each item or command does.
I had planned on adding a Single-player series of maps (with very primitive AI) that introduced you to each mechanic but I just didn't have enough time. I will likely still add this in later on, but for now this help section is plenty to get people started.
Once I had all the items implemented I went ahead and designed 6 maps! 3 of them are taken from the classic Robostrike game and 3 of them are originals. While implementing these I cannot express enough how tempting it was to try implementing a level editor. Due to every map tile being represented by a single number (with each property being a bitwised-together value) you can imagine that designing these suckers was hell. Since each tile can hold 3ish layers of data (two of which can have rotation data as well) all in one number, each cell would have a fairly lengthy chain of numbers being added together and it made my brain hurt on several occasions.
Problems I Had
Everything was pretty much smooth sailing, to be honest, but I came across three primary problems in this last session. The first is that of scaling pixel art and something I completely spaced on. I designed the window and elements to be a good size for scaling up the pixel art on people's monitors but what completely slipped my mind was the scaling of arena graphics within the game itself. Since arena sizes can span from 4x4 to 16x16, the game attempt to scale them up in the view when possible.
By the time I realized this, I somewhat designed myself into a corner. I haven't found a good solution for the problem, but for now I have two view modes that the player can choose; "Stretched" which will simply stretch the arena up as much as possible while keeping the aspect ratio and "Native" which will scale up the arena to the nearest whole number that fits on screen. If this size is pretty close to using all the space, the render will default to it. If not, it defaults to the stretched mode. It works pretty good, but there are some arena sizes that just suck in that they would be WAY too small at native resolution and look god-awful with the stretched mode, as you can see here:
I thought about limiting arena dimensions to better scale but in the end I stuck with the view mode and may just have to deal with the pixelation. This is a hobby project, after all.
The second problem I had was in nailing out the animation timing client-side. When the server processes movement, I use an animation structure that stores potential player animations in 'layers'. Basically, I can queue 'move from cell A to cell B' for a player and it adds it to the layer. Once there is a collision where a player attempts to assign another animation, the layer is stored and a new layer is created. This works extremely well when combining player movement with pushing obstacles and treadmills because, if a player gets pushed by a dozen items, it will auto-pause all other players until all the player's pushing is done and I don't have to think about triggering 'waits' when calculating interactions. It also lets me know how long the server should wait for the clients before starting the next turn because it can just count the number of animation layers generated.
The problem came with firing weapons and activating the 'hit flash' of other players. I initially had this timed by the server but I came across the issue of moving players that got hit due to moving players queuing an animation for the tank treads. This means queuing ANOTHER animation (that of being hit) would force a whole new animation layer to generate. In short, this would mean you would have "Player 1 shoots at Player 2" combined with "Player 2 is moving", all this would finish animating, and then the 'hit flash' would play (after the shot effect was already long gone). Combine this with power-ups that deal damage at different stages of a command and I was pulling my hair out over this for a long while.
In the end, I ended up deferring the damage animation queuing to the clients instead of the server. It was still a bit of a challenge because the server only tells the clients 1) 'you were damaged' and 2) 'these players fired weapons'. I had to use some context-awareness of player animation states to figure out if a bomb or laser caused damage, or if an arena obstacle caused damage and play / delay the animation accordingly.
The last problem was simply with the GX.Games export in GameMaker giving me too much trouble with the project. The keyboard_string is completely broken, making chatting practically impossible. I couldn't get my Javascript extensions to work correctly with it (which is required for Newgrounds account support), and the game would fail to load if I had any included files (which I require for language data look-ups). The last two issues could be worked around, but without proper keyboard_string support I just wasn't willing to put in the time. Once that issue is addressed then I'll consider uploading to GX.Games but, for now, Newgrounds is where it is hosted since I can use the HTML5 export.
That's All Folks!
A bit of a short update but that is because I just want to get this out and focus on Christmas / New Years for the next couple weeks. I'll be monitoring things a bit in case there are some issues with the server (very likely) or breaking bugs that are discovered, but other than that I'm taking a bit of a break from the project until after the holidays.
If you want to play, I'd love to hear feedback! Grab a friend or family member and try blowing each-other up for Christmas!