|
|
GameWeave Development Diary
 | ReWrite | October 15, 2003 at 21:18:06 |
 |
|
better than ever... -- Svapne
The underlying object managment code was starting to get pretty bulky, and most of it was written in pieces. I decided that a complete rewrite from the ground up might be usefull. It would allow me to optimize some things I always wanted to get to but never did. I also needed a well written code sample for something else and I figured this would be a good thing to shoot for. I'm about 95% done with the whole thing and it is shaping up to be really nice. I split the whole thing off into a seperate library I am calling Europa.. why?? I dunno, I liked the sound of it and none of the acronyms that came up from what the library did sounded like anything. I could go through and list all the changes and enhancements, but it would take up quite a bit of room. Every sub-system that was in place before is now very different. The interfaces have remained the same but a lot of fat has been cut out and replaced with tighter more extensible code. I have not merged this new code into the game shell, but it should go pretty smoothly. |
|
| |
 | loomIDE | May 13, 2003 at 20:53:04 |
 |
|
loomIDE -- Svapne
I have put aside the engine code for a while to work on the dev environment. I ended up dusting off the old IDE I had put down for a while. I have learned a lot since I started it way back and it didn't take too long to iron out some of the bugs that really effected the usability.
My major concern about this new gameshell data driven environment is that even though the scripting language is pretty robust, developers in the art path are going to have a significant learning curve. In order to help them along the learning curve I built some functionality into the editor that should help beginner developers and decrease bugs.
Here are some of the features of the editor as it stands today:
- pretty small install footprint ( 1.5mb )
- only allows one instance
- Syntax aware editor (codemax/codesense)
- Languages can be added with easily written text files
- macro recording
- tabbed interface
- file/folder shell integration
- sticky notes
- dropdown windows for objects and functions
- codetips for function prototypes
- built in code documenting tools
- Syntax colors configurable
- can create key assignments
- all kinds of advanced editing functions
- bookmarks
- ability to spawn tools from interface
The best part is that the IDE can be made aware of every game object type and every function, so the user can just pick them from a dropdown. This makes working with the script easier and cuts down on the number or typos. It still needs some polishing up, but I'm already using it. |
|
| |
 | Port | April 18, 2003 at 22:53:25 |
 |
|
Lua 5.0 -- Svapne
Just last week Lua 5.0 was released. It has been in beta for quite a while and I have resisted working with it because I was never sure when it would be ready. Since it is now final I decided to try to port all the 4.0 code to 5.0 because I think since we are not even using the scripting system yet it would be a good idea to use the latest release, since most of the documentation and resources out there will now be for 5.0 and it also looks like 5.0 has some interesting features we could leverage.
The port was not too difficult, but it did have its tricky spots. Some of the language features I used to bind the VM with the class system have been completely changed. The functionality is still there, but how it is done has changed drastically. It took about 6 hours for the port and now the original demo is running with the Lua 5.0 VM embedded.
I also had some fun adding some features to the particle object. It can now be attached to any object that has an internal node. This can generate some cool effects. For instance I attached a particle object to each of the electron boxes in the demo that circle the main box. I created a cool glowing particle that slowly falls and fades. This causes each electron to leave trails of particles behind it. I'll try to post some screenshots of the effect.
Sounds like the reference layer in Ogre is almost ready. This means that mesh to mesh collision detection and physics will be very easy to hook into the engine. So I'm looking at OPCODE and ColDet for collision detection, and ODE for rigid body dynamics.
Been doing a little testing on the artpath. I took a sailboat textured in MS3D and brought it into ogre with no problems. The texture job was terrible, but it proved it can be done. |
|
| |
 | Audio and Events | March 19, 2003 at 08:58:19 |
 |
|
More progress... -- AlphaDog
Well finished up the music player integration. I added MOD playing. It was already in SDL_Mixer, so I just added the supporting code to integrate it into the shell. I'm not going to add WAV, MP3, or MIDI because I don't see the use when DirectAudio is already being used for sound effects.I did move on to the next thing; the event system. I coded up a simple framework and slapped it in and it works fine. I went for a message queue and listener approach. Every object has to register itself as a listener for certain messages. When an event is fired, only those objects who have subscribed to get that event receive it. It still needs a lot of work, but it is a start. |
|
| |
 | Audio Complete | March 13, 2003 at 23:27:58 |
 |
|
Long road -- AlphaDog
Well it's late, but it's done; for now anyway.... The streaming audio it working quite well now. I ended up modifying the SDL_Mixer library. There were really only a few functions that needed changing. It took time because I had to write an entire application just to test the stream and then modify SDL_Mixer to use it. I'm not sure I completely understand what SDL_Mixer is trying to do. The new version seems to support OGG streaming from memory, but it goes about it all wrong. Instead of decoding the byte stream in buffered chunks to feed to the audio system like it would do from disk, it decodes the entire stream to memory and plays it from there. This is the exact problem I was trying to avoid because you end up wasting over 20MB of memory just to play an audio file, when the decoder would be more than happy to stream it from memory. So what I ended up doing is just writing a new function that opens the file stream from memory by using the vorbis callback methods so that memory IO looks like disk IO and then pass the open file to SDL_Mixer and it does not know the difference. One of the reasons I had to write the test program was because the playback was failing a few bytes into the stream and there seemed to be no reason for it. For some reason after the first block read by the decoder it returns an error, that is more like a warning, and can be ignored. SDL_Mixer was choking on it so I modified it's error checking to let it pass.. After all that we now again have great streaming music, all open source. The memory footprint seems to be 1-3mb for the music which is fine, better that the 40Mb I started with, and the CPU cycles seem low... So I guess it is on to the next thing... |
|
| |
 | Audio | March 12, 2003 at 10:37:31 |
 |
