Information Painting


In certain places of the castle in The Real Texas, you are supposed to be (according to the backstory that I just built in order to support the gameplay diagram that I had built prior...) stepping into the past, sort of a quasi-alternate-dimension. I thought the best way to show this would be a sort of black and white, wavy effect which I've now put into place and works quite well (thank you, glCopyTexSubImage2D!)

What's not quite as clear, though, is how I'm to know when to turn it on or off. There is a system I already have in place called "events", which lets me lay certain events on certain tiles. So for instance, an UP event makes you go UP one level if you're underground, etc. This seemed the logical place to start for triggering the black and white wavy effect.

In fact, it is, but while thinking of it I started to think about something that I'll call Information Painting. Tagging, which we all must know and love, is the idea of attaching attributes to discrete objects. So for instance, you could have a tagging system for all sprites in your game, and then tag things that can fly with a "flies" tag, and all things that are red with a "red" tag; then you can create a special effect that lights everything that flies and is red on fire; and it's quite easy to "query" for these objects. So you get to implement a generic system (the tagging) that then can be used for specific purposes (e.g., finding everything that flies); lots of bang for the buck!

Information Painting is the same sort of idea, but spatially. So you attach tags spatially to surfaces or volumes. For instance, a piece of floor could be painted with the "bwwave" tag, and then later on you can quite easily check to see what tags apply to where the player is standing, and if the "bwwave" tag is there, turn on the special black and white, wavy effect. Similarly, you could tag things that are metal with "reflection" (not by hand; you'd set these tags up automatically as you create the metallic things) and then if a laser beam hits a surface, you could check to see what tags it was painted with.

It's not a huge variant on tagging, but an interesting concept. Another advantage to tagging across space, and not just discrete objects, is that you could integrate your tags at a "physics" level, physics being typically lower-level than your discrete gameplay objects. So the physical world could be information painted, allowing your physics routines to have custom exceptions and so forth (passthrough, stick-furry-things, and so forth) without adding much complexity; managing the tags would happen at the object level.

Just some ideas!

2008-12-01


◀ Back