Cowboy Programming Game Development and General Hacking by the Old West

January 2, 2007

About

Filed under: Game Development — Mick West @ 1:32 pm

My name is Mick West. I’m a game programmer, and have been for a long time. Now I spend more time experimenting and writing than working on actual games. This site, CowboyProgramming.com, is where I write about games programming, and post some of the experimental code I have written.

Some of the articles on this site first appeared in Game Developer Magazine, where I have written the monthly “Inner Product” programming column since August 2005. New Game Developer Magazine articles should appear here about three months after they appear in print.

You can email me at:

mick@cowboyprogramming.com

Teleological vs. Ontogenetic

Filed under: Game Development — Mick West @ 1:20 pm

Since writing my article on the difficulties of simulating reality (“Shattered Reality”, Game Developer Magazine, August 2006), I learned there is actually a terminology I could have used.

Teleological Modeling is the process of modeling something using real physical rules.

Ontogenetic Modeling is the process of modeling something based on its appearance.

(From Intel: Procedural 3D Content Generation)

To understand the difference between the teleological and ontogenetic approaches, imagine the modeling of clouds. The teleological approach would model the properties of water, its evaporation, temperature of the environment, and so on, to try and produce the desired end result from the bottom up. The ontogenetic approach would be to observe properties of the end result (such as the small wispy bits change more frequently than the larger bits, the shape changes more as the wind picks up, low-lying cloud tends to be darker, and so on). [T]he ontogenetic approach, […] is more suitable for most real-time applications.

I don’t find the etymology of either word particularly satisfying. “Teleology” less so, as it basically comes from the Greek for “perfect result” and relates to the ultimate “design or purpose” of a thing, and most often crops up in discussion of evolution, philosophy and religion.

“Ontogeny” is the origin and development of an individual from embryo to adult. It’s the details of the process by which DNA creates living things. It describes what happens, rather than why it happens. Since Ontogeny is a description of the results of a process, that’s how it gets this usage in procedural modeling.

Blob Correction

Filed under: Game Development — Mick West @ 1:19 pm

In my Blob Physics article, I said verlet integration would be:

X1 += (X1-X0)*T + F/M*T*T

when it should be:

X1 += (X1-X0) + F/M*T*T

Since (X1-X0) is a movement vector, not a velocity.

The code contains the correct equation.

I think I might have been momentarily confused, since I was thinking about a possible timescale version for variable framerates:

X1 += (X1-X0)*T1/T0 + F/M*T*T

Which I’m now not even sure makes sense.

anyway, thanks for Thanos Michailopoulos for being the first to point this out.

Notes on “Mature Optimization”

Filed under: Game Development — Mick West @ 1:18 pm

My article on “Mature Optimization” (Game Developer magazine, Jan 2006, p33), got a mixed reception – which is good. But there were a few points I felt I did not really communicate very well.

The articles was not intended to be a list of clever optimization techniques, rather I was just trying to introduce the notion that some optimizations are best done early in the project. I then gave some examples of optimization (which might or might not be appropriate to your project), and explained why they were “mature”.

The section “profile your inline functions” is a bit out of place, as it’s not a specific optimization, but my thought here was that the time spent in inline functions is often hidden from the profiler. If you take the time to explicitly profile them, then you can catch the problem early. This does not really fit that well with the rest of the article.

In “Process Offline”, this confused some people, as I did not really explain it very well. The optimization here is one of loading time by loading a single large file, rather than a large number of individual files. Problems with this arise in console development in that you really have to be able to load the file “in-place”, i.e. into the memory area the data wants to be. Unless you pre-process the file appropriately, you have to load the single large file into a separate area of memory, and then copy and process the data into other areas. Not so much of a problem on the PC, but can lead to out-of-memory, or fragmentation issues on consoles.

« Newer Posts

Powered by WordPress