Day4’s objective were a bit different. The goal was to make a game using the awesome Grids plugin made by the guys at Gamelogic. Gamelogic is the company that posted the original 30 games in 30 days that made me embark on this 5 game in 5 days challenge. After Day1, they emailed me and gave me a copy of the Grids plugin. This is really awesome from them and what else could I do than make a game with it? This game has been made with zero-prior experience with this plugin apart from reading the documentation and looking at examples yesterday.
This game has probably been my biggest challenge since the beginning of the week. Starting a one-day game without knowing the workflow of a new plugin is a really daunting challenge.
Day 4 – GridWar
(* The game is Player versus Player. There are currently no AI, you control both Red and Blue player)
This game had to use a grid mechanic to use the Grids plugin. I didn’t really have a design in mind until late in the project. I just played with the plugin until I could generate a nice grid. The shape of cell used in the grid(Pointy Hexagon) was determined by some assets I already had. When making a game in a day, you don’t want to lose time searching for assets.
After I got my grid with textured cell, I settle for a type of game I like a lot that has seen different version over time. The goal is to send your units to conquer cells and capture the enemy castle. I went for a turn-by-turn version instead of real-time to allow 2 player on the same computer.
How I did it :
Obviously, I start by making a grid with the Grids plugin. The grid can be in any shape as long as the cells are Hexagon tile. Afterward, I specify position for both player’s castle and I create the neutral spawner and set the owner/unit value of each cell
When a cell is clicked, the game state change and wait for the player to click on another cell. If it’s an ally cell, half of the units are transfered to the other cell. If it’s enemy, half of the units are sent to try and steal the enemy cell. If the stolen cell is a castle, the game is won!
Lesson learned :
- The principal thing I learne was to use the Gris plugin and how to work with grid in general.
- I had some problem to sort the different layers. Unity2D and NGUI layer can’t be sorted on a same root/camera. You can only put NGUI in front or behind the Unity sprite, not in front AND behind. If there is a way, I’m interesting in knowing it.
- Learning a new API is always a good way to learn different software structure. I learned different things along the way such as the use of IEnumerable.
What’s Left :
I’m pretty happy with the final outcome of the game. I tried to put as much polishing as I could. I’m really happy that I had time to implement a proper menu with different levels.
There are many more complex building that could be added to the game for a better gameplay(walls, structure in a bottleneck that lose unit every turn…). Also, I only scratched the grid shape creation. It is really, really easy to make various complex shape with the Grids plugin. I’ll try to add many more as soon as I can!
Lastly, I feel like adding an IA for this game would be a really interesting topic. The game could also use more than 2 players and easily be networked.
Making a game in 1 day while learning a new plugin has been a big challenge. I’m really happy with the result especially considering how late the actual gameplay has been implemented in the game.
Grids is an awesome plugin that I will use in many games and I would recommend to anyone interested in a robust grid solution.