IslandWar: Animating Turrets

Given that a lot of my game involves turrets attacking and defending, after setting up my water plane and a small height-mapped island in it, the next thing I attempted was to import an animated turret in a way that lets me control its orientation and elevation from code.

To start with, I already used a consistent naming scheme for the bones in all my turrets:

Screenshot of Blender showing my bone naming scheme

In short, all turrets have a bone to change their yaw that is called "Rotor". The pitch of the gun barrels is changed by "Elevators" (there can be more than one in case the turret has multiple weapon arms). Finally, each gun barrel has a bone whose name contains the word "Barrel", i.e. "UpperLeftBarrel" or "Barrel1" and an associated muzzle bone exists named identically but with "Muzzle" instead of "Barrel":

Read More
Logo of the Unity Engine

IslandWar in Unity

I decided to give an old project of mine another try. Back in 2007, after I finished my freeware game Ball Race, I ventured forth to create my first indie title, IslandWar. This is what gave rise to a lot of the classes that can now be found in my Nuclex Framework, including the GUI system that I originally wanted to avoid because I knew it would sidetrack me.

Well, combine some procrastination with a beginning burnout (at the end of 2009 I was certain that I never wanted to work with computers again) and the game was left on hold indefinitely. In the meantime, someone else even published an iPhone game by that title with a very similar concept, so that means I’ll have to find a new title if I ever publish this game.

Unity 3D Logo

Since I originally started working on IslandWar in XNA 1.0 Refresh, several XNA versions have come and gone and Unity, which I already reviewed favorably in 2007 has now gained Windows authoring support (it originally was MacOS-only) and sports a free basic edition. So given the choice between updating all of the game’s code to XNA 4.0 and SunBurn or porting it to Unity, I decided to give Unity a try.

So these are my first steps in Unity. Try not to laugh too hard :)

Read More

Island War Day 7

Today, I’ve got some new screen shots! Read on :-)

Over the weekend, I implemented proper camera and terrain selection controls. Getting keyboard, mouse and gamepad working at the same time proved a bit of a nightmare. PC RTS players will expect the arrow keys to move around their view and the mouse to be usable as a selection tool. XBox 360 RTS players need some way of telling the game where to place buildings, but the gamepad isn’t suited for this task as well as the mouse is.

So I decided to split my terrain into a regular grid in which a terrain cursor can be moved. The grid is in units of 3×3 terrain quads, which allows me to add some detail to the terrain on the sub-grid-cell level. Otherwise, it would look fairly obvious to the player that the terrain is based on a heightmap with regular X/Y samples.

Screenshot of an island with flak buildings intercepting an incoming missile

Read More

Island War Day 6

During the past week, I got missiles working to a point where they will launch, gain altitude, head towards their target and dive for the attack. They will damage the island (which means scraping off texture layers and possibly alter the terrain, not sure whether I want this, however). Buildings in the vicinity are then destroyed.

For the missile trajectory, I went for the simplest thing that could possibly work:

  • Until the missile has reached its cruise altitude, it will ascend at a 45 degree angle. If during this phase, missile closes in to the target so much that it needs to start diving, the diving phase will be entered.

  • Once at its cruise altitude, the missile will simply fly in a horizontal line towards its target. If the missile gets closes enough to its target, it will enter the diving phase.

  • In the diving phase, the missile accelerates to maximum speed and descends towards its target at a 45 degree angle. Once it hits the ground, it explodes.

Read More

Island War Day 5

Last time, I wrote about how I set sail for the Island War project and how my motivation faltered slowly over time. And I promised to write a follow-up post that explains how I believe to get back on track and finish development of my Island War project. Well, here it is, folks!

I see the primary reason for my loss of motivation in my tendency to write and fully implement systems instead of just the piece of code I need. While I knew that I had to “write a game, not an engine”, I still fell for the same old trap: I didn’t technically write an engine, but I started to design entire systems and fully implement them when all I needed was a small routine to get the job done.

Read More

Island War Day 4

It’s baack!

Slowly, the Island War project begins to grind its wheels again. Time for a review of what’s happened so far. When I started this project, I was still intoxicated from the successful completion of my just-for-fun project “Ball Race”. I was eager to build a real, full-blown game taking no shortcuts and doing everything in the best way imaginable.

This turned out to be a real time waster and motivation sapper.

Read More

Island War Day 3

I decided to put some work into creating an editor that I can later use for building the levels and perhaps even include with my game. XNA gave me a hard time getting it to work inside a Windows.Forms application and I had to rewrite several of the XNA classes until I had a properly working XNA UserControl allowing me to render my game world inside the editor window.

Screenshot of a height map editor with dialog controls and a tool panel

Of course, the editor had to look modern and neat, with dockable panels and color gradients all over the place. As it turned out, there is no built-in solution for docking windows in the .NET Framework, so, given my plans to release the game’s source code, I had to find a solution that was both free and provided a decent user experience.

Read More

Island War Day 2

I know, as always, I’m a bit late with updates, but just in case you don’t know yet, the Microsoft guys finally opened www.xna.com. Finally, a complete website dedicated to XNA instead of the cramped MSDN section!

The developer area has been moved to http://creators.xna.com, including a wealth of tutorials and a revamped discussion area.

This weekend, I tried finally getting texture splatting to work for my Island War terrain renderer… and failed miserably :D. Look for yourself:

Screenshot of a height-mapped terrain with lighting and textures

There’s a lot of tuning to do until this crappy… something… looks like believable terrain. I’m not aiming for photorealism, but I’m not settling for a surreal landscape that stands out like a children’s painting would in an art gallery, either :)

Island War Day 1

Alright, my next game is finally on its way. The game’s working title will be “Island War”, which describes the setting of this game pretty well: small islands at war with each other.

And it won’t be like any other strategy title you might have played. I’m planning to remove the tediousness from the RTS genre by getting rid of micro management and unit placement.

I decided to try a different approach to the design of this game than I did with Ball Race. Instead of creating several GameComponents (like SceneGraph, EffectManager and GameStateManager) and spreading the game’s logic between them, I’ll try to model the game world in an object model designed for convenient use, so I can later set up my levels and launch the game with just a few lines of code.

Screenshot of a shaded height-mapped terrain without textures

The code so far incorporates an asset management system, the entire world expressed in an object model with load/save capability and can render dynamic height-mapped terrain allowing for real-time terrain deformation by explosions and other influences. I haven’t written the actual shaders yet, so this will look much better once I can get the shaders going.