|
Audio -- AlphaDog
So I have been working on the music streaming layer lately, because of several reasons. Originally the demo used FMOD to stream MP3 music. This is all well and good as MP3 is a solid format for storing music and FMOD is a high quality library with a very small footprint. The only problems are that MP3 is a closed format that requires licensing, and FMOD is a commercial library and is a bit overkill just to stream music. Since we really don't know what we are going to end up doing, I don't want to end up tied to a commercial license. The other alternative is to use the OGG/Vorbis file format which is open source (LGPL), which is compatible with the libraries we are already using. OGG is a great compressed format that is in some cases better than MP3 and requires no licensing. I tested OGG with FMOD and it worked fine, so the next step was to find a LGPL library that is up to the task. I tried both SDL_Mixer and SDL_Sound, but could not get them working. I planned to read the compressed bit stream from the archive using callback functions to simulate file I/O, I have tested this by writing a simple application that streams out the PCM data to a wav file. The next step was to try to use the Vorbis libraries to allow DirectAudio to play the music. I actually got this working and was cool because now you could attach music to a 3D object, so you could move the speaker around the listener. This had one serious drawback... Memory consumption. An OGG encoded bit stream is quite small, lets say 1.5mb per 3 mins of music. If you un compress that bit stream into it's PCM data, you expand to about 17mb. Now DirectAudio only knows one thing and that is uncompressed PCM sound samples. So what I did was to un compress the bit stream to memory and create a wav file in memory and then feed it to DirectAudio. This works and plays fine, only one problem; DirectAudio creates multiple sound buffers for mixing and acoustical modeling and requires the initial wav data to be available at all times. This amounts to about 30-40mb of memory used up just to play a 3 minute tune; this is unacceptable. So where do I go from here. I did end up finding an LGPL ACM ( Audio Compression Manager) driver for OGG/Vorbis on a Japanese site. The source code is available. The idea would be to distribute the driver with the game and load it at startup; and not actually install it in the system. There is a way to do this using DirectShow and it does not look hard. That would mean that DirectAudio could play the compressed stream in real time; problem solved. The ACM project was in VC7 format as well as not being in English and it required the Windows DDK which you have to order from Microsoft. Fortunately for me I found a program that converts VC7 projects to VC6 and found another that strips comments from source files ( so I removed all the Japanese comments, which looked like hell and wreaked havoc with the editor ) and I happened to have an older version of the DDK lying around and installed that. To make a long story short I finally got the ACM to compile with the new OGG/Vorbis libraries, but have not tested it. So we'll see what happens in the next week as I try to finish this up, the good thing is that I can always drop back to FMOD. |
|
| |
 | Ogre and Lua | February 24, 2003 at 17:07:00 |
 |
|
It's been a while -- AlphaDog
My god it's been a while since an update, so much has happened I don't know where to start... Life has been so busy and I'm an IBM codernaught now for whatever that is worth.Not much has happened on the game shell front; actually I take that back, a lot has happened but not really anything immediately obvious. I have spent a lot of time reading a ton of books on C and game development, trying hard to focus on good OO skills and design as well as learning what libraries are out there and can be leveraged.. Scott Meyer's book have been amazing ( the whole series ), as well as the accelerated C series edited by Bjarne Stroustrup these books are absolutely amazing and have changed the way I write code. The C/C user's journal has also been invaluable in my development. So I took some time to re-write the object management code, the FuBi system, as well as integrate a scripting language. I choose Lua because it is fairly easy to learn, easy to integrate, pretty extensible, and Lucas Arts used it and that is good enough for me :). The code is now much more de coupled from the rendering engine. In fact it really has no game specific code in it.. All game specific code and behavior has been moved into a DLL plugin system that registers itself at runtime allowing all behavior to be scripted in Lua. I have also taken the time to update the file compression system to zLib 1.4 and rewrite some of the compression class. As far as the game engine goes, that seems to stay up in the air. Here it is a year later and Destiny3D is no farther along than Jet3D was at the time and it is kind of disappointing. I'm sure that they are working very hard over there, but it still seems a long way away from being usable. I have been trying out the Ogre engine with a lot of success. It is not a game engine, but only a rendering engine. This is not really a bad thing as you can integrate all the other pieces yourself for whatever kind of game you want. I will post some screen shots on the shots page soon. Right now I have the whole demo being run from a Lua startup script and have MP3 playback ( via FMOD ) and 3D sound ( via DirectAudio ) working. I have also taken the time to write Visual C wizards to generate DLL plugin objects for the game. I am streamlining and finalizing the Lua integration, and development should speed-up as the entire system is put in place.. I will update the shots page as we test new functionality.
|
|
| |
 | Small Fixes | February 17, 2002 at 19:52:18 |
 |
|
Small Fixes -- AlphaDog
ok.. Here is a small update. Fixed some problems with the steaming compression library based on the zlib library and tested it. Seems that the compression class did not like the std::ios open flags, still don't know why exactly; but I do know how to fix it. Compression is now back to 95%. I also spent some time re-working the threaded audio layer for music playback and it works much better now, and it is much more modular. I'm now starting research into using LUA as the embedded scripting language for the gameshell. TOLUA looks like a promising tool for integrating LUA with C++ objects. I'm really in the early stage of testing and hope to have a prototype of some kind in a week or so. There are a lot of possible solutions for embedded scripting languages and LUA is just one. So we'll see what happens. |
|
| |
 | Code rework | February 08, 2002 at 18:16:20 |
 |
|
Advancements -- AlphaDog
So this guy, Sergey Klimov, wrote a great docking window architecture for WTL; one of the important things it lacks over MFC. The code is very flexible and works great.. It only took me an hour to port the old GWExplorer code to the new docking code system. I plan to use this architecture for every GameWeave code tool I write. It is a very clean and easy to use implementation and allowed me to add an output window to the tool. You can have a look at a couple of screen shots of the tool on the screens page. All the tool really does is test the object class system.Things are moving along well with Destiny3D. I downloaded the pre-alpha release this week.. I compiled and ran the code without any problems. The editor is shaping up nicely and the team is doing incredible work. I've decided to start a game development project because the market has amassed enough free tools to allow a high quality game product to be produced with reasonable development time and cost. I have put together a talented team of people and a design document is on the way... |
|
| |
 | Added functionality | December 27, 2001 at 15:11:00 |
 |
|
CRC -- AlphaDog
Well its been a couple of months since a decent update, so here we go. I have been working on a couple of other side project as well as sharpening my skills in some areas that sorely needed it so game shell development has been slow. I did, however, add some interesting functionality recently. I thought it would be a good idea to add CRC functionality to the inventory persistence functionality.. This would provided data integrity checking on file loading. The system now has the ability to check the entire data file integrity as well as each object against the original CRC that the object was stamped with when it was persisted to disk. So far it works great, but it forces me to rethink my error trapping design and come up with a more robust way of handling exceptions. |
|
| |
 | Scripting support | July 02, 2001 at 10:13:40 |
 |
