Monthly Archives: October 2006


Well as is to be expected after developing a system as complex and important as the movement physics system I spent some time analyzing it and created a much more concise, efficient, system.

So the movement physics have already undergone a major revision which now easily incorporates friction. I have to implement a Velocity read out so I can ensure the friction is making the user maintain a constant speed. After then I will implement world coordinate tracking (not hard). And then Mouse Look. That should round out the beginnings of not only a solid base for the movement system but a solid beginning of an FPS style camera.

Then of course comes the adaptation of the Geometry loading and rendering code.

I also spent several hours today reading articles and forum posts on source code optimization and found many techniques I will need to learn more about and go through and refractor much of my code with after running gprof. I was starting to get very worried about performance, my frames had started to dip to the low 500s with the old movement system, but with the new revision we are back steadily above 600 while moving.

Very exciting to have that working 🙂

– Adam


Work progresses slowly when you are burnt out. But I struggled through my mental fog tonight and managed to work out some new concepts for how things should work as well as lay down a quite a few lines of code.

But with just over a month left before finals Im starting to wonder about what can realistically be accomplished before the deadline. So tonight Im going to review what has been done and what is left to be done.

So far the following has been accomplished:

  • Platform layer implemented with SDL
  • OpenGL integration
  • Cross platform OpenGL text
  • Majority of the Framework Services implemented
    • AutonomousActionService
    • ElementManagerService
    • EventRelayService
    • ModeService
    • SimulationResourceManagerService
    • TimeService
  • Framework Base classes govern and simplify the interaction between everything inside the framework

Along with all of the Framework progress some progress has been made towards the Simulation implementation such as implementation specific Entities. As of right now it is possible to load the Engine, move around in the empty world ( The green grid is there ).

This doesn’t sound very grand but a good example of the hard work on the Framework paying off is the FPS counter. With all the base classes all that was necessary to implement this was to inherit from the Text2d Class and over ride the getString() method of the Text2d class with a function that would query the TimeService and use the information appropriately.

What is left to do? Well to night a lot of work was put into the movement physics portion ( Which has generated the first Element Service as opposed to a Framework Service, The KineticElementManagerService ) which required a new portion of the Framework to be created. The Autonomous Action Service which allows Elements to perform actions without any user input initiating those actions.

The movement physics will not require too much more work to finish, and this will easily allow for pseudo physics such as friction and gravity. In fact, it necessitates them.

Any way after that I will have to adapt my old geometry loading and rendering code into the framework. This. Will take. A lot. Of time. In the process of adapting the loading and rendering code I am going to finish implementing the light map loading and rendering code that is partially implemented in my old engine so it actually looks decent.

This whole process Im allotting a month for. So assuming I finish the movement physics this week, that will give me only about two weeks at the end of the semester to work on some sort of tech demo of the engine and it’s abilities.

Oh man…

– Adam


The last couple days of coding are very much a blur. Its hard to remember exactly what I touched. But after a ton of very hard work where very little visible progress was getting accomplished I have two major break throughs.

The first seems minor but was really a very VERY time consuming thing. I finally have cross platform text rending. The second is I now have user controlled movement of the camera.

The latter probably doesn’t even sound that trite but its even more complex then one might anticipate because while I had the timid beginnings of the event system in place already the entire concept and implementation of the system matured GREATLY over the past few days and there is now a solid base which will be built off of rather then the flimsy concepts from before that had to change as new things were needed.

The input controlled camera movement is in its very early stages and this part is going to require a lot of attention to get right since the systems that affect its movement are the systems that affect all movement in the 3D world.

Lastly I implemented the changes to my Logging that I mentioned in the last .plan. While its not a huge thing it is sssoooo nice for development let me tell you.

Any way this is going to be a short one for the same reason Im not posting another screen shot of the state of things. Because Im freaking exhausted. And I seem to be getting sicker and sicker no matter what I do. Aannnyyy ways… Several large strides forward but so many more to go…

– A very tired Adam


Well tonight I have a treat for you, after much slaving I actually have graphics rendering via OpenGL. I’m still working on getting cross platform text to render which can be seen from the red boxes, but it will get there.

So a lot of work has gone into the SimulationResourceManagerService as is evident from the graphics. Both design wise and coding hours wise. So much so I almost forgot the joys of creating a new Framework service which had been such a frequent occurrence early on. Well the latest task is moving through the 3D scene with user input.

After some designing I realized a service which I had theorized about earlier in a more narrow application could actually be expanded to solve some design issues I was encountering with user input controlling the camera.

And so the EventRelayService was born earlier then had been thought. It is used by Elements to register an Event which should take place at a latter moment in time. Either via a timer ( a Timed Event ) or at the end of the current frame cycle ( a Frame Cycle Event ). This is used by the User entity so that the user entity may register movement input and accumulate all of the desired movement commands and not inform it’s subscribers that it is moving until all of the input is accumulated. So when the first movement input is received by the User entity the User entity registers a RelayEvent with the EventRelayService.

At the end of every Frame Cycle just before rendering the EventRelayService dispatches all Frame Cycle events. So the RelayEvent that the User entity registered receives an event telling it to notify all it’s subscribers that it has moved. Then the SimulationResourceManagerService who listens to all Resources ( the user entity is a Resource ) receives a movement event and acts accordingly adjusting the scene graph and what ever else may be concerned with the event.

It is really a much more versatile Service then the scenario just described but that is one good example of it’s usefulness.

One these Services are fully hooked up together it should not take much at all to finish the user controlled movement and rotation functionality.

Also quite serendipitously I have come up with a way of implementing a project wide unified logging solution with a new header file and some improvements to my logging class. My logging techniques have been incrementally improving over the entire life span of this project and I think this is a huge step forward to something nearing a final solution to my logging problems.

Then I will begin integrating my v30 BSP loading and rendering code into the SRMS which will be quite a large undertaking. But with that completed the minimum deliverable as described for this Independent Study will be complete and I can move onto enhancements that will show the true power of the Framework!

– Adam


Well quite a bit of time as passed since the last .plan file. And a lot has transpired. I spent quite a few days beefing up my hash table class as well as putting a lot of work into the base cases.

These are the classes that not only run the entire framework but EVERYTHING inside the framework either inherits from, or requires to function. Needless to say they are becoming very robust.

So with most of that done I sat down this weekend and began implementing the functionality of the SimulationResourceMangerService which is the back bone of the graphics. It manages the scene graph.

Unfortunately I still have no graphics to show. Unlike the rest of the framework that seemed almost atomic ( It had to work the way it works or it simply would not work. ) The SRMS could be designed 10,000 different ways and neither one would be very clearly more right than any other. So a very large amount of time was spent on design decisions and metal test cases.

But I now have a pretty firm system of how things will be designed in this implementation and have just put in quite a lot of hours implementing it.

As of right now I have the User entity ( Which now inherits from Resource which in turn inherits from Entity ) on creation registering it’s self as a resource and then setting it’s self as the root of the scene graph. This process sounds simple but the complexity of it is real. There was a lot that had to be done to ensure future flexibility. And how it is set up now I am confident I won’t be limited in feature possibilities later.

Any way, next time I will be implementing a basic Text Entity which will add it’s self to the scene graph, then I will begin integrating OpenGL into the Visitor class so it will actually render stuff while it traverses the Scene Graph.

– Adam