Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags
(1 edit)

Update for day two!

Added in the roll/dodge mechanic with a bit of dust poofing while you do it. Also made a bitmap font system and a message box system (using the bitmap font system). I wouldn't doubt unity has one built in or something, but meh. :D This one types out and has a waiting arrow like the good old rpg's always have. Here's the game's state currently in gif format.


Now for more technical bits.


Text and message box

This is the first time I created/used a bitmap font like system. The script itself has what I called a Character map, which is just a string of all the valid characters. After that is an array of sprites. The index of the sprites corresponds to the character map. This means I can do a simple "indexOf" on the character map and that gives me the index of the image to be used from the array of sprites. Kinda simple right?

For the message box, I can have a maximum of 12 characters per line. If I type more than that on a line, it goes to stupid mode and just types characters, so will continue on the next line automatically. This "shouldn't" be done if I set up the scripting right. It also automatically fills extra spaces on the end if there is a new line. This is to keep the count accurate when generating the next line.

The message boxes are also typing out through a coroutine. I did this so that I could set the timescale to 0 when a message is being displayed, and set it back to 1 when it's done. This will allow conversations to happen while in battle or if you pick something up while in battle that shows text. I don't know that this will be required for the jam really, but it's in place now, so :P

Lastly, the message box can be called as a static function from any script. There are a few things you can change also. You can change the typing speed as well as the font and background colors. The idea is to allow for changing the color/speed for different people.


Dodging/Rolling

I added a simple 3 frame animation of the character rolling. I decided the up direction didn't need different art, so all rolling directions are the same animation. While it's playing the rolling animation, every .1 seconds, I create a dust cloud object that deletes itself after a second. Rolling also forces you to keep your direction and multiplies it by the speed you were going. There's a very short acceleration when you start to walk, and if you hit the roll button while in that acceleration, you will only multiply by the current speed. This means if you don't time your movement to already be walking at full speed in any direction, you won't get as far. I can change this, but I don't want to. I want to be able to get partial directions, instead of just the cardinal directions and diagonals. Feels more real this way. 

You also stop if you roll into something, but if you are already hitting something and roll, you'll keep rolling until the timer runs out for the roll or you hit something else. This is so you stop if you hit a wall, but keep moving if you are already against one. The idea behind this is to have obstacles like rocks, sticks/stumps, puddles, etc while fighting things. Making you be a bit more careful to not get stopped by what you hit.


Time

I only spent around an hour to do the dodging/rolling, and spent around 3 hours to do the bitmap font and message box system. So, that means the total time spent so far is about 6 hours so far. I probably spent way to much time on the message box system, but I wanted to be able to add story if I needed. I should also note that I am not counting time writing the dev log posts (which is taking a decent amount of time) or time to take gifs/screenshots.


What's next?

I'll probably work on a basic enemy (slime or something), basic player attacks, and both enemy/player health next time I work on it. (Tomorrow?) Let me know what you think of the game so far! Also, any suggestions for the name of the game?