| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
Wednesday 07 May, 2008[ richard @ 01:34 ] Gamasutra: "How to Prototype a Game in Under 7 Days"This article is chock-full of advice for everyone :) Read it. Bookmark it. Return to it before the next PyWeek :) Sunday 06 April, 2008[ richard @ 06:44 ] Post-mortem (the brief)Well, that was fun :)
My game: What I did get out of this PyWeek was good experience with and stress-testing of both pyglet and Cocos.
PyWeek in general: Participation was up again this challenge, both users and entries. It remains to be seen how many final entries we get thanks to the delay with md5 uploads, so I'll post the final numbers later. Friday 04 April, 2008[ richard @ 12:11 ] 1 day, 11 hours, 54 minutes to go
Like some of my other games it's a very simple one because I want my daughter (now 4) to be able to enjoy it. The game as it stands implements most of the important engine components (sprites, collisions, tile mapping including an editor, overlays, particle effects, lasers). It doesn't implement a bunch of animation I wanted because I can't quite wrangle Cocos (0.3alpha in SVN) to draw my sprites in the correct order, so eye irises end up behind the head (invisible) and things like that. I've got other ideas for things to do in the level, but I won't have much time to implement them, and I'd like to get some basic game menu etc. stuff in, and some sound effects. And some level decorations. I've uploaded a "final" game just in case I don't get any time to do any more on it, but I really do hope to put in a bunch more work. Thursday 03 April, 2008[ richard @ 11:43 ] 2 days, 12 hours, 18 minutes to go
That white line in the thumbnail isn't in the original image. Hmm. I've been bitten in the ass for choosing to use a couple of alpha libraries. They're both cool and really help out when they're working, but unfortunately when they're not I spend development time chasing down bugs. But it was my choice to use them and I'll accept that :) And then there was losing hours last night to a total public transport meltdown here in Melbourne town (we had some previously unheard-of severe weather roll through town that played merry havoc with trains, cars, trees, power lines, brick walls, ...) The little robot now animates, including some facial expressions. You can't see those at the moment because of a depth-sorting issue ;) There's much improved interaction with the scenery and the ball. You can't see that because that's a screen shot and not one of these new-fangled video animations that all the cool kids are producing. I even have some idea what the game might be. I believed, and it happened. Unfortunately I might not get a chance to actually implement it. We'll see. Wednesday 02 April, 2008[ richard @ 03:18 ] 3 days, 20 hours, 48 minutes to goI've been quiet, haven't I? I'm only working on my game during my commute and after hours. And when I say "game" I mean "some toy that's not a game because I don't actually have a game idea yet" :) I've been coming to terms with the Cocos way of doing things. This is fun, because the Cocos developers are actively developing it under me :) Monday 31 March, 2008[ richard @ 10:53 ] Level editingNow I have a level editor! The exact API needs a bit of work so it's not checked into Cocos yet. The code is below though. It's fired whenever I press "e" and saves the XML to "editor-save.xml" when I close the tile palette window.
@director.window.event
def on_text(s):
global editor
if s == 'e':
editor = TileEditorLayer(level, 'data/level-tiles.xml',
'level-tiles', lambda layer: scene.remove(layer))
scene.add(editor)
director.window.push_handlers(editor)
return True
class TileEditorLayer(cocos.layer.Layer):
def __init__(self, map_layer, filename, id, on_done):
super(TileEditorLayer, self).__init__()
self.map_layer = map_layer
tileset = cocos.tiles.load(filename)[id]
tilesets = [
(filename, ''),
]
self.selector = TileSetWidget(tileset)
@self.selector.window.event
def on_close():
self.map_layer.save_xml(tilesets)
director.window.pop_handlers()
self.selector.close()
self.selector = None
on_done(self)
return True
def on_mouse_press(self, x, y, buttons, modifiers):
x, y = self.map_layer.get_virtual_coordinates(x, y)
cell = self.map_layer.get(x, y)
cell.tile = self.selector.tileset[self.selector.current.tile_id]
self.map_layer.set_dirty()
class TileSetWidget(object):
def __init__(self, tileset):
self.window = pyglet.window.Window(width=64,height=256,
style=pyglet.window.Window.WINDOW_STYLE_TOOL)
self.window.push_handlers(self)
self.tileset = tileset
y = 0
self.batch = pyglet.graphics.Batch()
self.sprites = []
for n, k in enumerate(tileset):
s = pyglet.sprite.Sprite(tileset[k].image, y=y, batch=self.batch)
if not n:
self.current = s
s.color = (255, 200, 200)
s.tile_id = k
self.sprites.append(s)
s.scale = 32. / s.width
y += 32
def on_mouse_press(self, x, y, buttons, modifiers):
for s in self.sprites:
if x < s.x or x > s.x + s.width: continue
if y < s.y or y > s.y + s.height: continue
self.current.color = (255, 255, 255)
self.current = s
s.color = (255, 200, 200)
return True
def on_draw(self):
self.batch.draw()
def close(self):
self.window.pop_handlers()
self.window.close()
Oh, and see that dual-window thing going on there? pyglet rocks :)
Sunday 30 March, 2008[ richard @ 05:10 ] Basic gameplay
I now have a simple "game" in which a robot may kick a ball. No animation or anything fancy.
As a treat I've included another robot image :)
[ richard @ 03:14 ] Robots, eh?
Haven't got much else except a sketch of one of the robots. I don't think I'm quite up to making an actual football game. I guess we'll see :)
And now the nice robot has a friend
|
Last Challenge
September 2008 [entries, ratings] Previous > March 2008 [entries, ratings] September 2007 [entries, ratings] April 2007 [entries, ratings] September 2006 [entries, ratings] March 2006 [entries, ratings] (June 2006) August 2005 [entries, ratings] Not logged in Login | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||