- Details
- Category: Game Development
- By Stuart Mathews
- Parent Category: Code
- Hits: 3425
So I did some more reading about game development this weekend. Its a pretty good book I’m reading which goes deep enough to provide sample c++ code to achieve some pretty advanced techniques.
The last concept I was learning was about Binary Spatial Partitions to identify which 3D objects are behind others to identify which objects can be removed from the 3D graphics to eliminate unnecessary processing. Pretty interesting algorithms that advanced with the very goal of doing what it does really fast so you can do the work in one game ‘tick’ – amazing really how performance the cornerstone of everything that we try to do in graphics. I never really appreciated how much one is expecting to do in such a limited time(a game tick). A month ago I’d have said that it could not be done – seriously.
Basically the book is about the size of my Xbox and its got a lot of content – My arm gets sore when reading it. I’m getting rather excited in how they described every thing or ‘primitives’ in terms of polygons or vertices or triangles. It takes a lot to store and describe an object in terms of triangles but it certainly is possible. Then there is drawing textures over the triangles - texture maps.
I also read a lot about how they animated old 2D games which was pretty cool – from manipulating the screen’s colour palate to make alternative colours flicker to produce effects like water flowing. I have also learned about how some games painted ‘scenes’ by manipulating sprites and painting them onto the background – stuff to do with alpha blending and such like. There was talk about parallax scrolling and such talk which I got but wasn’t too involved in – I breezed over the source code.
There was also a section on programming in Lua script as a means to abstract artificial logic in terms of rule systems and pass them into the game engine and have the game engine react & manipulate its internal state based on the Lua script. What was particular interesting was seeing how you could call C++ code/functions from inside the Lua script and generally how you could pass data back and forth between the calling c++ code and the Lua code. You can implement a script in Java too using the JNI (Java Native Interface) to achieve the same results – with arguably more of a first class citizen when it comes to object orientated programming, albeit slower alternative to Lua - which is fast.
I went to the library and took some books out about game development – one was about getting concept art into games. I’m no artist so I dont care about this quite yet but I was interested in how the concept art is converted into object models aka mesh models and how they are ‘rigged’ with internal skeletons. Wow.
- Details
- Category: Game Development
- By Stuart Mathews
- Parent Category: Code
- Hits: 4626
I’ve been reading a book about video game development recently. Its interesting. I’ve slowly gained an interest in how games that I play are capable of modelling environments and characters and their behaviours. I’ve never really appreciated game development because it for a long time seemed like a totally un-relatable field to me in terms of computer programming that I’ve not been able to comprehend all its aspects, specifically when comparing it to what I do. I write and design office software, and we don't really obsess about performance over and above doing something relatively quickly and reliable in terms of best practises. We don't even touch artificial intelligence.
Game development actively embraces artificial intelligence as well as performance and optimisation, not to mention things like graphics, animation and sounds and controllers – things that us ‘normal’ programmers don't go near and because of that, they’ve developed as a bit of a ‘advanced’ or unknown aspect of our field.
I remember sitting in front of my xbox 360 and stopping for a while and thinking: ‘how do they do that, programmatically?’ and ‘why don't I even have a clue?’ and then I started getting amazed by what was happening in front of me because I was now wondering why and how. For example, I now get Goosebumps when I ‘experience’ an immersive alien world, with the rate of graphic rendering and animation that makes me feel like I’m in the game, so much so it influences my mind, state of being and engages my mind and spirit. I feel like I’m stuck in an alternate reality and the characters feel like they are real –this is a perfect simulation of something. This is important for human development, artificial intelligence and simulation – game development is very important.
In this vein, I’ve started to bridge the blackness that is the unknowns that game development is and its frighteningly different from what I’m used to. To being with there is a totally different way of thinking about code execution and what you do in that code and who data is stored and how its positioned and reasoned with. Its amazing. Its like a discovery of a new world that you just want to explore because its new and there is undoubtedly more.
I have such an appreciation to the new world of game development because it seems like a world that has been hidden from me because its so specialized and almost inaccessible to anyone but those who are willing to put in the effort and skill to achieve the large goals that game developers want. Graphic rendering for one is a expansive topic going into realms of mathematics that scare all but the proficient and diligent. Some concepts such a graph theory and trigonometry are not used in my 9 to 5 day job. Optimisation and artificial intelligence is so new to me.
Things that I’ve been trying to touch on are aspects of how a game is developed, from how the cycles of CPU are split among activities such as drawing, storing, executing algorithms and running logic. I’ve never had more of an appreciation of Finite State machines, rule systems and the use of data algorithms such as hash tables and trees, not to mention how everything seems to revolve around graph theory – its truly amazing.
The book I’m reading right now is called “Core Techniques and Algorithms in Game programming”.
Page 9 of 9