|
FuBi implementation -- AlphaDog
Well it's time for another update... The FuBi article was published a few weeks ago... Kind of a hard article to follow, it was really thrown together very fast and had a lot of code included in it that did not really have to do with the core of the solution. So it was very hard to wade through.... Scott Bilas, the author, was very nice in his reponses to my questions and offered to help any future questions I had. After reading all three papers serveral times I made a go at implementation. It took a bit, but with the code Mr. Bilas provided and some help from the STL I got a simple FuBi system up and running... I still don't know exactly how I'm going to implement parameter type checking and how to work with return values, but everything seem to be working well otherwise and has been integreated into the factory system. Still a few wrinkles to iron out but most of the functionality is there.. Check out the project link page for more info on FuBi.... Anyway, Genesis3DC had it's first release called re-arch 1; which is just a modulariztion of the old source but gives the developers a much easier code base to work on... It will be still some time before Destiny is even in alpha, but work continues... |
|
| |
 | optimizations | June 08, 2001 at 22:27:20 |
 |
|
optimizations -- AlphaDog
After some more optimizations to the factory. I'm still getting 98.75% compression, but I have increased create/save/load time. To create 50,000 objects it now takes .5 seconds and 1.5 seconds to save and 1.8 seconds to load... Go here to see the log. |
|
| |
 | Cleanup | June 08, 2001 at 13:09:58 |
 |
|
Cleanup -- AlphaDog
Well I guess it is about time for a little update.... Been working on a few things. One of the things that always bugged me about the shell was that some of the resource intensive stuff was not threaded. I took some time to thread MP3 playing and world loading.. I am pretty happy with the results. You can now have an mp3 play in the background during gameplay... Also there is a hacked progress bar that displays while world loading is happening. This lets the user know what is going on and automatically drops you in the world after it is finished loading.I did some regression testing in order to make sure nothing has been broken during my latest updates to the shell. I found that the intro section had been hosed so I ended up fixing it and now it works great. I have been testing out a debugging tool that monitors memory leaks and the like, and have found a few both in the factory code and in the ZLib DLL. The memory leaks in the factory were simple new/delete errors. I re-downloaded the ZLib source and recompliled the ZLib.dll turning on all the optimizations and ran it through the tool again, and in the end I had no leaks or uninitalized memory reads. So I'm pretty happy with that; although a leak could creep in anytime from a plugin dll. While I was optimizing the factory I decided to really take the time to benchmark the compressed file save/read funtionality.. so here are the results: ----------------------------------------------------------------------- #define CLEVEL Z_NO_COMPRESSION #define CSTRAT Z_DEFAULT_STRATEGY 50,000 products 16,842,240 bytes disk space 12:55:37:0920:PM Found Plugin: light_object.dll ver:1, 0, 0, 4 12:55:45:0100:PM It took 7.173861 seconds to gendata. 12:55:45:0360:PM It took 0.260908 seconds to showProducts. 12:55:53:0833:PM It took 8.478092 seconds to saveData. 12:55:58:0239:PM It took 4.397299 seconds to loadData. 12:55:58:0529:PM It took 0.294308 seconds to showProducts. 12:55:58:0800:PM It took 0.271221 seconds to liquidateInventory. ---------------------------------------------------------------------- #define CLEVEL Z_BEST_SPEED #define CSTRAT Z_DEFAULT_STRATEGY 50,000 products 210,944 bytes disk space 12:59:20:0810:PM Found Plugin: light_object.dll ver:1, 0, 0, 4 12:59:27:0500:PM It took 6.692598 seconds to gendata. 12:59:27:0760:PM It took 0.261881 seconds to showProducts. 12:59:30:0474:PM It took 2.710131 seconds to saveData. 12:59:34:0900:PM It took 4.432538 seconds to loadData. 12:59:35:0181:PM It took 0.273875 seconds to showProducts. 12:59:35:0451:PM It took 0.273369 seconds to liquidateInventory. ----------------------------------------------------------------------- #define CLEVEL Z_BEST_COMPRESSION #define CSTRAT Z_DEFAULT_STRATEGY 50,000 products 210,944 bytes disk space 01:01:44:0837:PM Found Plugin: light_object.dll ver:1, 0, 0, 4 01:01:51:0116:PM It took 6.275208 seconds to gendata. 01:01:51:0367:PM It took 0.258504 seconds to showProducts. 01:01:54:0091:PM It took 2.716792 seconds to saveData. 01:01:58:0567:PM It took 4.506057 seconds to loadData. 01:01:58:0837:PM It took 0.271229 seconds to showProducts. 01:01:59:0108:PM It took 0.274240 seconds to liquidateInventory. Looks like I'm getting a 98.75% compression ratio...
|
|
| |
 | XML | May 31, 2001 at 13:49:07 |
 |
|
XML rules -- AlphaDog
After reading an article on thecodeproject.com on XML parameter parsing for applications I decided to implement it in the gameshell. One of the reasons is that some of the config data I am using can really benefit from a tree like structure, especially the config files that store the game HUD. It was a real pain in the ass getting standard Windows INI functions to do what I wanted. The XML is a hell of a lot cleaner and much more extensible. As a side benefit IE can display the XML files for easy viewing and they are easy to edit. Still waiting for the FuBi article to be published... I wrote the author and it will be a few more weeks until it will be ready, I'm sure he is busy working on Dungeon Seige which is his latest project where FuBi was used... I continue to monitor the Genesis and Jet3D forums and it looks like an alpha will be out by end of summer. I am probably looking at September befor anything usuable will be out... I will continue to add to the gameshell to make sure all the tools are in place before the engine is released. I have had to spend a lot of time getting my new home together so my time is limited anyway...
|
|
| |
 | Factory code done | April 19, 2001 at 13:50:58 |
 |
|
Factory code done -- AlphaDog
Well again it has been a long time since an update. Been really busy with the house stuff and just life in general. But I did have time to put the finishing touches on the plugin based factory system, as well as finalize the gwexplorer code to be able to test functionality. I don't yet have a good method for the factory to know everything it needs to know about a plugin without recompiling the executable that is using it every time a new plugin is introduced to the system, or every time a change is made to the plugin's interface. This is one of the classic Fragile Base Class problems and I will continue to investigate ways around it, but at this time everything works pretty well. I even took the time to plug the whole system into the game shell and give it a whirl. After some tweaking and debugging it finally works. I can save a game out to disk and read it back in. One of the things holding me back for a while was the fact that there is no documentation for the Jet3D API and I was using the wrong call to try to remove an actor from the world. A quick post on the message forum and someone was kind enough to point me in the right direction. So now save games work. The only object in the inventory right now is the player so it really isn't that amazing, but it is the first time it has worked. The next trick will be to finalize the game plugin interface and put some kind of hook system into the warehouse to allow actions to be performed on the whole inventory. This would be things like rendering and AI. Object creation is easy and always returns a pointer to the object. But upon reading the saved inventory in there is currently no system for identifying and getting pointers to objects that the game shell needs to work with. This is going to have to be pretty well thought out, it is a key issue.Hopefully in the next week or so I will get my hands on some very interesting code from one of the presenters at this year's GDC called "FuBi: Automatic Function Exporting for Scripting and Networking". I would love to use this code to implement solid scripting of both the factory and the plugins. We'll see how it goes, at this time the site still list the source code as 'coming soon'. |
|
| |
 | Plugins | February 28, 2001 at 12:42:09 |
 |
