Monthly Archives: March 2008

Whaz Happenin’, End of March Edition

Personal news, Atanua news, hobby news, the longest journey, and his dark materials. Continue reading

Comments Off

Whaz Happenin’, End of March Edition

Personal news, Atanua news, hobby news, the longest journey, and his dark materials. Continue reading

Comments Off

hi, what is it? oh pygame 1.8 is released.

Posted in Uncategorized | Comments Off

Bats ‘n Rats

I’m putting in bats, and rats. Something basically to populate the caves. What else lives in caves? Maybe a bear? Hmm… I think a bear would be very exciting! Continue reading

Posted in Uncategorized | Comments Off

Swing Car Test

Posted in Uncategorized | Comments Off

Sheep!

Michelle says that my game needs sheep, and I agree. So I’ve added them. Other than that, there are now cows and I’m filling in some more terrain; there were still some areas that were pretty blank-ish. That’s all for now!

Continue reading

Posted in Uncategorized | Comments Off

Back online

The web server that hosts this blog died about a month ago.  Strange intermittent errors made me suspect the ram had gone bad.  Or in the worst case, the motherboard.  Many sticks of ram, motherboards and power supplies later, it was determined that the cpu was actually the culprit.  It’s never even occurred to me [...] Continue reading

Posted in Uncategorized | Comments Off

Progress 7: File Savings and Loading

Posted in Uncategorized | Comments Off

Weekend of Code

Posted in Uncategorized | Comments Off

Progress 6: Editor Up

Posted in Uncategorized | Comments Off

Progress 5

Posted in Uncategorized | Comments Off

Progress 4

Posted in Uncategorized | Comments Off

Progress 3 (and 100th post)

Posted in Uncategorized | Comments Off

WOC: Progress 2

Posted in Uncategorized | Comments Off

Games page is up + free sounds

Well, I finally got my games page mostly fleshed out. You can see it here. I still need to add some more files but every entry has at a link. This should make showing people my little games a lot easier and maybe I can start working on them. I suggest trying abg remix [...] Continue reading

Posted in Uncategorized | Comments Off

WOC: Progress

Posted in Uncategorized | Comments Off

Weekend of Code #3: A to Z with a Twist

Posted in Uncategorized | Comments Off

Renderables, Soundables…

I discovered that I have an ugly inconsitency in how the sound effects are getting played.

First of all, there ought to be an analogy for the structure used for drawing things (which I call renderables) and those for sounding things (lets call them soundables). These are differentiated from the graphics and audio engines, in that they operate on a more abstract level. The graphics engine for texas is OpenGL, and the audio engine is Aurex (something I made). The whole infrastructure supporting “renderables” is well worked out, but not so for soundables.

At first I tried combining renderables and soundables. This actually makes a great deal of sense, since the interface is basically identical.

Let’s define a RenderPass as a function from a particular range RenderState to OpenGL. RenderState contains certain information like where the camera is positioned, and so forth; in fact we can include whatever we want (e.g., is it raining, should everything be blue, etc.) A Renderable, then, is just a class that has a RenderPass (RenderState) function, and an Update (T) function. Mathematically, maybe this is something like a function (RenderPass, T) |-> RenderPass; I don’t know.

A SoundPass should be then a function from SoundState to Aurex. Likewise a Soundable would fit the above description and be a class with an Update (T) and Sound () function, where the sound function puts the sound into Aurex.

In fact, due to the nature of sound (we specify a certain duration of sound, not a static sound for a single frame) we actually need a slightly different model. Only the Update (T) function is neccesary, but it should also have access to SoundState; so it’s really an Update (SoundState, T) function.

In the case of Renderables, we really want everything to be in C++. There are just a whole lot of OpenGL calls each frame, and a lot of sorting out to do in terms of what to draw. But in the case of Soundables, we really don’t need that; it’s sufficient to have it in Lua because on a given frame there will probably not even be one call to Aurex; during the majority of frames there is no sound starting or changing information (and in fact Aurex could not handle this many voices anyhow).

The solution, then, is to build the abstract-level sound infrastructure in Lua and save myself the work that would be building it in C++. Of course, as a caveat, this only handles “gameplay” sounds, interface sound effects are handled in a straightforward way already. Continue reading

Posted in Uncategorized | Comments Off

Enemies, AI Rethinking…

I’ve put in a few enemies now: there is a ghost-type enemy, and a mummy/zombie type enemy that both haunt the graveyard. The combat system is awesome and I’m really into the swing of it. I think it will be quite fun!

In VtV I used an AI system similar to the one I’m using now, with a key difference. In VtV there was a distinction between an “AI Instance” and an “AI Pattern”. Instances were a collection of variables; i.e., hit points, physics information, associated visuals, and eventually this grew to sort of an ugly structure. Patterns themselves were just a tree-like structure which represented different time-evolving changes to this structure; e.g., there was a pattern for flying from one location to another (this was the most complicated one), another for facing towards the player, another one that let me build up state-machines, etc.

It seemed neccesary to have the Instance structure; just imagine if one pattern is responsible for regenerating HP and another pattern is responsible for making a choice based on total HP. They both need to reference the same variable.

And yet, not every AI pattern cares about every variable! This is even true of for instance physics or visuals information, since some Patterns are responsible for spawning enemies but themselves aren’t an enemy. Worse, I had to create sort of an Instance-level variable scope which was nasty to deal with. Even worse, since each Pattern had it’s own local state, the AI state was now spread between the flat, shared Instance structure shared by all relevent patterns and the Pattern itself. And this was all in C++, ugh!

In Texas, there is no Instance information (almost; I did something a bit wierd with NPCs that could/should/probably won’t get fixed). Instead, as the AI is structured into multiple layers, each layer that needs to reference some kind of shared value just asks for that in it’s constructor. So in the above example, both the HP-regenerator and the HP-decider Patterns would ask for a shared “HP” variable that they would then reference. Anything that wanted to make use of these patterns would then have to appropriately supply the reference to the appropriate variable, which is just logical consistance.

This is all very lovely, makes great sense. The Instance and Pattern model only really makes sense if the Patterns are actually just flat, i.e., Instance becomes the parent structure that determines based only on it’s own state what AI routines should run, rather than a shared kernel of information between Patterns. Continue reading

Posted in Uncategorized | Comments Off

Weekend of Code

Posted in Uncategorized | Comments Off