PyWeek day 2
Well, the second day of PyWeek is over (for me, at last) and I have a barely working prototype; here's the obligatory screenshot:
The game is called Galvinball! and the rules are simple: you play against the computer and whoever reaches the ball first wins. But! This is a game inspired by the famous Calvinball, so you can make rules as you play. Just write WHOEVER IS CLOSE TO TREE FLIES and it'll happen!
I created a small DSL that parses rules, splitting them in "targets" (WHOEVER IS, EVERYONE, etc.), "filters" (CLOSE TO *, FAR FROM *, OVER *, TOUCHING *) and "actions" (FLIES, WALKS OVER WATER, MOVE FAST/SLOW, etc.) and applying them to the objects in the game. Actually the game starts with the simple rule WHOEVER IS OVER BALL WINS, and new rules can be added at anytime.
The core functionality of the game is very simple: a random map with trees, water, walls, etc. The fun comes from exteding the DSL to allow rules like ALL TREES CLOSE TO PLAYER MOVE or WHOEVER IS CLOSE TO TREE DESTROY WALLS.
(log in to comment) @RB[0]: it works, thanks to the dynamic nature of Python. Each "action" is a function that manipulates the objects in the game, changing parameters, modifying methods and so on. Of course the fun will come from implementing many many different actions, giving the game a wide range of rules to create. This is where I'll focus after building the basic functionality of the game. @aerojockey: thanks! :)Comments
RB[0] on 2007/09/04 02:31:
that looks awesome!and the idea rocks, does it actually work correctly?
I'll definitely be keeping my eye on this game :)