Creating games in WPF might be nice - as I was already familiar with its features, due to its extensive usage in my daily work. I knew however that sooner or later I would have to learn using some kind of "real" game engine - just to explore what kind of features I am missing, and to change my mindset (obviously the way in which one designs and creates an application using a game library/engine differs from the more business-related approach in WPF).
As there is no better way of learning a tool than to create a clear goal that needs to be accomplished using it, I've decided to join the 1 Room RPG Jam, and to use Unity Game Engine for the project.
I have a month to submit a game that would meet all the criteria, and these are:
- Entire gameplay is contained to one room
- Game must have 3+ interactive objects
- Game must have functional inventory system
- Gameplay must be 5+ minutes
- Game must be appropriate for audiences under 18
After couple of evenings, I already have something nice to show and talk about. The idea that I am aiming for is simple: we're dealing with 2D, tile-based room. Some of its tiles are passable, some are not. The gameplay is turn-based. The player controls one character, which is able to move around the room using similar approach to the one present in the new X-COM games.
Movement mechanics in action - xcom style!
I used some old A* implementation that I used in one of my previous prototypes and it worked out pretty well. It does impacts the performance when calculating all the possible fields that the player can reach. I basically run the pathfinding for all the map tiles in the player's range, and it takes around half a second. Luckily I only need to perform such calculation once, at the beginning of every turn.
There are hostile characters present in the room. During their turns, they either try to approach the player and attack him, or to enter a field in which another hostile character is standing - and then they combine into a stronger enemy.
Two weak enemies combine into stronger one, after they took their turns.
After each turn, a new enemy (of the weakest type) appears in a random part of the room. The player needs to destroy all the enemies to finish the game successfully. Currently only a direct (melee) attack is available - so when the player is standing next to the enemy, he can try to attack it. I still need to re-think the way in which these attacks should work like (whether there should be a % to hit - to introduce randomness - or to make these attacks to hit all the time, to make the gameplay more predictable). I guess I will write more about the combat mechanic in my next blog post.
As for learning Unity, it looks like I do not have any major issues with it. Its component-based approach is very clean and efficient. I can still use Visual Studio to create code. The only major issue I've experienced so far is about these artifacts appearing in some resolutions:
Surely there is something that can be done to eliminate these funny lines...
Anyway, that's it for now. Hopefully I will be able to write something extra about the combat system next time!
Interesting idea for a game.
Truly like that you advertised the gamejam! Thinking about going at it too.