Dev Log 3 - Task System & Pixel Art
Pixel Art
I decided from the start that I wanted to create every aspect of the game myself, and this includes the art. Since I have a soft spot for pixel art games, and it seemed possible to learn, it was an easy decision for me. Ever since I have been learning how to draw pixel art using Aseprite, a (highly recommended) tool for drawing pixel art. Following YouTube guides from various YouTubers (mainly AdamCYounis), while playing and really investigating closely into my favourite pixel art games and how they draw/animate things.
With tons of practice and references later, I created my tileset, then villagers, then trees, resources and so on. I am consistently drawing more pixel art over the development process, and this can be a time consuming process. This development chunk for example has been filled with a lot of new pixel art: bushes to forage, new villager animations, even particle effects. I've come to really enjoy creating pixel art, its simple yet surprisingly complex, a single pixel can make the difference between tricking your brain into seeing movement. Its also enjoyable to see the different pieces come together knowing everything was drawn my me, and I'm starting to see my games art style develop.
I want to highlight specifically the Villagers in my game which are made of three layers, the base body layer, the role (or clothes) layer, and the hair layer, which are all interchangeable allowing for highly customizable characters. Which should hopefully allow for some diverse families of villagers each time you play. This also allows for a villager to swap their role/clothes whenever needed. However making these characters requires a lot of work, and has been quite time consuming, as each time I need a new animation I need to create the animation, then replicate it for every role and hair also! If I want a new villager role, I'll need to create every animation for the role, a new hair, all the animations with this hair, etc. I *think* that all this work will pay off when playing the game and having a nice community of villagers with real personality and differences (or family similarities).
Thankfully I have saved *some* time for the hair colour and skin colours by using shaders. Every hair sprite is in the exact same colour pallette (a brown hair), and same for the 'body' layer is always a white skin colour by default. Then using the shader I have created I can swap the entire colour palette out with another one, allowing for many hair/skin colours. This has saved me time by not having to add hundreds of sprites/animations for each colour.
Here is an example of the colour palettes, the brown one being the default, as shown below, the default sprites.
We can then trade the palette for the ginger hair palette and the hairs update across the board.
Tasks & Commands
Finally some proper gameplay. The core of the game in fact, how will villagers move, be commanded by the player, and how will their AI function? After putting in research to many different ways, from state machines, behaviour trees, task systems, and testing them out in godot and how they would function for my needs. In the end I decided on a Task System which would hand out tasks to idle villagers as the player requests them. Each task would have a list of commands that would need to be complete before the task was considered finished and the villager would move on to something else.
Here is an example of a few tasks I've created, with all the animations, particles, art, etc!
Gathering (Grass, bushes etc)
Gathering fruit from a tree
Chopping Trees
Mining Rocks
Deposit to Stockpile
Building System
This leads on to the next vital part of gameplay that I have been developing. The building system, I toyed between static sprite houses that the villagers would 'disappear' inside when entering, or visible grid based houses, where you could see inside, with wall layers (think the sims, putting the walls up and down). I decided to go for the latter as it was in line with my core principal of small-size villager sim, where you really get attached to each unit. Allowing as much player freedom and customization when creating buildings will promote re-playability and will result in each player having a unique style village they can take pride in. This also allows for furniture, and all sorts of fun gameplay inside the house, eg allowing beds to be used for sleeping, illness, recovery, etc.
Now that I've developed the selection box, and in turn building placement, I have created the first createable building, the house! It shows the flexibility I'm aiming for with the buildings, and sets the ground work for the code to reproduce for other building types.
(It was difficult to fit these into small GIFs but here we go)
First you drag an area, being given a nice template to show what it will look it, then you place a door, this can be placed on any side.
Then the 'Building Site' is created, a fenced off area, where your villagers will begin working to create the house.
Firstly they will move the required resources over to the building site, then once that is done they will start construction,
until finally the house is complete.
I think it turned out pretty great, I am happy with how flexible it is, and how good it looks considering its flexible! Some other features were created while making this, such as UI hover tips to show the consumed materials, and a lot of work on Y-Sorting the villagers vs the house tileset vs the trees etc, oh and dont forget the door animating when villagers go through it!
Conclusion
All of the above development is of course very work in progress and doesn't relate to the final product. I'm sure there are tons of bugs to be found! But now that a lot of the core gameplay mechanics are in I can create further content easier by expanding these features. i.e. more buildings, more things to gather, more tasks to create etc.
I decided next would be important to get some vital UI screens in, and that's what I am working on to this day. Here is a sneak peak at next devlog, UI I've been working on, the Target Panel when targeting a villager:
Thanks for reading, and happy developing! Ant
Village Chan (dev title)
Villager Simulator with harsh survival mechanics
Status | In development |
Author | Ant |
Genre | Simulation |
More posts
- Dev Log 2 - Map GenerationFeb 17, 2024
- Dev Log 1 - Goodbye UnityJan 30, 2024
- Dev Log 0 - Game ConceptJan 12, 2024
Leave a comment
Log in with itch.io to leave a comment.