|
Plugins -- AlphaDog
Yet another update... Well I read the COTD over at flipcode about OOP plugins using DLLs and I really liked the idea... Still not 100% clear on the technique but I'm getting there and of course that never stopped me from implementing it. So over the last 24 hours I have managed to re-architect the factory code to accommodate object plugins using DLLs.. I must say that it works pretty damn well.. I still have a couple of questions that I waiting for the author to respond to, but everything works great so far..The main benefits of this system is now all creator and product code is now loaded at runtime from separate DLLs. This decreases A LOT of the dependances between the factory and the objects that it creates. This is what I had envisioned from the beginning. Creating new objects is easy with a simple interface template I have created. You just drop the DLL into the factory directory and either restart the factory or send a plugin refresh command and it will load all the plugin creators from the directory... It really saves on compile time to have all the objects in separate libraries.. The only thing to watch out for is to be aware of the DLL process boundary. This is why all plugin objects must override the destroy() method so that you can call: game_object->destroy(); instead of: delete (game_object); The destroy() method just calls: delete this; But it calls it internal to the DLL process that created it so it can be properly handled. The next step in this process is to design a mechanism to notify the factory that a plugin has been unloaded and to release all objects of that type, otherwise when a liquidation command is issues to the factory; the following line will cause a exception: game_object->destroy(); Because the DLL process has been removed from memory along with all the object references it has created. Therefore liquidate must be called every time a DLL is unloaded. I must implement a liquidate method that selective releases only those objects in the factory that are associated with the plugin.. This system is starting to look really good.. I just hope Destiny comes out soon... |
|
| |
 | GameWeave Data Explorer | February 26, 2001 at 11:32:00 |
 |
|
New Tool -- AlphaDog
Well I tried to integrate the factory into the gameshell... Things went ok from a code integration standpoint but I am now chasing down some memory bugs, but the ideas so far seem pretty sound.. I am also dealing with the problem of data file versioning and do not want to have the same problem many game vendors have when they release a patch for their game that makes the users save games invalid. I have gone down many paths to try to make this happen but have not settled on an adequate answer.. I am trying to abstract out a better singleton class to apply to the Factory, but that is not quite working yet. I am also trying to add some reference counting code to help track down and eliminate memory and resource problems.. Anyway I guess the biggest news is the GWExplorer app I wrote in MFC to help test the factory and investigate factory created data files.. The app can ready any factory created data file regardless of version. This is because it only reads and verifies the data format, and does not look at the object internals. The app would have to know too much about the format and the object's key code to load it so I decided to just read each object's header.. It is my first real MFC app from scratch and it wasn't easy.. The MFC docs aren't that great (what a surprise) but I got a tree control to work as well as HTML support and dockable toolbars so I am pretty happy with it. It serves its purpose. Check out the screen shots page for some pix of it... I am also looking at an interesting plugin architecture that I saw implemented on flipcode.com in the 'code of the day' section. More on that later... |
|
| |
 | Template Hell | February 08, 2001 at 11:16:19 |
 |
|
Miscro$soft fails -- AlphaDog
Time for another update... This one has good news and bad news... The good news is that the factory system is almost complete.. The bad news is that it is not going to be as clean and self contained as I wanted..In order to increase code manageability I decided to break all the separate factory services into separate modules containing the class definition in the header (.h) file and the class declaration in the module (.cpp) file.. This is general practice and would help me to better manage the code... This is what I thought, little did I know this would start my trip on the nature trail to hell.. The code compiled fine, but during the linker process I got link errors complaining about undefined externals, which meant that most likely the template generated code had very different signatures than what needed to be there.. After some research I found out that template class definitions and declarations have to be in the same translation unit, which meant that I had to move all my declaration code into the header (.h) files... After doing this I tried to re-compile. As usual compilation went find, but the linker again complained. This time is was a multiple declaration error. This meant that every (.ccp) module that used the (.h) file was also including the class declaration code. At this point I was pretty pissed.. I was damned if I did and damned if I didn't. After some more research it seems that the C++ standard does have a language construct for this exact situation. The 'export' keyword was designed to let all translation units know about the template definition so that you can break the code into (.h) and (.cpp) files. This would solve my problems. The bad news is that Micro$oft decided in their infinite wisdom not to implement the export keyword, even though it is part of the C++ standard... So I began my search for another solution. This lead me to an article on Implicit Instantiation which means in every (.cpp) file I have to implicitly instantiate an object template of a specific type, like the following line: template class Factory<base_product> This statement creates an instantiation of Factory without reserving any storage for an object; code is generated for all members. This technique works but is not as clean as using export. I was hoping to compile the factory code into a (.lib) file to cut down on compile time, but now there are files internal to the factory that are dependant on derived products, and need to be implicitly instantiated using those derived types. This means I must recompile as well as add new code for every new derived object I add to the factory. But for now this works and I'll just wait for Visual C++ ver 7.0 or a service pack to hopefully fix the problem. I must say I'm fairly disappointed in Micro$oft's implementation of the C++ language, not surprised, just disappointed. Hopefully I can clean the code up a bit more and make it a bit easier to use in projects, because the next step is to put it through the paces and see how it performs in the game shell. |
|
| |
 | Cyptography | January 29, 2001 at 16:03:10 |
 |
