Since Noughts and crosses and All Bran Flakes, things have been progressing at a much higher run-rate, mostly to do with my computer studies.I finished my C programming course last week and now I have a little more time to sleep on Tuesdays. I got an email from the university asking welcoming me to my next course which is starting in September so I've got about 2 months to complete my current 2 modules. If they could invent more time that'd be great.
Its been a welcome relief because I've been trying to focus on the journey home on my computer to either do some reading around Computer law (tort) and game programming however the latter is still taking a bit of a backseat. The concepts currently being investigated(irony) are :
- Computer Misuse Act 1990 - Hacking (Criminal)
- RIPA - Spying (Criminal)
- Fraud et al (Civil)
- Intellectual property laws (Civil)
- Contract Law (Civil)
The contract law is quite interesting because its opened my eyes to a lot of considerations that are routinely taken for granted in forming contacts such as the constituents and requirements that make up a contract such as the qualifying what must be met for it to be legal and correct. Facinating really. It does feel however that there is a bit too much material to cover at times.
That said, I have managed to replace my primitive geometric representations of a Pong ball with pretty images of Aliens ie .png resources loaded into memory instead of drawing rectangles.
I've been somewhat concerned with the entangled nature of the approach being used and which is based on my learning material and I found some time on the train last night to try and untangle what it was that was bothering me about it.
I have a few problems currently around me representing the game objects as strong, shared pointers in various places and when I unload the objects (in response to unloading the resources from memory due to a level/scene change) the event system is still considering its list of object subscribers to be there/active/alive/current, which obviously would be OK were they weak pointers to the now non-existent objects.
I'm not quite sure I like the architecture that I've been studying with respects to the casual regard it has for seemingly haphazard interaction of the various subsystems ie the graphics rendering system, the scene/level management system and resource management system all implemented as Singletons.
Part of my discomfort is in the seeming difficulty in trying to reason about when effect will occur but I'm wondering if this is a consequence of the concurrent and real-time nature of this type of development and I guess this is really what I enjoy about it: the application of programming in varying perspectives and circumstances. Its also great for practicing. This seemingly uncontrolled and uncoordinated aspect is especially true if you've got a disparate collection of singletons all managing their own subscriptions to the event manager.
What I think is required is a more centralized management of event subscription. Another good idea, perhaps at the expense of future flexibility is the coupling of related concepts which in effect would be OK as that would be increasing the utility and cohesiveness of strongly related components. Decoupling is not always the answer all the time though many people have mantras like this.
I certainly have a lot of regard for how the event management system works under GUI development frameworks such as Winforms, Gtk and Qt for instance. They do quite a good job at managing events. Indeed one of the reasons why C++ is so great is the low overhead in dispatching events however like most things, done incorrectly would diminish any potential benefit.
Was a good day for a run this morning, though although it says my relative effort was 8, it felt a lot higher.
I ran my fastest 1km and 5km apparently this morning at 3 minutes 8 secs and 20.5 minutes respectively.