adam_02nov2006.plan
The movement system has undergone some more changes due to mouse look and my Trig knowledge has been put to the test working with the angles generated from mouse look. Mouse look, side strafing, friction, Velocity Read out, and World Coordinate tracking are all working.
The current movement code for the camera does not allow for side strafing and forward/back movement at the same time though which is pretty important. Also there is some mixing of what code should be in the Resource class and what should be in the User class. So those two things need to be sorted out.
But I think I am going to move onto geometry loading and get back to them since neither is essential at this point. In fact, though it would be crappy, I could leave the current movement code not allowing simultaneous movement in different dimensions as is. Of course when I turn this into a product that will have to change. But I really need to get moving along with this. So the geometry loading and rendering code must be adapted now.
- Adam
adam_31oct2006.plan
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
adam_25oct2006.plan
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
adam_19oct2006.plan
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
adam_16oct2006.plan
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
adam_09oct2006.plan
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
adam_28sep2006.plan
WOW, ok so I began coding today by refactoring some of the base classes a bit again. Then I moved onto beginning the implementation of the ResourceMangerService ( Which is a Framework Service ).
I got the basics down and turned to drawing up the specifics of what was needed for the base implementation ( There is A LOT for this one. ) One of the things I came to was the fact I would need a new look up table inside this service for various reasons. And that was the rub. My current look up table inside the Element Manager Service is implemented with a vector class. I knew I would have to refactor this to use a hash table at some point and now that I was in need of another look up table it made sense to come up with a permanent solution rather then rewriting tons of search functions when the table implementation changed later.
A quick Google search revealed that neither STD or STL contained a hash table implementation. Not really upset by this I set out to create my own templated HashTable class. So ya… It turns out while the concept of template classes is pretty simple, there are A LOT of implementation quarks with them.
I finished the initial code of the HashTable class and the HashTableChainNode class in under an hour, debugging took probably 30 minutes or so. ( I’m getting real good with an obscene amount of pointer usage 😉 ) Then the instantiation and linking errors reared their ugly heads… and 6 hours later I sit before you a nearly broken man.
Yet a broken man with a working Hash Table implemented into his new Framework .
In other news, a few days ago I completed the first version of the Event struct and now have a keyboard triggered event poking a User object and that object responding to the event. Which is a pretty big step forward seeing as how this is an Event driven Framework.
So ya, the Framework is pretty much back where it started before I started coding today ( just with a nearly O( 1 ) look up implementation 😉 ) which is always kind of demoralizing after so much coding. But handle look ups are the name of the game here. So the backbone of the Framework has been greatly strengthened.
And I now know C++ class templating pretty well.
Next: The ResourceManagerService ( and graphics! )
- Adam
adam_24sep2006.plan
I put in a good 6 hours today and got an ok amount accomplished. There was a good bit of refactoring and additions to the code base I worked on last time. But today’s focus was on user input.
I created the Mode Service Framework Service. In traditional event based frameworks this would be called the dispatcher. It takes input and generates and dispatches events to where they are supposed to go.
It is now to the point where I can receive keyboard input and perform an action specified by a class that inherits from the Mode base class. The big things that the Mode Service does is controls a stack of Modes. The idea is there are different situations that will require input to be handled differently.
So if say the program starts up with a GUI to select a file to load, mouse clicks will be dispatched to GUI components. Then once a 3D file is selected a new Mode will be pushed onto the stack. Now mouse input is used to rotate or move the 3D world.
The next step with this is designing the actual messages. I need to figure out exactly what is required for a versatile message struct which will be what is passed around inside the framework. Then my now working Mode Service can generate a message and dispatch it to an Element.
As you might imagine the design of the message / event struct is absolutely mission critical so I am taking some time to design it.
After that is all set up I will be moving onto the Resource Manger service and my Scene Graph!
- Adam