|
Cryptography -- AlphaDog
Well it has been a few days since the last update... So what's new ?? I finished up the compression code and added some better exception handling and put the code to bed. Since I implemented compression I thought it would be a good idea to also implement encryption.. My first idea was to add a open source well tested encryption algorithm to the compression stream. After researching different methods I settled on the rijndael block cipher algorithm because it seemed relatively easy to integrate into my current architecture and because it has won the AES contest and is now waiting to be adopted as the Advanced Encryption Standard... So it seemed like an easy choice. After some testing and a lot of coding it started to look like it was not going to be trivial to add encryption to the stream. If I extended the stream to include encryption it would be very hard to implement and hard to maintain... What I ended up doing was allowing every object in the system that saves itself out to the compression stream to also encrypt itself. This gave the added benefit over the stream idea of having a separate encryption key for each object, and since the key is 256bits there is no way in the near future anyone could edit all the data in the object file. I'm not sure this level of security is really necessary, but there is no telling what use this object system will have in the future.. When the game is created, it would be in the developers best interest to encrypt both the executable and the data files it creates and reads in order to keep players from hacking the game and creating cheats. This is especially important for network games.. I will continue cleanup the code and add new functionality.. say tuned. |
|
| |
 | New Features | January 19, 2001 at 15:59:23 |
 |
|
Exceptions - Compression -- AlphaDog
Well looks like this update is going to be much sooner than I though, got a lot done in a short time... I finished up the exception handling (EH) code a few days ago and it seems to work pretty well. Very easy to test and gives a lot more info to the user if something bad happens.. It also allows all the object destructors to be called if a fatal error happens. This allows memory to be cleaned and the log to be closed, really nice.. I decided on C++ EH instead of SEH because of an interesting article I read on gamedev.net and the fact that C++ EH is much more portable. I let all the exceptions propagate up to the Factory level to be handled there. Makes for a nice clean system. I realize that EH is expensive, but its main purpose is to handle exceptional cases and should not be used for messaging or to change normal program flow.... So I should be ok..The cooler thing I have implemented is file compression... This just plain rocks.. I ended up using the Zlib compression library, which is open source. It is the same algorithm used for gzip, zip, and PNG. I also found some interesting code that extends the iostream class to use the Zlib package.. I tweaked the code and merged it into the inventory code which allowed the objects to save themselves out to a compressed stream.. I reworked the file saving code to only open and close the stream once, which made it a hell of a lot faster... To test the object saving system I created a loop to create 50,000 objects and then saved them to disk... The uncompressed version was about 2.5Mb, where the compressed version was 68kb that is a 98% compression. It is amazing that the difference in load and save time is not noticeable, although I have not clocked it in the code; which I will do as soon as I get the timer class linked in.. The cool thing is that if I can get the network code to work on Windows 9.x I could push the compressed info across the network and expand it on the other side, which is really cool. Anyway that is the newest info... |
|
| |
 | Object System | January 15, 2001 at 14:53:50 |
 |
|
Long time no update -- AlphaDog
Wow has been a long ass time since a real update to this system.... I have not done any real work on the game shell in quite a while, there is no real point working with a game engine that is 90% in flux.. They say that there will be a smooth upgrade path from Jet3D to jet3D Destiny that is being developed after the release of Genesis3D classic. The team from CCI is doing a great job reworking the code and designing a game engine that they seem to believe will be comparable to the Quake III engine, but will be totally open source. I have been reading the news forums every day and keeping up with the advances by the development team. I do believe that Jet3D Destiny will be all they say it will be, but in the mean time I plan to work on more abstract pieces of the shell, concentrating on OO technologies and leveraging the C++ language.. Lately I have continued work on the object based class system and made it a playground to test out different object creation and storage methodologies as well as some network stuff.. The object system now really is made up of three tightly coupled parts: factory, warehouse, and patent office. First you register you new component object class with the patent office as a blueprint. They you can call create, and the factory will use the registered blueprint to create the new object; only objects with registered blueprints can be created. The object is then stored in the warehouse inventory. The inventory allows you to query the object pool and get a pointer to any object stored there, it also handles inventory cleanup on factory destruction; which is a simple form of garbage collection. Each object has a simple COM-like interface to allow for perfect backwards compatibility. I'm still exploring the last bit.. The warehouse/inventory paradigm allowed me to implement a scheme where every object knows how to persist itself and initialize itself from disk.. This allows me to iterate through the warehouse inventory and save each object's state out to be later read back in. This will come in very handy in the future for saving game state. In order to allow a future integration with a scripting system and cut down on redundant code, I have implemented a simple command system in the object architecture. Basically it is a simple STL map container that stores the name of the command with a pointer to the function that implements it. This allows the shell to make calls to the factory and access functions in both the warehouse and the patent office though just one function for example: EXAMPLE: executeCMD("save_inventory","inventory.dat"); The warehouse object is a protected member of the factory object which allows inventory saving. The only function exposed to the global interface is the executeCMD function which has a specific set of commands that it can process. There is a simple internal function for adding new commands.. This will allow easy scripting of the object factory as well as cut down the amount of code needed to expose the internal interface of the three components of the object system to the outside shell. I have spent a lot of time implementing a test harness to make sure each part of the system works as expected and can catch errors on failure. I also created a HTML logging system to help me monitor the system as it runs. The next big implementation will be exception handling. The system really needs some form of centralized error reporting and handling routines. The log reports the errors but does little to recover from them in a elegant manner. I will be looking into Structured Exception Handling (SEH) to accomplish this task. I think the game shell will benefit greatly from a solid and well thought out object system that will be a foundation for all the parts of game play that need some sort of life span and state management... Well that's it for now... Who knows when I will post again... |
|
| |
 | Component Object System | September 26, 2000 at 11:49:39 |
 |
|
Component Object System
Ok... Here is my latest development news. Looks like the current plan of CCI is to get Jet3D 1.0 done about a year from now. That doesn't mean I'm going to stop development or switch engines again. What this does give me is plenty of time to re-evaluate the underlying oo principles of the shell system. After reading a pretty good article on 'Component Based Class Systems', I really believe this is the way to go in order to have a version independent pluggable component based system. This would allow me to add new features without breaking the system. It would also allow me to turn on and off features to facilitate testing. It will give me a chance to increase my knowledge of C++ and also give me some experience with COM. I do not plan to completely emulate the COM system, but to leverage some of its patterns. After doing some research in this area I almost feel like I'm learning C++ all over again, so I'm sure this development will take some time. It may be a while before I am completely comfortable with this technology, but I think it is an important thing to know and will make the game shell much more powerful; and in the end much easier to work with. If you are a geek and are interested in the actual code, go to the code example page and have a look at:
code |
|
| |
 | I am Alive | August 14, 2000 at 11:18:12 |
 |
