Archive for the ‘Games’ Category

Manufacturing Objects

October 16, 2010 Leave a comment

I managed to get a primitive manufacture class wrote. A structure can have Unit classes dropped onto it within the designer, and during run-time the manufacture class will see what units are assigned to this structure and will be able to present a list of them to the UI for the user to select. I was attempting to store the objects in a List<T> but ran into a issue of my version of Unity not supporting Generic Collections I guess. I checked their site out and saw that they had recently released Unity 3D 3.0 with a huge amount of new features, one being the support of .NET 3.5 which is a huge plus.

Once it’s finished downloading and installed, I’ll migrate my project over to it and button up on my manufacture class, and look into generating game objects during runtime, allowing Unit creation to be finished.

On a side note, I wrote a quick little function in my manufacture class that lets me pull properties dynamically via reflection. Using reflection isn’t something new to me, as Mud Designer relies heavily on it, but it’s neat that I can create a BaseUnit type and allow others to extend off it, and get their properties dynamically within the game.

object GetProperty(object obj, string field)
        FieldInfo info = obj.GetType().GetField(field);
        if (info != null)
            return info.GetValue(obj);
            return "Failed to get property";

RTS Development using Unity3D

October 16, 2010 2 comments

I spent some time back in September working on a RTS skeleton, just a barebones minimum RTS style game. I had a scrolling camera, with auto-height adjustment depending on the elevation of terrain the camera was currently over, along with proper collision detection and object selection. I ended up pausing from the project, as it was a collaboration project, with myself and a few other people planning on working on it together. The team needed more time to prepare for it, so I spent my time focused on Mud Designer and my wedding.

Things have calmed down now, and the main point of contact for the team looking to work with me on a 3D RTS game has resumed discussions with me regarding the project, so I thought I’d use this blog as an output to my thoughts and progress made. Not so much content related to the game, but rather how I achieved certain tasks that I was attempting to get working.

The first order of business for this morning was looking at what I had already developed. I had a working camera, and object selecting was implemented, so the next step would be creating units.
I figured the best solution would first create the units, then work on writing a manufacturing class that would perform the actual unit creation during run-time.

The Unit creation went pretty quickly, I created a BaseUnit class that all Units will inherit from. This way, as designers want new Unit Types (Marines, Monsters, etc.) they can create an extended class, edit a couple minor things (such as 3D model and sound) and the actual unit creation would be handled by the base type along with the AI.

I’ll probably end up moving the creation of the unit out of the BaseUnit class and into the Manufacturing class at some point, but for now this gets the job done.

It wasn’t difficult to get the unit created, albeit nothing is actually visually created on-screen. Basically I check for how much time has passed, and when the BaseUnit.ManufacturingTime has passed, the unit is flagged as created, at which point the user will have access to them.

//How long in seconds it takes to manufacture this unit.
    public int ManufactureTime = 15;
    private float manufactureStartTime;
    private float currentTick;
    private bool manufacturingCompleted = false;

    // Use this for initialization
    void Start () {
        manufactureStartTime = Time.time;   
        currentTick = manufactureStartTime;
   // Update is called once per frame
    void Update () {
        float manufactureTick = Time.time – manufactureStartTime;

        if (!manufacturingCompleted)
            if ((manufactureTick >= ManufactureTime) && (!manufacturingCompleted))
                manufacturingCompleted = true;
                print("Manufacturing completed.");
            else if ((int)currentTick < (int)manufactureTick)
                print ("Unit Manufacturing in process…");
                currentTick = manufactureTick;

The next order of business is to create the manufacturing class itself. I’ll probably move this code into that class, but for now this works out alright.

F1 2010 lockup solution

September 27, 2010 2 comments

After playing my F1 2010 over the weekend and loving it, I was ready to spend my day off playing it today. However when I woke up I found that my game would no longer load, my PS3 would freeze constantly during startup.
After contacting Codemasters it appears it is my saved data that is corrupt, which apparently happens when performing a R&D test during practice. They gave me some tips to fix the issue and I wanted to share that email for those of you experiencing the same issues.

We have now identified that this only occurs if, after completing the objective, you…

– Retire to the paddock via the Engineer (in the garage).
– Terminally damage your car and select retire to paddock.
– Get disqualified and select retire to paddock.

As long as you progress to the qualifying session before quitting the game this problem will not occur.

They are working on a update that will fix this issues. They worked quickly to find the problem, when I originally emailed them I was told they couldn’t reproduce it however little over two hours later they had found how it was happening and responded with the aforementioned email. Hope this helps others out until the next update.

Categories: F1, Games, Support

Consoles vs PC’s

September 18, 2010 3 comments

I don’t know about you, but I love my game consoles. I don’t care if it’s my Playstation 3 or my GameCube, I can take refuge in the fact that even though the games I have sitting on my shelves are 6-10 years old, they’ll still work perfectly when I plug them in. Not so true with my PC.

Today I attempted to play Civilizations IV on my laptop that I had purchased several years back. I bought them on Direct2Drive & so when I tried to activate it I was given a nice little error message saying activation failed due to lack of Internet. Yeah. No duh. I just moved & haven’t managed to get Internet up & running. So I tried my CD of Galactic Civilization and found that stupid Windows Explorer would freeze each time auto-run tried to execute. Then I tried Playing my Half-Life 2 but ran into the lack of Internet issue for the Steam client. I gave up & returned to my PS3. It’s sad that even my PS3 can play my 15 year old PS1 games with out any issues but games on Windows suffer with compatibility issues after less than 5 or 6 years along with forcing Internet connectivity to even get certain games (singleplayer mind you) activated for play. This is why console sales are up and PC game sales are down. Go figure.

Gran Turismo 5 delayed… PAL release only

January 14, 2010 Leave a comment

Early yesterday morning Sony announced that the much anticipated game Gran Turismo 5 had it’s release date changed to TBA due to a delay. Later in the day Sony Europe stated that the delay only effects those in PAL regions, and so I’m curious what might be the cause of this. At first I wondered if it was a licensing issue that had come up over one of the vehicles in the game, but generally that sort of thing is ironed out prior to the content being added to the game.

I’m interested why this would only effect PAL and not NTSC regions like the U.S. Of course, the U.S. version did not have a release date set in stone like that of the Japanese version of the game, and so it’s possible there’s a licensing issue that’s come up, and Japan is the only one technically being delayed, as a North America release date had not yet been announced.

Only time will tell, if anyone knows anything regarding it drop a comment and let me know.

Categories: Games, Playstation 3, Sony Tags: , , ,

Small Bumps

October 15, 2009 Leave a comment

As I continued working on the game getting a project going from scratch I realized that I had stripped out the games in-game editor, and would not be able to create the environments from within the game. This was not the ideal solution and so I attempted to get the creator directory added back into my project, but in a way that would allow me to toggle it on or off via a global variable. This way I can simply ship the end product with the creator directory missing and not allow support for modifying the games environments.

I had a problem with the engine crashing when it tried to load the creators UI elements, and I realized that it was probably looking for the customProfiles.cs script that was within the demonstration folders that I had removed, so I created a copy of them and placed them within my projects directory structure, executed them and had the engine go ahead and start loading the UI elements.

Sadly it didn’t get far, it still crashes but further down the line, when it tries to load the Lighting UI elements. I’m going to spend some time tomorrow looking at what files I might be missing to cause this too. Once I get the creator up and running, my User Interface design can begin.

— Posted from my iPhone

Categories: Eternal Story

New Torque Game Engine Project

October 14, 2009 Leave a comment

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

Categories: Eternal Story