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
adam_21sep2006.plan
Well the first day of Fall is here and production on Black Engines new Framework has begun in earnest. I spent 5 hours last night working on the Class hierarchy set up. The Framework now Initializes Framework Services.
As a test of the base Element class type ( EVERYTHING inside the Framework inherits from Element ). I created a User Entity ( The hierarchy goes: Element -> Entity -> User )
and then used the ElementLookUpService ( Which is a Framework Service, and which will probably be renamed to the ElementManagerService soon. ) to find the User Entity instance and report information from it.
This is a very critical step because this is pretty much the back bone of the entire framework, Object lookups that is. Right now the storage of the look up information is stored in a vector, obviously horribly inefficient. But I plan on designing and implementing a hash table for storage which should drastically decrease search times.
The next step is one of two things. I need an initial content loader, but that requires two services plus the beginnings of my scene graph implementation, so that will probably come later. The second is the SimulationModeService ( Which is a Framework Service ) which will handle input dispatch.
So hopefully I can cram some time into the next few days. My goal is to be back to where the engine is in v.5 by the end of October. We'll see how that goes...
- Adam