|
Work continues
Well it looks like I can again have a life and start working on the shell again... The last two weeks I have spent working over twelve hour days, which leaves little time for sleeping never mind developing. Before that I was hunting down a bug in the game shell that took me over 3 weeks to find, probably one of the worst bug I have ever had to find in an application. A nasty memory overrun that should have shown up sooner. How the shell was ever even running with it I have no idea... Anyway I have actor loading almost complete and have someone working on some models to test. I am still having a lot of trouble getting animation to work correctly, but I do have the actor attached to the player object. It will probalby be a few days before I can start to work on it again, as I have to get to everything I have put off to get my work done... |
|
| |
 | It is Alive!! | July 11, 2000 at 14:17:11 |
 |
|
Player Object updated
I spent some time and moved the player code into its own DLL and have 'appropriated' the physics code.. Everything works great, collision seems good, player walks up stairs, friction and velocity are fine, jumping works. The only thing now is to attach an actor to the player, this is next on my list. As a side note I accidentally hit the 'fire' button last night and the player did drop a light source, so I know that the projectile code is still somewhat working; that's good news. |
|
| |
 | Continued Porting | July 10, 2000 at 12:47:56 |
 |
|
Bitmap interface done...
It looks like 99% of the bitmap class has been moved over to GameDriver. This means that the HUD code is working, which means that the menu system is working as well as the fading credits, background art, and the minimal AVI rendering I had implemented. I'm still having problems with the BASS audio system playing mp3s. I'm going to look into that later. I now have to start looking at my object classes like the GWPlayer class and make some decisions about how to implement it with the GameDriver. I think I'm going to try the DLL route.. Thanks for tuning in... |
|
| |
 | GameWeave re-born | July 08, 2000 at 17:28:47 |
 |
|
GameDriver Kicks
Good news.... I have finally compiled GameWeave with all of the GameDriver changes... Not only that, but I have engine initialization, world loading, and HUD servies ported. It looks like it won't take me that long to get back on track. As it stands right now I have A LOT of code commented out, and some of it will never be used again because GameDriver doesn't support the functionality. If you want to see the first level I loaded into GameWeave using GameDriver check out the screens section. Let's hope that GameDriver is around longer than Jet3D, I don't think I could take another port like this. |
|
| |
 | On the mend | May 02, 2000 at 22:48:41 |
 |
|
new cool stuff
I'ts been a while since the last update. I decided to take some time off
because all the hours developing was starting to effect my health, just
overdoing it a bit. Since my last update there have been a few cool
improvements to the Jet3D engine. True curved surfaces is staring to
show up, in beta anyway; having curved architecture would really give
the engine a lot more possibilities. There is also some work being done
on engine plugins, the first one being waves. I can't really comment on
it, because I have only seen screen shots; but it looks pretty good. I
know there is also work being done on a skybox and a storm plugin by the
same developer. I also hear that the shader work continues, which should
allow level designers to use procedural textures like water effects.
Endless memory leaks and bugs are being cleaned up day by day as the
engine code becomes more refined. JShell also progresses and there is
a group forming that plans to create a full blown game using the engine
and the shell. The editor also continues to improve. One of the editor
improvements allows you to save meta data in the level. This is useful
for storing the level name, author, version, and copyright. It also
stores a snapshot of the level from the editor. I have used this to
implement a level loading screen using the new screen font I have
created; see the screens page for a shot. It took me a while to implement
the level loading thumbnail. Seems there is a difference between the
16bit bitmaps I have been loading and the 16bit bitmaps that are stored
in the level. Apparently if the bitmapinfoheader shows the bitmap
compression to be BI_BITFIELDS then I have to set the jeBitmap pixel
format to 16bit 565 RGB otherwise I have to set it to 16bit 555 RGB.
That's it for now.. check out the screens page for the new load screen. |
|
| |
 | FlashLights... | April 05, 2000 at 12:39:24 |
 |
|
Bud Light
I got a great reponse on the Jet3D forum about the flashlight thing, and it seems like
I was kina thinking bassackwards... In the real world light travels from point a to
point b and shines on everything in its path. In Jet3D the light does't really travel,
you just see the effects of the light on the surfaces it hits. The trick is to find
the (in) vector of the player (the direction the player is facing), rotate the vector
by the current mouse-look angles, cast a ray in that direction to a maximum distance,
test for collisions along that ray, and put the light at the point of impact. This
seeems to work pretty well, but I am seeing some goofy behavior on levels with mixed
geometry. I also need to think about making the light radius and brightness a function
of player distance from the point of impact. Bud has agreed to help out with some of
math involved in making that happen... |
|
| |
 | Light Bright | April 04, 2000 at 10:38:32 |
 |
|
Just plain cool
After about a week of vacation, I have started working on the code again.
I will probably give up, for now, on rendering 24bit video. I have posted
the question on the forum, but I have yet to get a response. 16bit video
is really all I need, but I'm a stickler for details. The core engine code
has gone through some changes in the last week or so. All objects added
to the world at run-time are added through a common interface, it use to
be that actors were a special case. This causes problems, and made it
difficult to implement collision detection. The decision was made to change
the method for adding actors to the world to utilize the common interface
that all other objects use. I took some time and made the changes to
GameWeave to use the new functionality. Another thing I have been working
on is adding dynamic lights to the world at run-time to achieve certain
effects. There is a need for the main player to carry a flashlight or
lantern for dark areas of the world; also it would be cool if some
weapons/spells cast light on surrounding objects when they travel through
the world. I have implemented a small light class that I can attach to
any object in the world. The dynamic lights in Jet3D are more like omni
lights than spots, so they illuminate in all directions. This is fine for
weapon effects, but not too cool for a flashlight. Right now I have a light
attached to the main player that can be turned on and off, but it looks more
like a lantern than a flashlight. I have also attached a light to the
missile class. This looks pretty cool if you fire a missle down a long dark
hallway. I am seeing some pretty severe intermittent crashes with using the
new light class, so I think it will be some time before it is stable. I have
posted some screen shots on the screens page, so check them out if you want to
see the new lighting effects.. |
|
| |
 | Video challenge | March 22, 2000 at 10:42:32 |
 |
