Wednesday, June 23, 2010
Friday, December 14, 2007
Sweaters
Thomas: class Vector(object):
def __init__(self, a=0, b=0 ):
if _is_numeric(a):
self.x = a
self.y = b
else:
self.x = b[0] - a[0]
self.y = b[1] - a[1]
def __getitem__(self, index):
if index == 0:
return self.x
elif index == 1:
return self.y
else:
raise IndexError
def __add__(self, other):
return Vector(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return Vector(self.x - other.x, self.y - other.y)
def __mul__(self, other):
try:
other = other - 0
except:
raise TypeError, "Only scalar multiplication is supported."
return Vector( other * self.x, other * self.y )
def __rmul__(self, other):
return self.__mul__(other)
def __div__(self, other):
return Vector( self.x / other, self.y / other )
def __neg__(self):
return Vector(-self.x, -self.y)
def __abs__(self):
return self.length()
def __repr__(self):
return '(%s, %s)' % (self.x, self.y)
def __str__(self):
return '(%s, %s)' % (self.x, self.y)
def dot(self, vector):
return self.x * vector.x + self.y * vector.y
def cross(self, vector):
return self.x * vector.y - self.y * vector.x
def length(self):
return math.sqrt( self.dot(self) )
def perpindicular(self):
return Vector(-self.y, self.x)
def unit(self):
return self / self.length()
def projection(self, vector):
k = (self.dot(vector)) / vector.length()
return k * vector.unit()
def angle(self, vector=None):
if vector == None:
vector = Vector(1,0)
return math.acos((self.dot(vector))/(self.length() * vector.length()))
def angle_in_degrees(self, vector=None):
return (self.angle(vector) * 180) /math.pi
def re
def __init__(self, a=0, b=0 ):
if _is_numeric(a):
self.x = a
self.y = b
else:
self.x = b[0] - a[0]
self.y = b[1] - a[1]
def __getitem__(sel
if index == 0:
return self.x
elif index == 1:
return self.y
else:
raise IndexError
def __add__(self, other):
return Vector(self.x + other.x, self.y + other.y)
def __sub__(self, other):
return Vector(self.x - other.x, self.y - other.y)
def __mul__(self, other):
try:
other = other - 0
except:
raise TypeError, "Only scalar multiplication is supported."
return Vector( other * self.x, other * self.y )
def __rmul__(self, other):
return self.__mul__(ot
def __div__(self, other):
return Vector( self.x / other, self.y / other )
def __neg__(self):
return Vector(-self.x, -self.y)
def __abs__(self):
return self.length()
def __repr__(self):
return '(%s, %s)' % (self.x, self.y)
def __str__(self):
return '(%s, %s)' % (self.x, self.y)
def dot(self, vector):
return self.x * vector.x + self.y * vector.y
def cross(self, vector):
return self.x * vector.y - self.y * vector.x
def length(self):
return math.sqrt( self.dot(self) )
def perpindicular(s
return Vector(-self.y, self.x)
def unit(self):
return self / self.length()
def projection(self
k = (self.dot(vecto
return k * vector.unit()
def angle(self, vector=None):
if vector == None:
vector = Vector(1,0)
return math.acos((self
def angle_in_degree
return (self.angle(vec
def re
that helps
i googled that!
alright, time to knit some sweaters
later
me: laters
Tuesday, December 11, 2007
Dragon Starver: The Beginning of Starvation

import sys, os
import pygame
from pygame.locals import *
from cgkit.cgtypes import vec3
def load_image(name
fullname = os.path.dirname
fullname = os.path.join(fu
fullname = os.path.join(fu
try:
image = pygame.image.lo
except pygame.error, message:
print 'Cannot load image:', fullname
raise SystemExit, message
image = image.convert()
if colorkey is not None:
if colorkey is -1:
colorkey = image.get_at((0
image.set_color
return image
class Spritesheet:
def __init__(self, filename):
self.sheet = pygame.image.lo
def imgat(self, rect, colorkey = None):
rect = Rect(rect)
image = pygame.Surface(
image.blit(self
if colorkey is not None:
if colorkey is -1:
colorkey = image.get_at((0
image.set_color
return image
def imgsat(self, rects, colorkey = None):
imgs = []
for rect in rects:
imgs.append(sel
return imgs
class AnimatedSprite:
def __init__(self, images, rect):
self.images = images
class Dragon:
def __init__(self):
self.surface = load_image("Dra
self.pos = vec3(0,0,0)
def main():
pygame.init()
screen = pygame.display.
pygame.display.
fnt = pygame.font.Fon
back = pygame.Surface(
back = back.convert()
back.fill((200,
keys = {K_a:False,K_d:
dragon = Dragon();
while True:
for event in pygame.event.ge
if event.type == QUIT:
sys.exit(0)
elif event.type == KEYDOWN:
keys[event.key] = True
elif event.type == KEYUP:
keys[event.key] = False
if keys[K_a]:
dragon.pos.x -= 1
if keys[K_d]:
dragon.pos.x += 1
if keys[K_w]:
dragon.pos.y -= 1
if keys[K_s]
code to load images, and pull images off of a sprite sheet
and it moves a dragon around on the screen
Sent at 4:58 PM on Tuesday
me: sweet
haha
Sent at 5:15 PM on Tuesday
me: meh
took me a while because i haven't actually opened Flash before
but i have a little placeholder
do you need transparency in the image?
it's a bmp right now
Sent at 5:30 PM on Tuesday
Thomas's new status message - I'm not here right now 5:36 PM
Thomas: I can do transparency on bitmaps now
didnt you read the code!
Sent at 5:55 PM on Tuesday
me: nope
haha
sorry
i will now
though
hang on
Thursday, December 6, 2007
Dragon Starver, Chain Combo System

Thomas: simple to program that!
i donno about graphics
me: so the other thing i was thinking of
is, what if, instead of adding +1 ricochet ability, the critters in your belly were your ammo?
or both?
Thomas: I would say there is no point in eating them then
just kick them
me: the aiming and firing could work like yoshi's island- a toggle that brought up a little timing minigame
no i mean, no kicking- just firing
Thomas: eating should be different from kick to enforce the player doing both
oh
me: just an idea
Thomas: well, thats not a bad idea
maybe you have to aim at the villi!
meh
me: or maybe kicking never ricochets, but firing does!!!
OO
Thomas: nice
but random
me: how so>
Thomas: why wont kicking ricochet? not that it won't work for a game.
me: oh i see
well, i guess maybe the juices in your belly make the things bouncy
you coat them with slime specially-adapted for this purpose
haha
but then there's the "getting fat as a level goal" thing- it would have to change probably
because you'd have to use the ammo for firing (and we would want to encourage it anyway)
eh FUCK IT
too complex
kicking is good
i think the chain combo system should have a bonus system attached- like if you get a certain number of chains, you get a cake!
which makes you fatter faster?
or maybe it's just a bonus item
that can be the scoring system
Thomas: ueaj
guh
me: number of cakes
and size of cakes! haha
Thomas: typing is hard while masturbating!
haha
me: yeah it sure is
i'm pretty good at it though
Thomas: foosho
me: i can switch hands and gain a stroke
like george carlin
Thomas: NICE
me: anyway- cakes?
Thomas: so when are you going to have all the game art done by!?
me: good/bad? i think cakes are better than points
Thomas: tomorrow!
cakes are great
me: no, i think i'll probably start the art once my finals are done, depending on when my art history final turns out to be
next week is critiques and study time, so i'm in crunch time right now
my shit's due tuesday
i've got to get some big ass things printed tomorrow morning and mounted in the afternoon
Thomas: sounds fun
im going to calculate some taylor series
yay
me: nioce
i'm going to shower and go to class i think
got my first final ceramics crit this evening
Dragon Starver, Further Explained

me: i think it would be really cool if the character is just this blobby circle kinda thing, with a tiny head,
and a see through belly
whenever a powerup creature is eaten, it would drop in the belly
you'd just have to make it draw a circle around this collection of sprites- possible?
Thomas: because that would be simple to program...
me: no oh well
haha
i always do that
Thomas: I need to keep ideas simple
me: yeah, i suppose
Thomas: which makes game dev boring
me: well, how about making the character grow bigger? possible?
Thomas: sure
thats not hard
I just dont want to model a stomach digesting food
me: maybe need to make diff. sprites though,
hm?
model a stomach digesting food?
which do you mean-
the level or the character
Thomas: I thought you said something about seeing the food in his stomach
me: yeah, but not anything particularly complicated- well maybe
basically all that needs to happen is for the food to stick together underneath the head sprite,
and then have a line drawn around the food-ball
that would be the hard part
but whatever, minor detail
Thomas: that would be cool
Actually, it might be do-able.
I have a algorithm written for convex hall which is exactly that.
Sent at 4:04 PM on Thursday
me: well shit son
SHIT
that sounds like a good use for it
"hey look at this algorithm i can make it appear to be a see through belly"
haha
aw, this is gonna be fun
drawing little critters is awesome
Thomas: haha
me: and the other parts are easy- just need to make a couple of different wall sprites (which will stack together- basically it's the same mechanic we were thinking of using for Necro., but it actually makes sense and is on its side)
and those are just fleshy blobs, basically
then the character- basically its head, unless you don't want to do the belly thing, in which case it'll just be a series of progressively larger sprites
and the background,
and the creatures
Thomas: Okay
me: and the acid, i guess- however you want to do that (animated sprite at the bottom, i'm thinking? doesn't need to be too fancy, but i think some green bubblings would be nice)
oh and explosions i guess
EXPLOSIONS
Thomas: Cool
me: maybe some sort of graphic to represent the chains that form?
like a shiny blue line that connects the things that get hit?
i donno
Thomas: Shit, I'm confused.
me: and there should be some text that tells the size of the chains as they develop
man, i really just need to draw some pictures of it
so you can see what i mean?
i'm just thinking of the graphics, what all would need to be done
Thomas: Yeah, I havent read the text on necro
me: which is why it sounds more complex than it is
oh okay
you should... check it out?
Thomas: Okay
me: the working name i came up for is "dragon starver!"
it's about this:
you are a critter that has adapted to eat your prey directly from the bellies of these giant dragon things
so you go down in there,
and it's just a box, with acid on the bottom, and contracting stomach walls
critters fall from the sky,
and you need to eat enough of your preferred critters to grow fat and fly back out of the dragon's mouth
Thomas: cool
me: but the walls are constantly closing in on you, so you need to keep em at bay
Thomas: thats my favorite word! COOL!
me: and you do this by kicking non-eatable critters into the walls, to make them explode
whenever you eat an edible critter, it goes in your belly and you get more powerful- which means you are able to kick things and have them ricochet off whatever they hit one more time (per edible)
Sent at 4:16 PM on Thursday
me: so if you have a lot of edibles in your belly, you can kick the other critters around and have them bounce off one another (all this has to happen in midair, before they fall in the acid) and explode multiple stomach walls at once
the only point of contention is the acid thing: should it kill you to fall in it? i think maybe yes, but that means there has to be some sort of system to keep you from falling
which means either you can just fly around, or you can jump around and there are platforms...
hm.
Thomas: platforms would be weird
me: that would be an easy way to make new levels
Thomas: yeah
me: just make new platforms
Thomas: true
me: reuse the same level, add new furniture
level design at its finest! haha
Thomas: by gum!
me: actually, since the walls are just made of multiple sprites, it would be really easy to reshape those for the levels too
Thomas: how the F are you going to draw intestines
me: i'll show you
um
hang on
Thomas: AIGHT
me: can i send you a quick sketch?
Thomas: sure
Sent at 4:20 PM on Thursday
me: sent
wow that took me a long time
Thomas: Im doing calc, so its fine
Sent at 4:33 PM on Thursday
Thomas is typing…
Wednesday, December 5, 2007
Dragon Starver?
me: oy
so
here's what i came up with while i was in the shower:
you are a critter
in this other critter's stomach
(represented by a box with acid at the bottom and slowly-contracting walls)
in order to avoid being digested, you need to fight back against the walls.
to do this, you utilize the creatures that are constantly falling down into the box (stomach)
you kick the things that are falling, and when they hit a wall segment, they explode and destroy it
however, you can also kick the creatures into other creatures, to build up chains and destroy more of the wall segments at once.
also, you can collect certain creatures falling from the mouth to make yourself bigger (and therefore have more powerful kicks)
the power of your kicks determines how many times the things you kick ricochet before they themselves explode
so with a more powerful kick, you could hit a bunch of critters at once, which would all hit wall segments and destroy them.
Sent at 3:53 PM on Wednesday
me: your objective is to 1. not get digested and 2. get fat off of your falling prey (that is why you are there- you are a specialized creature that eats a certain type of animal, and the easiest place to obtain it is in the bellies of these giant beasts)
when you are fat enough, you can fly out of the stomach.
also, you have to hit the critters/eat the prey in midair, otherwise they are dissolved by the stomach acid at the bottom of the stomach-box
you are not dissolved by it, because you have specially adapted to eat from this larger creature's stomach?
(?!)
or maybe you are dissolved by it, but there is a series of platforms to hop around on. what do you think?
Thomas is offline. Messages you send will be delivered when Thomas comes online.
Saturday, October 20, 2007
Oshka
Tom said:
I said:
I had a dream I'm suppose to make a game about Russian Matryoshka dolls. Simple run n jump gameplay like Mario with the added feature of Matryoshka doll shells.
So the player would benefit from the shells:
You could nest yourself in shells for strength
Different shells have different abilities
ect.
Pros of leaving the shells:
Enter tiny doors
Go underwater
Leaving a shell gives you upward momentum, so you could do a Nshells-1 jump (ex. quad jump).
ect.
I call it Oshka.
I said:
I like it.
Have you thought about how the dolls should look?
There are the traditional ones, of course, but there are also alternatives.
The idea of the nested shell as gameplay element is interesting- in addition to the different abilities that different shells could grant (which would open up different areas of the levels, a la Castlevania or Tomba or Megaman or other platformer/rpg/puzzle games), the "extra jumping" ability could be a huge part of the gameplay and level design. For instance, you might have the player run around and collect enough shells so that they could eventually reach a very high ledge (while solving smaller puzzles/levels with the shells they collect in the meantime).
I have a suggestion (if I may be so bold): instead of straight platform jumping, perhaps you could have the player be able to "launch" themselves from their largest shell: they could hold down a button which would initiate a little "aiming mode" (like in Yoshi's Island, when you launch an egg, or like in a golf or bowling game), release it when they believed their aim was true, and then all of the shells inside the "sacrificed" one would be flung in that direction. Then, if properly skilled, they could hold the button down again, which would stop them in midair and initiate another launch sequence. In this way, the player could propel themselves around, reach oddly-placed areas, and generally have a good ol' time.
Initial ideas for the dolls' aesthetics:
Different people (they could each be specialists of a nesting-doll strike team, or members of a family- each with unique abilities and personalities)
Different animals (easy to figure out the different shells' specializations)
Shell-bots (we could still make this steampunk)
I see the shells' walking animations as them tipping to the side opposite the one they are heading towards, as if they were being pulled around by their "feet." Like if you put a big magnet in a bowling pin and then used another big magnet to pull it around.
The dolls themselves would be easy as all hell to make art for- I could sketch them out and scan them, and then make two sprites (the head and the body) for each. Effects like battle damage could be incorporated with separate semi-transparent sprites layered over the top, as could different facial expressions (if we go with little people as the dolls). "Launching" and other animations could be accomplished with the engine. Levels could be made with small tiles (the overall style sounds as though it's meant to emphasize simplicity, so blocks might be a good way to start out and get our feet wet with level design).
I have some questions, though: How will the player get new shells, exactly? Will they just be lying around the level, or would the player start with all the shells, and then have to use them up and/or recollect them? What happens when the player comes across a shell that is more than one size larger? Will there just be generic shell icons/powerups that the player can run across, and when they do, a shell of that type of the next largest size is placed over the player's current shells? This would mean that the player would sometimes be forced to sacrifice multiple shells in order to get back down to the specialized shell they need. This would not necessarily break the game (with clever level design, that is), but it would make the levels more difficult to balance.
I'm putting this stuff on the blog.
Tree Fight!
Come on, you know it's a good idea.
Here's how I think it would work:
Players take turns placing new branch segments. They can make a branch taller by extending it, or they can split the branch by adding a joint. Sunlight comes down from the sky, nutrients come up from the earth (I suppose roots should be able to be grown, too), and you also need to have a water source (lack of any of these causes your tree to shrink or die).
Fighting involves blocking the other trees from vital resources by outmaneuvering them in growth. Every certain-number-of-turns, you are allowed to pick a survival adaptation (which you have earned from your years in the wild). These survival adaptations might allow you to store water more efficiently, fend off annoying animals, grow your roots deeper or your branches higher, or even live longer. Some adaptations would be fantastic, like the ability to grow explosive-fruit-launching branches and attack your rivals directly. Some would be taken from nature, like the ability to grow runners underground (and then start a new trunk elsewhere on the battlefield).
Each turn might also bring with it random events or hazards- animals, disease, forest fires, lumberjacks, or even a guerrilla war causing collateral damage. These are obstacles to avoid or even plan your strategy around (some plants thrive and spread with fires, for example).
Winning could be as simple as lasting a certain number of turns, or as complex and fantastical as evolving sentience or growing into space.
COME ON
---
You could have the background flow up, so you could break through the clouds and eventually the atmosphere (after picking the appropriate adaptations), and then evolve little space-marine pods that you could send out against other space trees!
---
And you could have the camera scale, so that you could see your whole tree at once (which would be really cool if, for example, your tree could grow from one planet to the next). You could conquer whole worlds! Maybe each world could be a new level, which you would have to conquer (remove all competition from), with space growing sequences in between. It could all just be one map! We could do this with simple, reusable graphics (unlike Necropopolis).
Here's how I think it would work:
Players take turns placing new branch segments. They can make a branch taller by extending it, or they can split the branch by adding a joint. Sunlight comes down from the sky, nutrients come up from the earth (I suppose roots should be able to be grown, too), and you also need to have a water source (lack of any of these causes your tree to shrink or die).
Fighting involves blocking the other trees from vital resources by outmaneuvering them in growth. Every certain-number-of-turns, you are allowed to pick a survival adaptation (which you have earned from your years in the wild). These survival adaptations might allow you to store water more efficiently, fend off annoying animals, grow your roots deeper or your branches higher, or even live longer. Some adaptations would be fantastic, like the ability to grow explosive-fruit-launching branches and attack your rivals directly. Some would be taken from nature, like the ability to grow runners underground (and then start a new trunk elsewhere on the battlefield).
Each turn might also bring with it random events or hazards- animals, disease, forest fires, lumberjacks, or even a guerrilla war causing collateral damage. These are obstacles to avoid or even plan your strategy around (some plants thrive and spread with fires, for example).
Winning could be as simple as lasting a certain number of turns, or as complex and fantastical as evolving sentience or growing into space.
COME ON
---
You could have the background flow up, so you could break through the clouds and eventually the atmosphere (after picking the appropriate adaptations), and then evolve little space-marine pods that you could send out against other space trees!
---
And you could have the camera scale, so that you could see your whole tree at once (which would be really cool if, for example, your tree could grow from one planet to the next). You could conquer whole worlds! Maybe each world could be a new level, which you would have to conquer (remove all competition from), with space growing sequences in between. It could all just be one map! We could do this with simple, reusable graphics (unlike Necropopolis).
Thursday, October 4, 2007
Sunday, September 30, 2007
Thursday, September 27, 2007
Yo
Tom n Rollin-- sending you a new song I did over break. School just started today, so I'll get more in on this project when I can.
Monday, September 24, 2007
Friday, September 21, 2007
Tuesday, September 4, 2007
Check It
Some cool footage from the Indy Games Summit- dude talking about prototyping and game design and such. You should watch it!
Monday, September 3, 2007
Characters Are Next, Right?
So... I think the plow has all of its necessary parts (though they could still be moved around and such). I guess I'm working on characters next, right? Zombies, the player, et cetera.
Couple of questions:
1. Which should I do first?
2. Should I animate the different body sections (head, torso, legs) separately, so they can later be blown off? I think this would be the best way to do it- that way the torso can rotate independently from the legs (necessary for the main character).
I suppose I could just do the legs, torso, and head separately for the main character, and then just do the body and head separately for the others... but then we couldn't have paraplegic zombies crawling around after having their legs explode.
Couple of questions:
1. Which should I do first?
2. Should I animate the different body sections (head, torso, legs) separately, so they can later be blown off? I think this would be the best way to do it- that way the torso can rotate independently from the legs (necessary for the main character).
I suppose I could just do the legs, torso, and head separately for the main character, and then just do the body and head separately for the others... but then we couldn't have paraplegic zombies crawling around after having their legs explode.
My Thoughts
1. Yeah, screw the plow.
2. I think the crane shows promise- we could have a Kirby-style vacuum (that can't be repositioned) and just have body parts slowly move towards it as the vacuuming button is pressed, and then have the crane to pick up boulders and things and whip 'em around at zombies and such.
The crane could be made less awkward by having the chain shoot out and retract- it would basically be a grappling gun that could only shoot down, but could be "aimed" by rotating it.
The main character should have to get out of the carriage- but he already has to get out for retrieval of items, treasure, wounded crew members, etc... Meh. Gravity gun would still be cool, though. Is there any reason not to put it in?
2. I think the crane shows promise- we could have a Kirby-style vacuum (that can't be repositioned) and just have body parts slowly move towards it as the vacuuming button is pressed, and then have the crane to pick up boulders and things and whip 'em around at zombies and such.
The crane could be made less awkward by having the chain shoot out and retract- it would basically be a grappling gun that could only shoot down, but could be "aimed" by rotating it.
The main character should have to get out of the carriage- but he already has to get out for retrieval of items, treasure, wounded crew members, etc... Meh. Gravity gun would still be cool, though. Is there any reason not to put it in?
Sunday, September 2, 2007
Plow, crane, vacuum, gravity gun?
How should the player interact with zombie piles:
- I think the plow is out.
- The crane could work, but it seems awkward.
- I was thinking it would be easy to go with the Kirby style. When a body is vacuumed up it would be instantly shot out of a positionable tube.
- Rip off the gravity gun idea from Half-Life. It would also create interesting game play to not allow the carriage to move the zombies which would force the main character to get out of the carriage and use the gravity gun. Or the carriage could have a gravity gun attached to it.
Saturday, September 1, 2007
Particle Engine Wish List
1. Zombie Blood
2. Character Blood
3. Gold (Treasure)
4. Water
5. Smoke (Comes out of fuel tank exhaust pipes and a little out of the furnace in the carriage; also tags along with fire)
6. Fire (Comes out of damaged things; also a bit out of the furnace when the carriage accelerates)
2. Character Blood
3. Gold (Treasure)
4. Water
5. Smoke (Comes out of fuel tank exhaust pipes and a little out of the furnace in the carriage; also tags along with fire)
6. Fire (Comes out of damaged things; also a bit out of the furnace when the carriage accelerates)
Subscribe to:
Posts (Atom)