I just finished reading the book Head First Design Patterns which is a really nice read. Even though the content is java oriented, pretty much anyone should be able to take the concepts and patterns explained and apply them in their own language.
So you might ask yourself "what the hell are design patterns and why would I want to know them?".
Design patterns are a way to look at problems and look at solutions and see if there isnt some way to abstract the way you approach a solution so that it applies consistantly to a class of problems.
If you think of it as a way of thinking about design at a higher level, its a good start.
The reason why it interests me, is that I've long been a big advocate of certain ways of architecting game code. Now I've got a name for this architecture! Not only that, but it appears other people think the same way, enough so that they've taken the time to give what I advocate a name and can give examples of how it should be used.
Just out of interest, the most important aspects that I've advocated.
The observer pattern (for decoupling objects)
You use the observer pattern where you want multiple objects to be aware of another objects state, but decoupled from the actual object being observed. The reason I advocate this, is that It helps keep compile times down, but also because it helps modularity, to loosely couple systems via some indirection, means that you can replace subsystems and keep the client (observer) unaltered.
The strategy pattern (erm, I think its that one, I'll have to go look again),
This is where you create object behaviour via composition rather than inheritance. By moving behavior into different classes and having objects incorporate them at runtime, you achieve a level of modularity in behavior and get rid of the problem of inheritance. Essentially, you isolate behavior into seperate classes and then get objects to exhibit that behavior by "composing" objects with those classes. This becomes a huge advantage when you want lots of objects (lets say weapons), but dont want to write thousands of classes, each mostly the same, but with minor tweaks.
These are the two I really am interested in. I'm sure I'll think of more as I go on learning about patterns. But these two I've used out in the wild and really appreciate.
So what has this got to do with the price of beans?
Well, I'm right now working on some little projects while my PC is offline at home. These projects are being prototyped using Torque Game Builder. But not just stock TGB. This is TGB with "behaviors", behaviors being, well, pretty much the behavioral composition pattern I talked about from the strategy pattern!
So, soon enough I should be able to post a blog with some demo's that show you how that actually works. I'm working on a series of video's showing some "rapid game prototype" developments. Only need a few bugfixes and we should be good to go.
Hope you get interested in design patterns, they arent just for coding and can be used in many different areas, for things like business processes etc. Hell, I guess they could be used for personal relationships too.
.Zoom.
A personal blog about the up's and down's of my life as an indie game developer and videogames researcher.
Tuesday, May 29, 2007
Friday, January 12, 2007
Not a dead end
Oooh, I was kind of at a dead end for most of the day, then after sifting through a thousand and one sweep picking (its a guitar technique) videos on youtube, I stumbled into two interesting things in one day! Joy!
First thing, well, actually two things, are from introversions blog.
http://www.introversion.co.uk/blog/index.php
I like these guys. I really have no reason to, other than they are brits and are indies and seem kind of cool, but hey, I'm an old softie.
Anyhoo, the guys seem to be doing well, actually, they seem to be doing well enough that thier lead programmer (if I can call him that, basically theyre all owners as far as I can tell) is actually going fulltime!
Thats so funny really. They've been successful on and off for years now (with the off being the disappointing sales of the excellent darwinia) and ONLY NOW he's going fulltime. That's pretty fun, considering I've seen plenty of people trying to go fulltime with only a match 3 behind them.
So the other interesting Introversion blog thingy that was interesting is thier new game Subversion (check the blog for screenshots). Anyway, whats interesting about subversion for me, is that it is actually exploring techniques I had a great discussion about with Professor Richard Gabriel a good few months back while I was giving a seminar at the "Recent Object Oriented Trends" conference in Norway.
The discussion basically turned to ideas I was having for generating a set of cities from simplistic AI agents using "human population" rules. Essentially, my theory was that europe turned out the way it is, because of the spread of population and subsequent farming methods. I figured that if I could reproduce the spread of human population (i.e. small village, reproduce, spread out, start another small village, iterate, build civilisation a bit more etc) then I could reproduce the landscape procedurally. The whole point of this, was my need for a european looking landscape for Air Ace.
Anyway, I didnt take it any further, but I can definitely see how it would work. Plus I think Chris's work on subversion shows similar signs and definitely seems to point towards my own theories being valid. Interestingly enough, linking to Chris's work on procedural cities. I actually have a book chapter submission in for hardware rendering of procedurally generated 3D cityscapes using the new DX10 hardware geometry shader techniques (this is for the book GPU Gems 3). Lets hope they accept so I have to get off my ass and do the work! :)
Incidentally, on another little side note and link with Mark's stuff and ROOTS. I am quite intrigued by the methods Chris is using and the similarities to the techniques Chaim Gingold demonstrated for his work on SPORE, which was again, presented at the ROOTS conference in Norway last October-ish. I have to tell you Chaim's little opengl hack-together-demo's written using GLUT where FANTASTIC. I mean, he had about a dozen silly little demo's of organisms that ate themselves (i.e. mouth eathing its own stomach), through to procedurally generating curved roads (which is what made me link it with Chris's road generation).
Anyway, wrapping up, the last thing of mucho interest is an analysis of my friend Thomas Buscaglia (the game attourney) and some other attourneys, of a recently available contract between Activision and Spark for Call of Duty (I think its a console version, not the fantastic infinity ward variant). This analysis was posted in an article on Gamasutra and I have to say, its a fantastic insight into the AAA retail sector contracts. It also shows you (if you read the comments), how you can easily get screwed by your publisher if you dont go over your contracts with a microscope. Believe me, I've seen the results of bum contracts and its never pretty.
And now ULTRA finally, I just registered www.gamezuki.com, I figured it'd make a lovely little name for a casual-indie development company. Kind of overtones of games + godzuki (godzilla's little baby I believe).
So, all in all, its been a very interesting night! Hopefully tommorows open day at the Uni will provide similar interest!
TTYL.
.Zoom.
First thing, well, actually two things, are from introversions blog.
http://www.introversion.co.uk/blog/index.php
I like these guys. I really have no reason to, other than they are brits and are indies and seem kind of cool, but hey, I'm an old softie.
Anyhoo, the guys seem to be doing well, actually, they seem to be doing well enough that thier lead programmer (if I can call him that, basically theyre all owners as far as I can tell) is actually going fulltime!
Thats so funny really. They've been successful on and off for years now (with the off being the disappointing sales of the excellent darwinia) and ONLY NOW he's going fulltime. That's pretty fun, considering I've seen plenty of people trying to go fulltime with only a match 3 behind them.
So the other interesting Introversion blog thingy that was interesting is thier new game Subversion (check the blog for screenshots). Anyway, whats interesting about subversion for me, is that it is actually exploring techniques I had a great discussion about with Professor Richard Gabriel a good few months back while I was giving a seminar at the "Recent Object Oriented Trends" conference in Norway.
The discussion basically turned to ideas I was having for generating a set of cities from simplistic AI agents using "human population" rules. Essentially, my theory was that europe turned out the way it is, because of the spread of population and subsequent farming methods. I figured that if I could reproduce the spread of human population (i.e. small village, reproduce, spread out, start another small village, iterate, build civilisation a bit more etc) then I could reproduce the landscape procedurally. The whole point of this, was my need for a european looking landscape for Air Ace.
Anyway, I didnt take it any further, but I can definitely see how it would work. Plus I think Chris's work on subversion shows similar signs and definitely seems to point towards my own theories being valid. Interestingly enough, linking to Chris's work on procedural cities. I actually have a book chapter submission in for hardware rendering of procedurally generated 3D cityscapes using the new DX10 hardware geometry shader techniques (this is for the book GPU Gems 3). Lets hope they accept so I have to get off my ass and do the work! :)
Incidentally, on another little side note and link with Mark's stuff and ROOTS. I am quite intrigued by the methods Chris is using and the similarities to the techniques Chaim Gingold demonstrated for his work on SPORE, which was again, presented at the ROOTS conference in Norway last October-ish. I have to tell you Chaim's little opengl hack-together-demo's written using GLUT where FANTASTIC. I mean, he had about a dozen silly little demo's of organisms that ate themselves (i.e. mouth eathing its own stomach), through to procedurally generating curved roads (which is what made me link it with Chris's road generation).
Anyway, wrapping up, the last thing of mucho interest is an analysis of my friend Thomas Buscaglia (the game attourney) and some other attourneys, of a recently available contract between Activision and Spark for Call of Duty (I think its a console version, not the fantastic infinity ward variant). This analysis was posted in an article on Gamasutra and I have to say, its a fantastic insight into the AAA retail sector contracts. It also shows you (if you read the comments), how you can easily get screwed by your publisher if you dont go over your contracts with a microscope. Believe me, I've seen the results of bum contracts and its never pretty.
And now ULTRA finally, I just registered www.gamezuki.com, I figured it'd make a lovely little name for a casual-indie development company. Kind of overtones of games + godzuki (godzilla's little baby I believe).
So, all in all, its been a very interesting night! Hopefully tommorows open day at the Uni will provide similar interest!
TTYL.
.Zoom.
Subscribe to:
Posts (Atom)