2008-06-29

Adventure, and more musing and blending

Do you remember Adventure for the Atari 2600 ?

Probably not. However, just off of a random whim, I cracked open my old Blender game engine nonsense to see if I could clone it using the messed up python it has. Of course, it is not designed to be a game creator so much as it is to build walkthroughs of spaces, for example, adding objects and collision handlers is nearly impossible without some seriously advanced scripts, but you can make anything bounce around via the Bullet physics engine. It's quite fun to mess with, but you will find after a few minutes that it has severe limitations to any significant project.

So I said, "I bet I can make this" and have started. It is a purely for fun project, and I'll stick in plenty of goodies for any of you vore fans out there. In fact, check out the neat design lecture about adventure by Warren Robinett. It;s great for any aspiring programmers or computer science students.

Also, update on the Graffiti Kingdom stuff for blender, I developed this quirky algorithm that works like this:

Given a non-intersecting closed polygon (of any concavity or convexity(sp?)),
Calculate all vertex normals (unit vectors that point out of the polygon)
For a starting vertex, pretend you are "rolling" a normal relative to it.
- Start moving left, if the normal does not curve toward the original normal (up to 180 degrees)
- - then set it as the end point.
- Repeat with moving right.
- Close and save the edge, save all points used as a "region" of the polygon.
- Start with the last vertex, and use it as the final point and repeat.
- You will run into cases where the endpoints have no center point. This should be ignored and saved.
Repeat this process recursively for all regions (using the NEW edges as the polygon for the nth iteration), connecting the regions across the edge midpoints as the "height max shell"
Once you have done this, connect all the new regions, and you can process distance to the edge inside each region, which tells you the t parameter for you height basis equations.

... This probably needs 1 picture, and it would make perfect sense. Either way! We'll see if it actually does anything decent soon enough.

Peace out till next weekend!

-ImaginaryZ

2008-06-28

Graffiti Kingdom in Blender

Recently, I have been playing this game called "Graffiti Kingdom" for Playstation 2. It is a perfect game for me since I can draw whatever I want, and make it as ridiculous as possible, ergo little winged lizard dudes running around with giant laser cannons and spaceships that breath fire, shoot rockets, and have Trogdor arms. It's a simple platforming game, but the customization end is what attracts me; you can configure your own character (or any monster you capture) with a few types of attacks, similar to the attacks in Hybrid Heaven for the Nintendo 64.

Either way, one thing I found particularly interesting was the ability to draw a 2D curve, like a trace, and then the program automatically turns it into a 3D shape via extrusion. However, it also does this in a way that promotes more organic looking shapes, which led me to this thought:

I would like to make a python script in Blender, that does the same thing; You simply draw a closed shape, and it automatically guesses at what shape you were trying to draw. This is done by most modelers manually, and is a very quick way to model organic shapes. I figure, if I could speed that up it would encourage some of my other friends to "sketch" a quick 3D shape of whatever they were trying to tell me with a 2D drawing.

So far, the script is OK for drawing a 2D shape, but I am having trouble deciding how to make the shape '3D'. As soon as I figure out how to upload stuff, I'll post a link.