Friday, March 15, 2013

Update 9: Destructible Terrain

As I worked through the shooting mechanics and really got ray casting to work properly, I suddenly found that I couldn't shoot my enemies. I was initially perplexed, but then quickly realized that everything was working perfectly: the shot was hitting the cover (wall) in front of the target. 

It was time to implement destructible terrain.  


Part 1: I aim an the enemy on the far right. He happens to be under cover, so my shot hits the wall in front of him.



Part 2: The wall currently only has a HP of 1, and my laser does 1 HP of damage, so the wall is destroyed. With the wall gone, the enemy is exposed and can be hit easily. In the current prototype, characters have 3 HP, so just 3 more hits from the laser and he will be dead!



Friday, March 1, 2013

Update 8: Randomizing the shooting and adding health (and death)


Now that I had a basic level with shooting from point A to point B, I needed to add some randomization. I personally don't like games of attrition, I prefer games of skill, with some luck.

Enter the random number generator. Basically I pass in 2 numbers, a chance to hit percentage, and a random percentage  The two numbers are compared, if it's a hit, no problem, if it's a miss, I created some random variation so that the shot misses and goes off into the distance.

I spent a bit of time trying to create a random shot until I discovered the Random.insideUnitCircle function. Basically I can multiply a variable against it to have it select a random position around my target, which I then just add to my target position.

Finally, to get everything working, I decided to create a test level. I setup a target, with a wall behind it. It works pretty well and is another item I can cross off the list.



Friday, February 15, 2013

Update 7: Pathfinding

I need to be able make my players move from point A to point B, avoiding any objects on the way. This is basic pathfinding. Pathfinding is one of those simple features that seems to be difficult to do properly. There are plenty of games that just don't quite get it right. Taking this into account, I knew I wouldn't be writing mine from scratch.

I analyzed a number of different tools, before selecting the A* Pathfinding Project. I found this project both really simple to use... and difficult to use. The primary problem I was having was that my character was stopping half way towards his destination. The sample wasn't quite right and I pulled my hair out for a few days, still unable to get it to work. 

I added in some basic movement, but my player kept hitting walls and falling over (shown below). While hilarious, it wasn't the result I was looking for. It turned out to be a physics problem. While my pathfinding is not complete, I was a good introduction and I did have some positive results (not shown below).



Friday, February 1, 2013

Update 6: Shooting

With a basic level, it was time to work on shooting. First things first, I had to get rid of the soldier model I downloaded. Instead, I transitioned to a simple, blue cylinder, my player object. I then created a few red cylinders to represent my enemy objects. 

Next, it was time to actually shoot. I started with a laser, mostly because instead of having to deal with an object moving from point A to point B, I really just have to draw a line. Later I'll work on getting animated bullets and missiles to be fired. Creating the laser, with a line renderer, was refreshingly easy to setup.  

With a laser, a source and a target, I was ready to shoot! I created a little function that scanned the level looking for objects of a certain tag type ("Enemy"), and used that to dynamically create shoot buttons, to target each enemy.



Friday, January 18, 2013

Update 5: Starting the Engine Prototype

With a basic plan, and some knowledge of the Unity Development Engine courtesy of some online training programs, a few books (see references at the bottom of the post) and some videos, I'm ready to start the engine prototype. The goal of this prototype is to have a basic turn based game. No fancy effects, just a 3D map, with player and enemy objects that can move and shoot each other.

With this is mind, I created a short work plan with a list of tasks that would have me building the prototype in a few months. I know that much of what I will be developing will be brand new and slow. Shooting, moving, path finding, object selection, map building: it's all going to be a new adventure. 


So far, I've been able to replicate the same basic prototype level I created in Google Sketch-up and added a camera to examine the level. I wasn't 100% happy with the result, but I also had to look back at it and say “it’s OK, lets look at this more later”. It just seemed to me that I started with this powerful graphics engine and made things look so… BUDGET, by making it into an isometric view. I can see myself definitely going back to a Perspective view soon.

