Neo Mecha v0.5.0 Maps and Movement devlog

Load maps from Tiled

The first thing up is creating a map in Tiled and loading it in the game. I quickly created a map in Tiled with path blockers and sight blockers, and I added a Data layer to the map so I could add things like starting positions. The starting positions are the colored pairs below. Each color has a match but it may be covered bay a sight blocker in the image below.

Opening the map in the game proved to be more difficult than expected. I first tried to directly import the tms and tsx files into the game but parsing the xml was a pain. After a little research I found out that Tiled supports exporting things to Json. With that I updated my Asset Importer to export the Json version of the map/tileset and import it into the game. The json was easy to parse and it didn’t take much to load the map after that.

Then I just had to do some small clean up. For one I need to choose a random starting point instead of the first one every time. Another was the starting title text was now off screen because it wasn’t locked to the camera and the camera now centered on the player at the start of a game. After fixing these two things, maps can be good for now.

Fix console move lag

To fix the “Search and Destroy” I added an event to the camera that fired every time its position was updated, the text object uses that event to update its own position. If this is done in the regular game loop instead of the event you end up with a bug where the object following the camera can lag behind it. This is exactly what happened to the Control Console. So, while I was doing the work on the “Search and Destroy” text I updated Control Console to get ride of the lag as well.

Movement Refactor

The movement didn’t feel ‘good’. the idea behind the game is to create a feeling similar to G-Gundam. Gundams are powerful. Limiting the movement to at max 4 tiles and then not being able to attack doesn’t make the player feel powerful. To try and fix this I’m adding a separate point pool for movement. That way the player can always attack no matter how much they move. I also increased the range of the player to 10 tiles. This is to make sure that the maps are big enough to feel like they are part of a city and not an arena. While also being traversable.

I like the result, the mechs moving and flanking making replays look like actual battles.

Here is what a full replay looks like.

Dashing ☑

Next I added a Dash movement. The purpose of the dash is to reduce the amount of damage you will take from a reaction, giving the player a more interesting decision while moving around the gameboard. There are currently no reactions to enemy movement an until there I refactor the reactions the dash it will just an expensive move.

Peak ☑

Peak is another feature that won’t really be useful until the reaction are refactored in the next version. To try and give the player more information on when to use a dash and when to use a regular movement I added a peak that gives the player some additional visibility. This will hopefully allow the player to use regular movement most of the time and dash strategically.

Tool Tips ☑

While icons can give the player a general idea what each action does, I want to make sure the player will understand the more subtle effects of actions. Like how dashing will avoid or reduce damage from reactions. Similar to other games I implemented a Tool Tip so I can add a detailed description to each action.

Fix flickering reactions ☑

You probably saw in the previous images that highlighting reaction tiles is broken. They use the wrong color and flicker after you hover over them. I originally thought I broke this while fixing the secondary tile highlighting in the previous version but it turns out the the frames where not tagged correctly in Aseprite.

Load a previous game ☑

While working on v0.5.0 I came across a crash bug where too many saved games had been created in the database. Every time I started a game and then quit, it created a saved game in the database. Eventually I hit a limit and the game started to crash every time I started a new game. To prevent games from building up I added the ability to resume the previous game. If you didn’t play to the end the game loads and plays like a replay then lets you continue to play to the end. If you choose to not resume your previous game then it will be deleted.

Button Text ☑

One bug that was bugging me was the text on buttons wasn’t centered and didn’t move when you pushed the button. I created a second object to go on top of the button and move the text when the button is pressed. This may be a bit overkill but the button class is a little big and I don’t want to make it bigger.

Control Console Coloring ☑

To try and make the Tool Tips and the Control Console feel more unified I tried turning the number on the action counters pink. I can’t say I really like the result. I’m going to change it back for now and try a more comprehensive redesign later.

Dash VFX ☑

I’m starting to play around with VFX. I’m not really happy with the result but it is a start.