I had a good weekend. I spent most of it reading the new Game Coding Complete – 4th edition book that I got. I headed down to the local post office collection depot after the gym and was happy to get 2 books(the one has gone AWOL but I’m not too worried about that particular one right now.) So basically I got the Alan Thorn book on how to design and implement a game engine (not started reading yet) and the GGC4 book which I did start reading.

So far I’ve learnt a lot about game development, the topics include using shared pointers, resource caching,  basic game design philosophy, which in this case is reminiscent of the observer/publisher/subscriber pattern. Basically you have 3 components who all talk to a each other by way of a central component(the game logic component). The other components are the application layer and the game views. The game views are the manifestation (or eyes) of what the game logic component determines is happening in the game world. The other is the OS specific layer, which is the application layer.

The game logic code basically gets stimulus from the other layers and uses that stimulus(events) to modify the game world. So if the game view says move left, the game logic sets the car to move left – that sort of thing. Its actually pretty cool because the game logic creates and manipulates what the world is and what its state is(what its doing) and it does this by determining how physics, incoming movement events would manipulate what would happen in a simulation. Actually that's what the game logic does, it runs a simulation of the game world and the game views just interpret the game world’s simulation, mostly by drawing it or reacting to it. So the whole events being send around mechanism is very reminiscent of OOP and well these books bang on about C++ unsurprisingly. I can see the benefit however and I’m still wondering if I should use C instead. Because as great as the code is that does stuff, its all basically C which has been(in my opinion) abstracted into classes – which annoys me because as much as I like working with objects, they make things complex(though they are reusable). I’m not going to be writing a game engine every year so I wonder if i really need to spend time following their examples in C++ and rather just re-write them in C – for the fun of it.

Like for example, they tend to use a common VUpdate() function on all things that can be updated in one timer tick, and they then put that as a virtual function in a base class for other updatable objects moving forward. Fine. They also use interfaces and the factory pattern to decrease the impact of change in the code base. Fine too. They use C++ shared_ptr too to easily allocate memory and forget about it(effectively leaving de-allocation  to itself) – also fine. They use a process manager like what linux does in the kernel. Fine. Can all this be done in C – you betcha. They also talk about using your own memory allocator, which is a new thing for me but you can do that in C too. I guess its not about if it can be done in C or C++ – it can, the question is would you if you’re a pro dev in the industry. I think the question is probably not due to the time it take to write C and re-write data structures and algorithms. There is no STL in C. There is no interfaces in C. You’d need to massage the factory pattern in. I’m enjoying the speed at which C++ makes code progress but not at the complexity and abstraction it provides – others will argue that the abstracts is awesome. It might be.

GCC4 talks about DirectX11. I was learning SDL and although I’m learning DirectX lingo in this book, I like the SDL route so I’ll continue just learning the concepts and then apply them to SDL work. The other book which I’ve not read uses SDL. That's kinda good. Its version 1.3 though and I’m all up for V2.

I also did some university work/assignment. This is all about classic software engineering principles. So I’m talking about drawing conceptual diagrams and putting associations and multiplicities between classes, collecting requirements and interpreting them. I quite enjoy this but find it quite boring. I like object and class drawings but hate the time it takes to do. I wonder if that's why no one seems to do them anymore. I got some good results but also which was good. The tutor’s comments included that I should stick to the wording of the course – I’m damned if I’m going to do that. That’s just a waste of time honestly - I’d have to scrutinize the text books and activities just to phrase the thing just the right way when my words mean the same thing! I don't care if its easier for him to mark or not, right is right and that's really the point -  I’ll use the way that's the simplest for me while being factually correct also. You can’t mandate how to say things in the real world, people just go and say them and if right, that's it. Their is no point, in my mind, spending the extra strain and pain(because its really painful) trying to fit into everyone else's vision because its easy for them. In the real world, when someone explains something to you, they use whatever vocabulary that makes sense to them, and you interpret that for factual correctness. You dont stop the architect in mid-sentence and say, “don't use that word, I prefer this one”, He’ll just get frustrated with you and say “man its the same thing, do you get what I’m saying?” and in most cases you will have. You can stop every one from changing how they explain things. I wish I could because it would make be understand things easier because I would be familiar with terms I know but the world doesn’t work like that – you have to listen and interpret. That’s how the real world works. No one will say the same thing the same way as everyone else.

I also watched some videos this weekend, basically that was Man of Steel – Superman(I enjoyed this), About a boy and 40 days and 40 nights, both which were OK. Its nice to watch videos on weekends – no other time.

I also watched the tail-end of the England-France game in the 6 nations. I enjoy watching rugby. I’ve had times when I’ve thought that I could take up rugby again but I dont think so, its just not worth getting injured for – especially if its no your life’s passion and its not mine – it was drummed right out of me in high school.


Comments powered by CComment