Saturday, October 25, 2008

MoonGate blog goes ( finally ) online

After several months of developing I finally decided to create small blog about MoonGate - my 3D RTS engine based on XNA. XNA looked very promising to me and after reading book Professional XNA Game Programming by Benjamin Nitschke I decided that this will be my Master Thesis topic - exact name of topic is "Application development for Xbox 360" (still working title). There were not many starter kits back then (one and something year ago), and let's face the truth - there are still not many today. 

So I decided to learn more about XNA and shaders and improve my 3d modeling and texturing skills :). I am working on this project alone so time available for MG has to be divided among coding, modeling, texturing, designing and learning. 

I began coding in february 2008 and things implemented so far are :

Terrain
- based on Quad-Tree
- supports texture blending
- supports bump mapping
- Quad Tree acts as a scenegraph for enviro. objects

Units
- collision with terrain
- A* pathfinding 
- Bezier Curves for (usually :) ) smooth movement
- have line of sight
- different attributes (sight range, movement speed, turn speed,...)

Custom system for animations
- units have bones and assigned animation controllers that animate these bones
- animation controllers can be either parts of buildings (heavy factory has doors that are opening and closing) or weapons
- if a.c. is weapon units search for enemies in their range and attack them if possible

Weapons
- divided into several categories : straight shooting (main gun on tank, AA gun), ballistic (artillery), explosives (mines)
- each category may have bullets with different parameters (speed, 3D model, damage, area in which bullet makes damage)
- weapons and bullets can only attack certain types of units (e.g. AA gun will not lock on tanks, APC,...)
- after unit is destroyed debris is displayed and slowly disappears

Controls 
- platform specific - on PC mouse + keyboard, on Xbox C&C-like "crosshair-in-the-middle" movement + gamepad buttons for orders
- units respond to attack and movement commands
- units have waypoints

Environmental objects
- cannot be destroyed
- units avoid them

Triggers
- units can trigger events (e.g. after they enter certain area)
- timers for events are supported
- M:N relationship between triggers and events

GUI
- in early stage :)
- minimap in left lower corner
- if 1 unit is selected detailed unit info is shown
- if several units are selected only name + health is shown
- few basic gui objects in editor - button, text label, panel, image displayer

Level editor
- only on PC
- terrain painting (4 different textures are supported)
- environment objects can be places, moved, removed, rotated
- XML serialization for terrain vertex colors and e.o. positions and rotations

Resource pooling
- for less garbage

Particle Effects
- based on point sprites from CC sample

Postprocess effects
- in early stage

No comments: