Revisit 15 - OOP

Web log of development issues.

Revisit 15 - OOP

Postby adamsderk » Wed Sep 23, 2009 8:56 pm

Greetings,

Before I tell you what I am going to do now, I want to let you know about the latest difficulty that led me to do it. I have been struggling with the engine after adding jumping to the infantry. It would crash occasionally when I jumped into a building level above the ground floor. I traced it into some number overflow with the camera and the object tree, but had a hard time tracking it down. Of course this slows my progress on the game and saps me of the will to program. What I realized was that I didn't have to fix it because it only happened when the player jumped "into" a building, but the game does not allow jumping into a building. By simply not allowing the player to jump into a building (but they can walk into it), the error couldn't happen.

As I have been programing the way I always have programed , I realized that it might be time to change how I program. Before was sort of a haphazard approach where I would take a rule from CBT and then put it into all the places it could impact the game. While this was fast and gave quick feedback, it ended up making a plate of spaghetti of the objects.

So in the effort to keep everything separate, I am starting to write down all the requirements for an object type and then implement that object. I am also trying to make it so that no object includes decisions based on other object types (i.e. damaging a building will damage infantry inside, but not a Mech). Instead of having the building determine if the object inside is an infantry or Mech, the building just sends out the command to pass damage along and the individual object will determine what should be done with it. So, the Mech would ignore the command, but the infantry would act upon it and take damage.

This also has the effect of making me write down all of the behaviors for each object and how they relate to the CBT rules. So in the "Rules" section I have added my notes for object types (buildings and infantry so far) for you to peruse. Fell free to open a discussion in the general area about anything you think might be missing or want clarification about.

And remember these are my notes, I'm figuring out what and how to specify what attributes are in the game. Perhaps your questions can help me figure it out.

Thanks.
Image
adamsderk
Site Admin
 
Posts: 1404
Joined: Tue Apr 19, 2005 11:52 pm
Location: Western Washington

Postby Smoking_Mirror » Thu Sep 24, 2009 11:46 pm

Hi, just to say that I've not disapeared, I'm still watching development.

I'm working on a parallel development using the blender game engine and python. I'll be posting the stuff I produce for that here (such as building and vehicle models, cockpit, explosion sprites etc...) so that it can all be used by BTS.

My project is a helicopter flight sim set in the battletech universe, kind of like a desert strike (with mechs and BT tanks). I'm learning python, slowly and having some good success.

The blender game engine seems to be very good for this sort of game, I've already had working tests featuring 3d cockpits with working real time flight instruments, realistic helicopter movement velocity based on anlgle of flight, good working LRMs and working shadows, all using a game engine which has low tech requirements.

So in future keep an eye out for some new art assets.
Smoking_Mirror
 
Posts: 370
Joined: Wed Jul 04, 2007 2:38 pm
Location: South Korea (English)


Return to Development Blog

Who is online

Users browsing this forum: No registered users and 1 guest

cron