|
16bit vs 24bit
I started the experinents with rendering AVI frames both
in the intro and in the game.. It looked much easier than
it really was... The VFW API wasn't exactly what I expected
and it had some quirks that kept me quessing for a while.
Since the AVIStreamGetFrame function returns a pointer to a
BITMAPINFO structure, I had to write a function that converted
a DIB to a je_Bitmap so that the Jet3D engine would know how
to render it. After some nastyness with the scope of the
returned DIB I finally got a frame up on the screen; the color
was all wrong and it was upside down.. I forgot that most
DIBs render bottom-up (by default). I had to alter the
conversion function to detect this and flip the image in
memory. The color problem was because graphics hardware can
represent 16bit image data very differently (555 RGB,565 RGB,
555 BGR,565 BGR). What this all really means is that the
green bit in the image ( and I mean 'bit' in the digital
sense) can be in a slightly different place depending on
how the hardware manufacturer decides to represent it. Once
I found the best hardware settings, 16bit AVIs looked great.
They played a little fast because I am not controlling frame
rate yet, and I have not decided how to handle audio. I
am now having problems with 24bit AVIs. They render on the
sceen with a green hue. I have tried creating je_Bitmaps with
both BGR and RGB pixel formats, but nothing changes. I'm trying
to use the code the engine uses to load 24bit *.bmp files
as a guide but nothing seems to work. I can always fall back
on 16bit AVIs, but I would like the flexibility to handle 24bit.
When I am done we will be able to display pre-rendered video
as intros and cut-scenes, and maybe even on objects in the
game... |
|
| |
 | All work and no play... | March 20, 2000 at 15:09:20 |
 |
|
The State and Credits
Good weekend of coding has produced some cool results. I've got the game state
code done, so now you can switch back and forth between the menu system and
gameplay; of course I also finalized world loading and cleanup so multiple
levels can be loaded from the menu... . I replaced the regular Windows?
message loop with my own game-loop. This removed the normal input device
processing, so I am currently realying on the DirectInput wrapper class to
handle all input device polling. This works great, but I really have to start
thinking about a robust way to handle key-binding. The coolist new thing is the
intro credit code... It is derived from the HUD base class and allows items
to be faded in and out over time. It gives the game credits a really cool
theatrical trailer type look. I also wrote some ominous intro music and created
an MP3. I would really like to have a way to display video in the game engine
for cut-scenes and intros. As it stands right now the engine supports AVI but
only through Windows Media extensions (not a fan). I would really like to
be able to render video directly on the world back-buffer, or even on a
surface in the world, but most of the surfaces are hidden by the engine
driver. I'm going to try some experiments and see what happens... Maybe a
VideoObj.dll would do the trick... We'll see. I have also tried to make most
of the shell functionality resolution independant. This is made a little
easier by the GWBitmap class I finished last week, but I'm still not sure how
to handle HUD item placement in different resolutions. One solution would be
to have separate hud.cfg files for each resolution, but that doesn't sit well
with me.. JShell (another Jet3D game shell) went into beta today, so I'm going
to download it and see how the author handles some of the problems I am having.
Well that's it, no screen-shots today; the cool credit fades really need to
be animated, and static images would not do it justice.... |
|
| |
 | Image is everything | March 16, 2000 at 10:40:42 |
 |
|
new classes
Well kiddies it has been a few days now... I haven't
been as productive as I could but hey, gotta eat and
sleep sometime.. Anyway, I have written two new classes.
One abstracts the Bimap object so that I can represent
a graphic independant of format. I have also created
a DLL based on my TempusImage library for loading
images (this is the same code I use to do my JPEG
screen captures). The engine only knows it is loading
an 'image' it does not care about the format the class
handles all conversions. The class also allows for
source and destination rectangle blitting, and
encapsulates better engine cleanup. This is a big
improvement over the multiple functions needed to
remove a graphic from the engine/memory. I also
dervived a class from the image class to manage
fonts. Right now it only handles mono-spaced fonts,
and making them is really tedious, but that will change.
I also tightened up the gameloop a bit and got rid
of a few bugs in the way I was managing the gameloop
before. It looks like the Jet3D open source team is
plugging away pretty hard at the code, and there are
daily changes to the engine core. I'm hoping that
I have abstracted the GameWeave design to a point
where engine core changes will only impact the shell
minimally... Well, back to work.. |
|
| |
 | Change you whole latitude... | March 08, 2000 at 10:53:28 |
 |
|
Coronas and projectiles
Things are going pretty well with the development of GameWeave
right now... I'm going to have to take a step back pretty soon
to review a few things and do some clean-up to make sure the
architecture is on track (things can get pretty messy when you
are testing new functionality). I guess the coolist thing right
now is that I have some simple projectile functionality. You
can shoot at stuff (isn't that what it's all about anyway..??).
Right now the projectile is just a semi-trans green box, but
it is just a placeholder for a real model... It's all there,
sound, collision, projectile mortality. I will be testing a
real model soon as well as collision effects and damage. I have
also improved upon (didn't take much ) the basic physics of
the game objects; Improvements have be made in gravity,
acceleration and momentum. I am also trying to implement some
sort of timer to keep the game action running at a constant
frame rate. I don't mind the screen updating at high frame rates
but it should not effect player movement (ie: a scene with simple
geometry should not allow a player to walk faster). For the first
time since its release I have tried using Coronas on lights, and
I must say they look pretty good. I tried to move the world loading
functions into their own thread of execution, but it didn't work.
I think it has something to do with the way memory is allocated by
the thread process; I know it is allocated from the main process
heap, but I think it may be released on thread termination. I will
revisit this later. I don't like the idea of the system being in
a locked state when a map is loading... yuk!! The group working
on the Jet3D engine have added some utility functions to the
engine to try to simply world loading and initialization. I took
time to update GameWeave to use these new functions and place
the old methods in a deprecated file... Those guys are doing some
great work. Speaking of the OpenSource dev team, I have been
asked to submit my PlayerStart object code to be included in the
main Jet3D engine... I spent some time optimizing the game loop to
ensure a even framrate, I think I have gotten it to a good place
but I will probably look at it again in the future. Well that's it
for now... Be sure to check the screens page for new shots of
coronas and some caps of the tutorial level. |
|
| |
 | The Flu sucks | March 03, 2000 at 10:27:13 |
 |
|
lost of new stuff
Well it's been 4 days with the flu but I have still managed
to make some advances. It looks like ActView and TrueJET, the
actor conversion and viewing tools are 'mostly' bug free now;
and now that I have my new copy of TrueSpace 3.1 I can start
testing new actors in the game. TrueSpace 3.1 does not seem
like the most stable app after using it for a few hours, but
it's ok I guess. I have got basic collision and gravity
working, nothing fancy and you can still get through some
walls at the corners if you angle your player just right, but
this is stuff that the Jet3D community is still working on; so
I know it's not my code. I have also coded up a editor object
(DLL) that holds a player start position, (I still don't know
why the SDK didn't come with one). So now when you design your
levels you can just drop in a player start position an GameWeave
will put the player at that position at startup. I plan to
expand on this concept a bit to store a pointer to the player
model but that's just gravy right now. The Jet3D community
continues to add features to the editor and it's starting to
be pretty useable, the time is going to come when I need to
start thinking about a tech-demo; so any artist/modelers/level
designers... speak up; gonna need some music also. Some
other mini-apps/game shells for Jet3D are starting to pop
up in the community (all with source code...). It has been
nice to see that my approach is similar to others in the
community. I have also gleaned some insight into how to
do a few things much better. I have recently added
DirectInput support for all input devices; by observing
how others had incorporated it into their shells. I'm starting
to work on basic player physics; velocity and momentum both
with running and falling. Jumping and gravity are on my list
as well as my first attempt at projectiles and damage; and
movement of dynamic lights. The next few weeks should be
very interesting. Anyone with an idea for a demo should let
me know. |
|
| |
 | Long weekend.... | February 22, 2000 at 09:58:45 |
 |
|
We got the tools, we got the talent..
Ok.. This is going to be a huge ass dev diary entry because
a ton has changed since my last entry. On Friday I downloaded
the lasted updates to the engine source. I compiled it to see
what the new fixes to actor collision and rendering would look
like. It looks like actor/world rendering is a bit faster and
'all' actors are now rendered in portals/mirrors. It's really
cool to actually see yourself in a mirror in the game. Since
world collision has again been re-worked it looks like I'm going
to have to rework the way I use it in the game. Since the game
shell coding is coming along really well, I'm going to have to
start testing art/models we are going to make for the final product.
It occurred to me that the current set of tools... well... are a bit
difficult to use.
I took most of the three day weekend to port both the original
ActorViewer that came with Genesis3D and the trueGENE program
that converts TrueSpace models into Genesis3D actor files. This
is great because I don't particularly care for the ActBuild and
ActorStudio that comes with Jet3D. I actually downloaded a simple model
of a table and used TrueSpace to texture it, I then used the
re-worked trueGENE program to convert it and then the ActorView
program to view the model. You can see some screen caps on the
screens page. I did finally get the rhino Ted gave me into the
game, but I'm having problems getting it properly textured.
BTW Caligary had a special this week where they were selling
Caligary TrueSpace 3.0 for $95.00, so I ordered a copy since
they will allow an upgrade to 4.5 for not too much. I'm going to
concentrate on player interaction with the world next since
most of the tools to get stuff into the game are working. If
anyone has anything they want to try out let me know, and I'll
set you up with the tools. |
|
| |
 | Freak, Freak, Freak,Freak! | February 18, 2000 at 10:01:09 |
 |
|
HUD image problems gone...
Well I managed to stop the game engine from freaking out when
drawing bitmaps of different sizes. The problem was that
there are two different ways to attach a bitmap to the
engine and two different ways to render the bitmap, and
it seems that mixing these two is a bad idea. I have the
HUD class effectively rendering both alpha and opaque
bitmaps on the screen. Check out the new shot on the
screens page. I used some of the HUD items from the
Genesis3D demo..BTW I checked out Wild Tangent's Game Driver
which is another offshoot of the same Jet3D base code.
Really nice stuff.... |
|
| |
 | Final HUD system in place | February 17, 2000 at 10:49:17 |
 |
|
simple script
Since I'm going to be playing with the HUD for a bit I figured I'd implement
a simple script to read in HUD elements for testing, of course this will
change in the final product, but for now it's good enough. Below is an
example of how I define a HUD item, this example is the crosshair you
see on the screens page. Everything is pretty self explanatory except
for the alpha settings. alpha1=1 tells the game to render the graphic
as partly transparent using the number in alphaN1. 0 is completely
invisible and 255 is completely opaque. Kind of like the opacity
setting in Photoshop. If anyone has any cool ideas for Heads Up
Display graphics, let me know I would love to test them.. you know
the regular stuff (health, money, etc...) This means you Naski and
Spleen...BTW black in any image is completely transparent, so keep
that in mind...I guess I'll post the crosshair graphic on the down
loads page some some of you can get started.. ;-)
name1=Crosshair
alpha1=1
alphaN1=135
xpos1=376
ypos1=276
gfile1=Art\\crosshair.bmp
|
|
| |
 | Party on... | February 16, 2000 at 16:50:32 |
 |
|
I spoke too soon..
Well I guess I spoke too soon. Thanks to Mr. Design Patterns,
I have implemented a much better link-list management system
for the HUD by using a separate link item data structure, which
has nothing to do with each HUD item. I interface with the
items though the main HUD container class which contains a
list of link intems that actually point to the separate
HUD items. This design is much cleaner, a little harder
on garbage collection, but at least each Game HUD has it's
own list of items. Gotta start working on some funky graphics
to overlay on the game screen, also need to work on the menu
items on the menu HUD... Anyways... Thanks go to Steve Blegstad,
for the inspiration and direction... The HUD works great, although
I'm not sure that it can do Lincoln..! |
|
| |
 | Good, Bad and Ugly | February 16, 2000 at 13:33:51 |
 |
|
HUD problems and New Libraries
Well the HUD development is not going well right now... Got some
major problems with the link-list container design and implementation.
I'm not sure how to handle the pointer to the first item in the
link list chain. I'm having words with my man Steve 'Design Patterns'
Blegstad, and he has given me a few good ideas on implementation,
but the bottom line is that there won't be any pretty pictures of
the Heads up display on the site for at least the next few days.
The good news is I have re-compiled the Jet3D engine source from
the CVS system and all the new bug fixes don't seem to break my
code, and I hear the mirror problems for actor reflection are
fixed, but I have not had a chance to test it. |
|
| |
 |
Link Lists and the HUD |
Monday, February 14, 2000 |
 |
|
HUD Object List
Well I've just about finished the HUD link list... HUD and menu items are now created and appended
and managed by the main HUD class... Each object is responsible for its own creation,destruction, and
rendering. The main HUD class acts as an interface to the HUDItems list looping through the list
and calling the appropriate functions needed by the current process. I have decided to identify four
main game states: INIT,INTRO,PLAY, and MENU. There is a process class that handles the flow of events
in each one of these states calling the appropriate render class. Each render class has its own
HUD class, I have decided to treat the menu state the same as the game state because it shares most
of the same functionality, with some subtle diferences... Ted has sent me a model of a Rhino which
I am trying to get into the game, but I'm having some problems converting the model into something
that the game can read in... I'll post some juicy pics when I have it done...
|
|
| |
|
|
|