You like Arial font?
Anyway.
This project is a rebuild of the 2008 game titled above.
It was chosen because it's a really good game, and because I won't have to draw any art.
You can play the current public build→here. (Beware sound)
Be wary of these issues, though.
The controls are listed below the game window, but I don't have button prompts in the UI yet, so it may still be confusing. I'm working on fixing that.
Uh, just press Z and X a bunch and you'll do things.
You can also play with a PS4/5 remote.
Other gamepads are not guaranteed to work yet, but you sure can try.
Oh, I should mention.
This project is not necessarily for the public. One of the key objectives here is just to demonstrate my skill, the rest are, you know, private fun with private people.
- Online play using socket.io
- Fixing the "player 2 can't play locally" issue I introduced on purpose
- User-accounts database, and other tables
- UI-code refactor, and then a user login widget
Nearly any arrangement of terrain is representable. Each tile examines its neighbors during construction and figures out for itself which sprites it needs to blend in with its surroundings.
I wrote a python script that is definitely outdated now but at one time converted a bunch of terrain metadata I had to generated Typescript code. Saved me a lot of work.
Every terrain type (and troop type) has its metadata hooked up to the UI panels to answer your burning questions about wheat fields and rock in ocean.
You can open the detailed panel with right-trigger or Shift.
The UI code is awful, by the way, don't look at it.
Troops travel the path you tell them to when moving. And so, when you draw a path that's too long or too rugged for your poor little bike to handle, the path is recalculated to always be valid, preferring the old path as much as possible.
The search algorithm that does this, I factored-out a bunch of the boilerplate code to make it easier for my brain to understand. Now each map-crawling algorithm can focus near-exclusively on the map itself.
Troops can attack other troops, and the whole process is animated, too. The UI even estimates your damage and risk, and lets you see where your distance attackers can actually reach.
The troop-command system is already lined up for online play as well. I just haven't gotten around to the server-side yet.
The command-menu system triggers different selectable options depending on what unit you're commanding and where you're moving them to.
You can also load troops into other troops into other troops recursively. Isn't that fun.
Explode!
Changes to the board are made via a delayed, event-scheduling system. This missile launch here actually schedules several, the final one being the one that actually deals the damage.
For now, anyway. Main limitation is art.
Also, too many players makes for a slooow game.
Each splash screen is dynamically color-adjusted to the team it's representing, which is not something I do for the troops spritesheet. I actually wrote a python script to extract color palettes from png's to make building this feature easier, so perhaps one day.
Some units, like the Submarine, can hide their presence and ambush enemies who attempt to travel over them. Each player on their turn can only see the information known to them.
The commands you issue to each troop are internally a series of small, discrete actions, which return to the next in line whether they were successful or not. This is how they're made interruptible.
Battles can be held with limited-information, too, where hidden troops are much more common and troops which can reveal enemy hiding places are suddenly not unimportant.
Also, I wrote my own Timer class which handles the tweening of objects, like this flare animation. One of my favorite tools.
A full-picture view of the battlefield accessible at any time. It also shows you where the camera's view is and will auto-move said camera with directional inputs or to wherever you mouse click.
Maps can be pretty big because the game makes use of texture caching to skip redundant work on its 2800+ tiles. Or more than that, maybe. Larger than 70x40 makes the minimap in-aesthetic.
Currently dev-only, but it's mostly just missing UI. And a place to store the data. And the ability to resize the map during runtime. And uh... well, it helps me out.
This is actually accessible in the middle of any battle if in a dev build, and in no battles whatsoever when in a public build. I'm all about dev tyranny. I can't wait to program in my own cheat codes.
- Online-players desync. I do not yet have a backend system for saving the player-action history, so if a player closes the browser, they have essentially removed themselves from the match. The game currently does not recognize this, so on their next turn the game will wait for a non-existing player indefinitely.
- Camera, zoom level 2 gets stuck because the wait-for-camera system is waiting indefinitely for the camera to move into position, even though it has, and never begins the next board event. You can work around this by simply pressing the zoom button again.
- Finicky mouse controls. Sometimes you double, triple, quadruple click, sometimes it gets stuck in mouse-down state. These are usually navigable by clicking around in different places to reset the behavior system, but it's pretty annoying, yeah.