Thursday, November 22, 2007

Direct3D

Yet another screen shot of Dragon Siege?

But wait!
I can see through the income - expense scroll!
Yes! indeed you can.
This is one of the free and quite common features available when using 3D hardware to render graphics.

Yesterday I've incorporated Direct3D support for Dragon Siege. The Direct3D details are abstracted behind the graphics subsystem interfaces, so Direct Draw can still be used by simply changing the implementation behind the graphics subsystem interfaces with the Direct Draw abstract factory. However I think the support for Direct Draw will be removed in future. There are no convincing advantages of using Direct Draw over Direct3D.
  • Direct3D has a lot of extra features such as rotation, alpha blending and scaling.
  • The Direct Draw .NET API is deprecated.
  • Direct3D is a lot faster than Direct Draw since the hardware GPU reliefs the CPU of some processing
OpenGL support will definitely be added in the nearby future.

Using the 3D hardware unlocks a great number of possible features in Dragon Siege. Some of these features were imperative for the progress of the game play in Dragon Siege.
I name but a few:
  • Large variety of monster colors and sizes
  • Proper coloring and identification of player units and buildings
  • Semi transparent effects and lighting effects
  • Use of alpha anti-aliased sprites
I'm excited to take on these features!

Monday, November 19, 2007

Parallax Backdrop

In the typical strategy game the top of the map usually ends off unnaturally with plain blackness or an abrupt break in the foreground scenario.

The screen shots of Atu'los online inspired me to end off the top of the map with a parallax backdrop.

I've collected a few suitable panorama scenes for variation and made them tiles.
I know I shouldn't gold plate when there are more important outstanding features, but hey I had to kill an hour or so :)

Tuesday, November 6, 2007

Double Dragon Deluxe

Here is a screen shot from a game Called "Double Dragon Deluxe" I developed during 2006.
During end of 2005 I gathered a large database of sprite animations from various commercial games. I decided to write a game similar to the famous game Double Dragon. My version of Double Dragon includes graphics from a large variety of fighting games.
Double Dragon Deluxe is also a multiplayer game, where a large number of Players may join. A player may join either as a "Hero" or a "Computer Controller Player". The game will randomly assign control of enemy avatars to computer controller players. This makes the game quite difficult and interesting for the "Hero" players.

Game characters can also wield weapons of different types: sword, baseball bat (as wielded in the screenshot), metal pipe ...

Heroes gain Experience for successful attacks. A hero can use this experience to upgrade attack moves. For example, upgrading the punch attack will increase the speed of punching, add stun effects to the punch move and more damage. Upgraded attack moves have added visual effects.

In the screen shot you will also note some weather effects. The game engine supports area sounds and area weather effects. If a player gets closer to an area marked with these effects, the effects will increase. Such as, rain will start pouring harder, or sound becomes louder.

The game world consists of different areas. Each area consists of 2 dimensional polygon sectors with height attributes. These polygons overlay graphic art tiles as backdrops. Foreground visual tiles can also be added, for example the lamp post in the middle of the screen shot below.
Each sector can have a trigger. A common trigger is a connection between world areas. If a character walks onto a sector just in front of a door the trigger on that sector will transport the character to the world area inside the door. Sectors can also have a type. The ladder is a good example of a sector type. A character in a "ladder" sector will automatically hold onto the "ladder" and climb around if a player issues move commands.

Problems detected with the networking implementation of Double Dragon Deluxe were improved in Dragon Siege.

I will post a download link to the game some time in the future.
See Downloads
See Double Dragon Deluxe Blog

Monday, November 5, 2007

Game Startup


I had some spare time to create a startup page for Dragon Siege. The startup page eliminates the need to edit a game startup configuration file.

The Multi-player testing was a success and the Engine supports the game very well. I can now focus to improve the in-game features.

Monday, October 1, 2007

Game Lobby


I wish I had more time to develop. I was very busy with other things during the past months.
Well finally I managed to distill some time for Dragon Siege out of my life.

The main feature I added is a game lobby.
In the background you will see a local game already running, while the players are in the lobby.
Each player PC runs a local "demo game" in the background while waiting for all the players to join the lobby and the server to start the network game.

I created a local loop back implementation of the networking layer in order to run a "demo game" on each PC. The networking layer was already abstracted so this was quite easy.

I also had to do some refactoring. Initially the entity representing a connected player in the game was the same as the entity representing the Faction (in game group of units usually allocated a particular color). I split these entities in order to make the game state independent of the players connected.

Thus
  • a game can run without any players connected,
  • multiple players can be assigned to a Faction,
  • players disconnecting does not affect the game state.
I plan to implement unexplored features as well: A player that did not join the lobby before the game started may join a game in progress as an observer, or with permission of a current player may gain control of game entities.

It was a nice exercise writing TextboxControl and ButtonControl classes and handling events in the container Form in a similar fashion as working with Windows forms.

Dragon Siege is on the verge of multi-player testing.

Friday, June 22, 2007

Slaughter

What happens if you have a few hundred blood thirsty sword wielding men and a bunch of hungry small dinosaurs? This is the result of one of the performance tests I ran with the improved unit attack code.

I improved the unit attack code to use path finding to direct the unit towards the target.
Moving a unit towards a target for attacking is different than just moving the unit to a specific location. The target may be moving. The requirements are:

- An attacker requires to track its target tightly.
- The attacker should make use of path finding sparingly.
- A target should not be able to outfox an attacker by doing smart maneuvers around obstructions

The improved implementation adheres to these requirements. The attacker has two states:
  • Tracking the target closely (moving directly towards the position of the target)
  • Following a path
If the attacker's movement is impeded while in tracking mode, path finding is done between the attacker and target and the attacker switches to following a path mode. The attacker switches back to tracking mode when it reaches the end of the path.

Now onto some more features!

Sunday, June 17, 2007

A* Implemented

I had a lot of spare time to work this weekend! I've applied the A* algorithm and it works like a charm.

The implementation itself is very easy. I spent more time considering how to integrate path finding with DragonSiege. I made a list of properties that a good implementation of Path Finding should have:
  1. Only one PC must calculate the path for a particular unit.
  2. The processing of Path Finding must be distributed among the PCs.
  3. The server PC must take the responsibility of the path.
I've decided to run the player-initiated Path Finding on client side and dispatch the path the the server. Here is how it works:
  1. The player instructs a units to move
  2. The player PC calculates the path for the unit
  3. The path is sent to the server
  4. The server starts executing the path for the unit by sending movement commands to the clients. The server takes responsibility for the path. (If the path becomes blocked, the server will find an alternative path and communicate this to the clients.)
I fixed quite a few bugs. No broken windows!

I've also implemented semi-transparency for buildings (see screenshot). Whenever a unit is behind a building the building will automatically become semi-transparent. The semi-transparency is a crucial feature. The importance of this feature becomes apparent when critters attack buildings from behind and the building obscures the critters. You hear chewing sounds, but see nothing!
All modern strategy games have this feature.

Well, next up...
  • Monster Dens
  • First shot at game balancing.
  • Game Startup : Player starting points, player lobby?
  • Multi-Player testing : Should work in theory?