Saturday, April 25, 2009

GameJam coming up...

The next GameJam is scheduled to start Friday May 1.

The guys at OneTwenty are running a mixer event so Jammers can meet, greet and make plans. Please RSVP if you can make it!

Wednesday, April 22, 2009

GHF

So, I've discovered a new medical condition, which causes numbness and tingling in your fingers.

I've called it GHF...

...

...

...Guitar Hero Fingers.

Heh.

Tuesday, April 21, 2009

PyCap - Another Python Game Framework

I've been spending some time with a client, helping maintain a game written in PyCap. PyCap is The PopCap Game Framework + Python hooks.

It is quite fun to work with. The API is simple and stays out of the way, and it's fast! It also takes care of building the binary distributable, which has some appeal for game development in Python. There is also builds for Linux and Mac. It looks neat, but I imagine it could be hard to debug.

Sunday, April 12, 2009

1:41 AM

Still coding. A cooperative scheduler. Argh. So much more that I should be doing...

Well, I think Fibra is 50% faster now. I think. I can't remember the numbers I was benchmarking against... :-(

I've re-instated the network stuff too. Much better API now.

I really should be fixing the gamejam site... or something.

<plonk>

Zzzzzz...

Saturday, April 11, 2009

yield from - redundant syntax?

Greg Ewing is putting together a proposal to adding a "yield from" keyword to Python.

The Spam Server code he provides as a supporting example can already be achieved using the Fibra scheduler, without the new syntax. Notice that Fibra allows exceptions to propagate from an inner task to the outer task.

Fibra also allows an inner task to return values to its parent task, by yielding a "Return(value)" instance. This is what the line_recv task uses to continually yield lines from a socket to the parent task, while maintaining its own internal state.

Perhaps the "yield from" syntax is redundant. Fibra doesn't need it, and Fibra fulfilles the main use-case behind the PEP.

The code below is a direct translation of the Spam Server example, using Fibra.

import socket
import fibra
import fibra.net

port = 4200

def handler(transport):
try:
while True:
try:
line = yield transport.recv_line()
n = parse_request(line)
yield transport.send_line("100 SPAM FOLLOWS")
for i in xrange(n):
yield transport.send_line("spam glorious spam")
except BadRequest:
yield transport.send_line("400 WE ONLY SERVE SPAM")
except socket.error:
pass

class BadRequest(Exception):
pass

def parse_request(line):
tokens = line.split()
if len(tokens) != 2 or tokens[0] != "SPAM":
raise BadRequest
try:
n = int(tokens[1])
except ValueError:
raise BadRequest
if n < 1:
raise BadRequest
return n

schedule = fibra.schedule()
schedule.install(fibra.net.listen(('localhost', port), handler))
schedule.run()


Update: modified handler to use a new transport class.

Wednesday, April 08, 2009

An AppStore Journey

Jack Nutting, of Scribattle fame, has documented his journey on the Apple Appstore. Make sure you check out the slides. At one point, it seems that Scribattle netted ~$300 per day.

I seem to gather from the slides, that Jack now believes that advertising supported, free games are the way to go if you're looking for a greater success in the dollar department. Interesting...

Monday, April 06, 2009

Travel back in time to ID Software, 1993...

John Romero just posted some a film of ID Software's office as it was in 1993.

Wow, look at all that old tech.

Popular Posts