But lets look at the positives. I created a level. I added a camera that could scroll and move. I then downloaded a free model that had WASD movement (with keys) built in. It even shoots... It was progress. Next I'm going to add some enemies and some basic shooting.

Friday, January 4, 2013

Update 4: Pre-Production

Although it sounds like I've just started, in actual fact, I've been working on this game for the last year. I started by doing market research into 4 of my favorite games in the genre, as well as general information about the video game market in general. I've collecting feedback from online forums and created lists of what worked well and what didn't  The announcement at the beginning of this year of XCOM: Enemy Unknown by Firaxis was an interesting development, as I could tell from a lot of interviews that they went through the same process. I was also excited with the innovations they made with the turn-based tactical role-playing strategy video game genre. With an renewed active community in one place, I was able to collect extra information about what did and didn't work in the original 1994 XCom.

Based on this, I then looked back at the last 30 years, looking for trends. My initial idea was to create a zombie apocalypse game for a few reasons.
1.    This was my first game and I wasn't sure I could build a good AI. Having zombies would help with that.
2.    Zombies seemed like a popular area to develop for.

Over the period of the year, this all changed. Suddenly zombies seemed to have reached a saturation point. I kept telling myself that the story didn't matter at this stage until I had an engine, but half of me was conflicted, knowing that if I didn't know exactly what I would build, I would not have a sense of accomplishment (e.g. I've completed 20% of the game!).

In the end I came up with a few alternatives, all wildly different.
1.    American Revolution. Muskets and Indians and such. The slow pace of muskets would be ideal for a turn based game.
2.    Space Marines. Set a few hundred years in the future, with aliens (very similar to the Chrysalids who I think are fantastic and one of the most interesting units in the game) and space travel. Think a combination of Starship Troopers/ Aliens.

I’m torn on direction, but as I mentioned earlier, at this stage of the development, I have plenty of time to still to decide.

Here is what I know
1.    I need a basic engine that will allow me to load levels, move characters and attack other characters. I need (at least partial) destructible terrain.
2.    Once I have this, I can start putting together a story and levels to support the story, as well as a simple 'strategic layer to create story around each of the battles.
3.    The idea is to create 3-5 levels into a short, tech demo. I could even call it “Episode 1”. The Walking Dead recently handled Episodes very well. The tech demo will be very linear from the over story point of view, but of course the tactical game will have plenty of choices which I hope will balance things out a little.

Based on this, I started to design a few tech demo levels in Google Sketch up, an excellent tool I had used in the past. The idea of my first level was to show multiple levels, allowing me to build in destructible terrain, cover, and path finding into the initial level.


Friday, December 28, 2012

Updates 2 and 3: Game Engine Selection


With my years of software development experience, more recently a masters in Engineering Management, and a few years’ experience managing teams of developers, I feel I have the right mix of experience to dive into video game development. I figure with my experience playing and my ideas about what is good simple fun, I can make a good game. I made some early decisions straight up. I will develop for the PC, but will use an engine that is cross platform if I decide to branch out - most likely for iOS.

I’m currently leaning heavily on the Unity engine, with half an eye on the Unreal (UDK) engine. Knowing that the engine doesn't really matter for me at this stage, I've completed some market research and a basic design for a tech demo, with 3-5 levels turn-based tactical role-playing strategy video game I will build from scratch.

I looked at a number of game engines (Unreal, Unity, Gamebryo, open source tools, etc.) and ended up choosing Unity for a few reasons:

  • Multi-platform (PC, Mac, iOS, browser)
  • Free trial copy, permitting a quick prototype of the game, upgrade-able to a Pro version, which includes high-end game engine features (that I probably won't have to use for a long time)
  • Level tools adapted to an open sandbox game (unlike e.g. Unreal)
  • Ease of use of the C# coding language (which I've been using for many years in my real job)
  • Instantaneous compiling for test and workflow

Now I've ordered 2 books and signed up for a few training courses to learn more...