On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Willow's Crest Devlog

A topic by Caliber Mengsk created Aug 02, 2019 Views: 589 Replies: 7
Viewing posts 1 to 8
Submitted (1 edit) (+1)

So, I was just made aware the low res jam was happening again. I've decided to use the whole time this time instead of just one weekend like I've done in the past XD, though I may have to devote a lot of time to a subcontract that I've agreed to do. That's a different thing though, so I'll start off with what I've done this first night. I guess I should say a few things about what I'm using and such first.

Art: Photoshop (any pixel editor would do, I just happen to use photoshop for work and such, so I already have it.)

Engine: Unity 2019.1.10f

Capture Software: Screen to Gif for gifs, Xsplit for video (have a license, so no watermarks, and it's so much more performant than OBS.)

Extra Assets: 2d pixel perfect camera from unity, Tilemaster tileset placer from the asset store (old tool of mine)


Tonight I did some arts and some extremely basic player code. After running around for a bit, I decided I want to make a dash and attack, boss only type thing. This should simplify what art is needed while limiting code for powerups and ai. Right now for placing the tiles in the tileset I made, I'm just using my good old Tilemaster script I wrote a few years ago. A few small updates for it were required, like adding a button for disabling the painter (before you could just close it and it would stop, but it keeps running in newer versions of unity), but there's also some limitations to it. For instance, you can't paint a prefab, meaning you can't paint things with animations or scripts or non-square colliders. I may update Tilemaster's code to help with that if I feel like it, but probably won't due to time limitations.


Anyway, Today's art was the basic "village" type of tileset and a basic walk in left/right/up animations. Past that, I made an animator and a basic player script to move around and get a feel for what I want. All of the art is 8x8 tiles. This means that the tile grid that you see on the screen will also be 8x8 tiles. I MIGHT change things later to where things are 16x16, but that'd really only be 4 tiles on the screen and may limit how large things can be but still fit on the screen. Anyway, for now it's just 8x8. Again, first night, only about 2 hours of effort, made art and code, so..... Not a ton to show, but I did make a gif for people to see progress. Oh, also made a little poof cloud. Will be for dashing, and maybe if things get thrown around and such.


Submitted

Amazing, looks great! For 2h worth of work that's pretty cool. Looking forward to seeing the finished product :D

Submitted (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?

Submitted

Update for day's 3 and 4

On day 3 I added in the basic slime enemy and added a bit of dirt into the tileset. Works pretty decently. Day 4 though, I have added in dealing damage to both player and slimes. Slimes can die, player can not.


Slimes

The slimes are just be basic non-fancy slimes from almost any fantasy type setting. I like the motion I got with them. Rather than being constant, they jump. They have a random delay for how long they take to jump and they also have a random strength to how far that jump takes them. I like this more than the normal rolly/sliding slimes. They have a great feel and makes it hard to predict them. 

Damage Dealer

So when dealing with projectiles (weapons that don't instantly hit), I generally make a script like what I've done here. The same script that's on the fireball (deals damage to enemies, not the player) is the same script attached to the slimes (deals damage to the player, not other enemies). This script sends a custom class object that stores how much damage to send, and the position that damage is done. Sending the position is super useful for making the player get pushed away when taking damage. I'm just doing a broadcast message to whatever object the damage dealer collides with. 

Fireball

The art for this will probably change. At the moment I tried to do a grayscale image hoping it would look decent. I don't actually like the fireball in any color I've put it, so the art will probably change, or it could become daggers or arrows, or something else. Just wanted something to show damage being sent out.

Layer Indexing. Things go in front of and behind other things.

So the fireball, slimes, and player are all on the same layer, layer 1. Because they all move around, I have a very simple script that takes the y position divided by 10,000 and set that to the z position. Why? Well, the way unity does things in 2d is it puts things in order by it's order in layer. Anything lower than something else is rendered behind it, kinda like it's own z-axis, but it doesn't matter where in z that object is, it will ALWAYS use the order in layer first. THEN you can set the z position. Things with a positive value are rendered as "further away" or behind other objects in the same layer. This might sound odd, to have two z-index's for rendering, but it's actually VERY useful. Why? Well, I'll explain the way I have things set up. Right now everything that can be walked on is on order in layer 0, meaning behind everything. Then everything that moves around (player, slimes, fireball) are on layer 1, and everything that is always going to be on top is on layer 2. The tileset painter I use (my own tilemaster extension) paints into the order in layer that is it's layer number. This makes painting tilesets with multiple layers much easier.


In Closing and What's Next?

Anyway, my brain is kinda fuzzy and numb at the moment, since it's a bit past midnight. It's getting there, and in most weekend jams, this is probably about as far as I would have gotten with this being a solo project for me (well, except music). So, I may start trying to think of story. Since I have message boxes, it would make sense to have things to do and talk to/read in the world. You know.... the whole "game" thing. If I can't come up with story, it will probably be more art or enemies probably. No specific plans. :D It's nice to be at the stage of "minimum viable game" with almost 2 weeks left in the jam :D

Submitted

Update for Day 5

Didn't do much today, but I wanted to get "something" done, so I added in some bushes, grass, and water.


Every Little Bit Helps

So, I kinda slacked today, yeah. BUT I did do SOMETHING, which is important. Even if it's something small, it's important to get just a little done. Keeps you in the correct mind space while not stressing you too much.

Submitted

Update for Day 6

Did quite a bit today. Added in a lot of the basic sound effects, fixed a few bugs, made the slimes be random colors.


**Note: Smaller image due to file size restrictions on itch image posts.

Try the current build: http://randyphillips.cf/lrj-2019/

Sound Effects

There are now sound effects for the player attacking, taking damage, and dodging. The slimes also have a jump and take damage sound. No death sound yet. It's amazing how much just adding in sound effects and music can add to the feel of a game.

Bugs

There were a few small bugs I had to fix. First was being able to attack while dodging. Not a hard fix, Second was that when you attacked, the move direction you were going stopped taking input, but you kept moving the way you were attacking. Now you just freeze in place when you attack.

For slimes, taking damage was stopping the jump animation if you hit them mid flight. This gave a similar issue to the slimes as the player had when attacking. They'd stop animating the jump and just keep sliding. While stopping the animation is not normally a problem, the jump animation called an event through the animation itself, so stopping the animation early broke things. The fix was to do the damage "animation" (which is just changing the color back and forth) on a new layer in the animator controller. I think a LOT of people don't really understand the animator very well. It's a good thing to pick up, so watch some tutorials if you haven't messed with it much.

Random Colors

The problem is that the animator can do some weird things also though. For instance, I just autokeyed changing the frames of the animation like any normal person would. Problem is, since I didn't specify the sprite specifically, it seems unity takes an instance of the sprite renderer and applies the entire value of the sprite renderer. What's that mean? That means even though I was changing the color of the sprite renderer on start in code, it was over writing the new color. I got around this by applying the color in the late update every frame. Didn't seem to do anything performance wise really, but is hacky. This also broke the animation for taking damage that I just got working. Luckily in code I already have a flag checking to see if the slime is taking damage, so it's just adding an if statement.... still annoying though that I had to do the work around in the first place.

What's next?

After adding in all the animations, art and sound effects to what I have so far, I'm really starting to feel a world coming out of it. One with people walking around that you can talk to, quests to do, etc. Again, starting to feel much more like a game. I think I may add an npc soon, maybe even just taking a day to make a bunch of art for a bunch of npc's and try to come up with unique people. Anyway, that's it for today. Enjoy!

Submitted

Day 7, 8, 9, 10

I did some work last weekend and never really talked about it. I don't remember specifically where I left off, and it's kinda late (1:30-2am), so I will inevitably forget something I added.


Dungeon Tiles

I made some basic dungeon tiles. Not a ton to talk about here. Just some arts that I did. I decided purpleish seems pretty dark and evil feeling, so it's filled with purples and darker pinks. Don't know how much I'll have time to do the dungeons since after sleeping I'll be down to like 8 hours left.


Transitions, timing, and doors

I added in a basic door system. When you walk into the trigger for the door, it sets a value in the Game static object that doesn't ever get destroyed. What it sets is the target door's id. Each door has an ID and a spawn offset. When the level has been loaded it sets the player's position to the door's position plus the offset. I also display where the offset will spawn the player so it's not so much a guessing game. This allows any door to be at any angle/position.

I also made a basic fade transition. When adding this, I had to add in a way to pause the action of the game. The reason was when the player hit the door and it faded out, you could get hit by slimes. I decided to make it pause everything so that you can't be hit while it faded in and out. There is a problem with just changing the timescale though. Invoke (which I like to use for timing things, such as the fade out speed) is effected by time scale. So I had to write my own timing system using Time.unscaledDelta. Not a major problem, but a thing to note.


Coins

Not sure how much I'll be able to implement the coins. I'd like to build a shop for you to be able to buy max health, healing, max stamina, the ability to dodge, ability to shoot fireball (replacing with a basic punch or sword attack or something). Wasn't too hard to add, just a trigger with some animation. If I had time, I'd make them spawn over time so they didn't all animate at the same time, but meh.


Health and Stamina

I also added in Health and Stamina bars. These display a percentage of what it's displaying. If/when I add a shop for the stamina, it'll just be changing the max value of the stamina on the player. That simple. You can only dodge or attack if you have the stamina built up.


Menus, Title Screen, and Saving

There is now an in game menu that has a whopping 3 options. Resume, Save, and Exit. Resume just exits the menu, save.... saves, and exit takes you back to the main menu. The saving will be pretty simple, just saving a text string with the important information, last door the player went through, the map name you saved on, player health/max health, max stamina, and coins. At the moment that's all that's important. "Theoretically" even the slime being killed will be saved. Right now all slimes have an autosave when they are killed. I'll probably remove it from some so that you can leave the room and get a little extra money by killing things if you want.

Past that, my brain started to turn to mush due to the time of day it is. So instead of code, I made the start screen and started on the main menu. I did the art and placed the menu text on the screen. I would "like" to animate it, but as I'll only really have 8-10 hours depending on when I get up, I probably won't have time since I don't have a fluid set of levels or a boss atm.

To Do List

I made a to do list of bare minimum, and I did tick off a few tonight. Not sure how much this will really be a complete game, but I'd like to add in at least some hazards to the dungeon, a boss, and letting you walk through the different levels. (Dungeon, willow's crest itself, willow's crest lake, the path between willow's crest and the lake, and the boss room) Anyway, here's the list, and I'm taking off for the night. Hopefully I'm not too tired when I wake up.

Needs:
Boss
Make sure save/load is implemented
Main menu
continue (only visible/option if save data exists)
new
exit

Wants:
Story
sword attack instead of fireball
Shop art
buy stamina
buy health
buy dodge
buy fireball
dungeon hazards
extra enemy
Health pickups from enemies (5% chance?)
Animate start screen with an intro panning up and parallaxing

Submitted

This is looking amazing! Can't wait to play your game :)