Tuesday, October 13, 2009

New Torque Game Engine Project

I've had the Torque Game Engine for a couple years now, and have messed around with it for quiet awhile. I spent the last couple of days thinking about how I would build an RPG game using it, and decided I could give it a try and see what happens. Considering I have the Arcane FX pack already, my skill effects will be easily created, all I need to do is decide on how I want the gameplay to be designed.

I spent the first part of today getting everything up to date, downloading the latest version of the engine and the pack, and also checking out some of the existing content packs at the garage games website. I found two of them that I will start putting some money back for. The Cirrus Sky pack and the Plastic Tweaker Tool for creating Datablocks on the fly with a gui driven toolset.

Next thing I did was setup my directory structure for the project. I will be using all of my own scripts for this project, removing all of the pre-scripted Garage Games content. That meant that the Common folder, the arcane.fx folder, demo folder, show folder, creator folder and the starter/tutorial folders had to go. Once the structure was created I loaded the engine source up in Visual C++ 2008 and adjusted the engine so that the main.cs file could be renamed to game.dat and loaded with that filename & extension instead. I recompiled the engine, and renamed the file and everything ran smooth.

Finally I created a startup.cs script that contained the code needed to load the games preferences, create the canvas and initialize the audio. The game.dat file which will be the only non-compiled file for the project will be kept with the least amount of code in it possible. The file looks like the following:

if(exec("game/startup.cs") != true)
error("Error: Unable to luanch game, content missing.");

The startup.cs file will obviously be a compiled .dso when the game is distributed, so no one will be able to access its contents, and the onStart() is a function within the startup.cs script. This keeps the unprotected code to a minimum, allowing me to hide the remaining startup code within a compiled .dso file.

So now I have myself a blank canvas that starts up, I now need to look into setting up the UI Profiles, and begin creating the startup UI.

-- Posted from my iPhone

No comments:

Post a Comment