Sunday, September 30, 2012

Prototype 2.5

I got the basic trigger manager to function properly.  The trigger manager can play audio files, instantiate generic objects (like asteroids), instantiate waypoints and instantiate the player's fighter.  It still needs a method to load triggers after the scene starts and to instantiate fighters and capital ships.  Capital ships are not complete; consequently, the instantiation of capital ships will delayed indefinitely. 

The next feature for the trigger manager will be allow a trigger to load another trigger.  After that, the instantiation of fighter craft is next. 

The current player fighter in tutorial #1 is now a Scorpion fighter.  It is slower and less manueverable than the Viper.  I updated the new fighter with parameters for the Scorpion.  I would like to get some feedback for the fighter.  I am mainly curious if it turns too fast or turns way too slow...

Here's the link to the public builds folder:

The latest build is prototype 2.5.  I only have one audio file up and running for the mission.  This is mostly due time and the fact that I can't load a trigger after a trigger. 

Saturday, September 29, 2012

Revisiting Waypoints

I got the event manager, renamed as a trigger manager, to load sound files and generic game objects.  I was going to work on loading waypoints when I came to the realization that waypoints are too integral of a system to load into the game from the traditional trigger manager.  When a fighter craft that relies on waypoints loads into the game, part of the load process will involve defining its waypoint manager or initial waypoint.  This means that the waypoint object must already be loaded into the scene.  To make sure that waypoints are loaded first, all waypoints will be loaded separate from the main trigger load process. 

During the Start() routine, waypoints will load first, followed by capital ships and player's fighter and then by the normal trigger load process.  This will ensure that waypoints exist in the scene by the time other objects that depend on them are loaded into the scene.  The waypoint load process will break down into two parts.  The first will load the waypoint manager.  The waypoint manager's table will consist of the waypoint manager's ID, position and a flag to designate it as a looping waypoint system.  The second section will load the individual waypoints.  These waypoints will be stored in a separate table.  The waypoint manager's ID will be used to query and retrieve the individual waypoints.  The individual waypoint's table will consist of waypoint's ID, manager's ID, position in the waypoint list and position.

Once the waypoint load is complete, the Start() routine will move onto the capital ships and player's fighter.  Capital ships will be put on indefinite hold.  They are not ready for loading into the scene and will remain a static, preloaded part of scenes.  I will write the player load after the waypoint system.  This will be followed by the fighter load routine.

In addition, I will need to create a trigger load system.  This system will load a trigger into the table after receiving a trigger.  As an example, the first tutorial instructs the player to turn left.  After the player successfully turns left, the tutorial will then instruct the player to turn right.  Both instructions involve verbal feedback, a played audio file.  In this situation, I don't want feedback for turning right to play until after the completion of the turn left trigger.  This means that the actual turn right trigger records must be loaded into the trigger list after the completion of the turn left trigger. 

Finally, I will create a database interface system to make the database management easier.  The database management system will be written in C# (possible VB) to provide me with a quick and easy way to create missions.  This system will utilize a MySQL, MSSQL or Access database.  Once the database is ready for deployment, the database management system will convert the database into a Siaqodb format.  The Unity game will access the Siaqodb version.

Friday, September 28, 2012

New Cruiser Design

I attempted to create a video detailing the process for creating a low polygon model.  The design process was to cover a real basic overview for beginners; however, I did run into some issues with video.  First, it ended up being 83.3 GB in size (between all the segments).  Second, some of the segments that I recorded did not turn out well.  I can play the clips in media player, but I cannot use them within my video editing software.  I'll have to look into fixing the issue. 

For the process, I created a new cruiser for the game.  It's 868 meters long and is primarily meant to be a smaller version of  a Battlestar (1200 - 1400 meters - depending on source).  In a way, it's a step in the evolution from the smaller destroyers to larger battlestars depicted in the series.  Writing this blog, I realized that forgot the add the launch tubes.  I guess I'll go back later to fix that issue.  I've included some pictures of the untextured product.


I included the Trident class destroyer as a reference point.  These pictures are from Unity.  Like the trident, I created the base model in 3DMax.  I added the turrets after importing the mesh into Unity.   The landing bays can retract and extend and needed to be separated from the main body.  The first two pictures depict the cruiser with retracted landing bays.  The last picture depicts extended landing bays. 

So, does look enough like a battlestar?

Thursday, September 27, 2012

Event Manager

My computer took a dive, and I just got it up and running again.  Consequently, this is my first post in awhile.  I have been reviewing my approach to creating an event manager, and I decided to change my approach (again).  I learned to program back in the 80's, and the popular trend was top-down programming.  I lose sight of some of those principles when programming in the modern world.  I'm changing my approach to a more top-down methodology. 

The goal is to create a trigger manager that passes each trigger to specialized trigger managers.  For example, the primary trigger manager will receive all the trigger events for a mission.  Based on the name, it will pass instantiation of fighter craft to the appropriate manager and audio triggers to an audio manager.  Currently, the game will need a fighter, waypoint, generic object, audio and destruction managers.  In addition, a capital ship manager will become necessary as the game progresses.  Each of these managers will receive data from the primary trigger manager. 

The primary trigger manager will grab data from a trigger table.  The trigger table fields are:

OID (Primary key)
Mission Name : String  // Used to query by mission name
Name : String                // First three letters designate a target table; full name is a key field
Trigger : String             // Name of trigger that triggers the event
Time : Float                  // Time index (if it's a time trigger) or time delay (on other triggers)
Position : Vector3         // x, y and z coordinates for the instantition of objects
Rotation : Vector3        // x, y and z rotation for the instantition of objects

The Name field will contain the action category in the form of a three letter prefix.  The following managers will have these associated prefixes:

Fighter instantiation - ftr
Waypoint instantiation - way
Generic Object instantiation - obj
Audio commands - aud
Destruction commands - des

The prefix will be followed by a unique identifier.  The prefix will direct the data to the appropriate manager and its associated table.  The full name will be used as a search key for a unique record in the table.  This record will contain additional data, like basic fighter data, needed to properly execute the desired action. 

The trigger table will be sorted by the time field and read into a list.  The trigger manager will read from the list by retrieving on a first item basis.  During the normal update procedure, the trigger manager will retrieve the first "Time" event from the list and will compare time indexes.  If the event needs to be executed, it passes it the appropriate manager for immediate execution.  As the trigger manager receives triggers from other scripts, it retrieves the first item with the trigger name.  If an item is retrieved, it is passed to appropriate manager.  That manager handles any time delays that might be present for the action. 

The plan is to create the primary trigger manager followed by the audio manager, generic object manager, waypoint manager, fighter manager and destruction manager in that order.