Presented by Lewis ChenSenior Design
CS491ab Winter-Spring 2009
Concept
• LEGO-themed Real-Time Strategy Game– Command a fleet of ships and attack enemy fleets
in 3D.– Construct custom models for the game.
Background
• Inspired by Homeworld• Game plot developed years ago.• Models were already being built prior to
project.
Objective
• To create a plastic construction toy-themed 3D Real-Time Strategy Game based on the Homeworld series RTS game.– Implement an orbiting camera– User input to control player’s ships.– Convey an outer space environment for the player
to play in.– (Optionally) Implement special effects to make the
basic game enjoyable.
Demonstration
Implementation Issues
• Orbiting Camera– Difficult to write from scratch. Does not move
smoothly nor to correctly.– Solution: Utilized Dhpoware.com demo source
code
Implementation Issues (cont)
• Model conversion– Multiple ways of converting an ldr file to an fbx file.– Given: Ldraw models are converted to .3ds format via
LeoCAD and imported to Blender.• Exported directly to .fbx or .x.• All the meshes joined as one object, export to .3ds, imported
to Carrara, exported to .fbx• Export to .obj, converted by FBX converter to .fbx
– Solution: Use Ldraw importer plugin for Blender to import Ldraw models directly w/o conversion, export to .obj, converted by FBX converter to .fbx
Implementation Issues (cont)
• Selection Pick ray– How to project a ray from near plane to far plane
of a perspective camera view.– Solution found from tutorials and examples– Was not able to implement Selection box
Implementation Issues (cont)
• Floating Health bar– Health bar is to appear floating above a ships
relative to the camera’s perspective.– Had a completely implemented health bar that
would update when attacked and not attacked.• Code lost when doing system restore.
– Most of original implementation recovered, but does not update as originally desired.
Implementation Issues (cont)
• Particle Systems– Immediately decided to use off-the-shelf code.– Studied user manual to understand how to modify
particle system parameters.
Implementation Issues (cont)
• Matrix Decomposition– Extracting the position and rotation of a ship is
very important• Be able to compare positions of two units and their
orientation.
Implementation Issues (cont)• Ship class
– Creating a class containing ship parameters• Model• Allegiance (boolean)• Selected (boolean)• Modelworld (Matrix)• Maximum Health (float)• Current Health (float)• Shield (float)• Attack points(float)• Maximum Velocity (float)• Angular Velocity (float)• Alive (boolean)• Ship name (String)
– Ships added to the game via a Generic List.
Implementation Issues (cont)
• Collision Detection– Collision detection came from tutorials.– Creating event handlers for Collision detection was
difficult
Future Plans
• Abandon XNA and explore other game engines, perhaps commercial level.– It is a huge disadvantage to work on a game project
alone.• May end up just creating an animation series with
the game plot.– I have created test animations
• Develop other game ideas and see where it goes.– I have gained experience from using XNA and many
lessons have been learned.
THE END