[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] learning pygame: what to focus for a board game?
In a message of Fri, 15 Jun 2007 01:04:14 -0000, "massimo s." writes:
>Hi,
>
>I have this fixed idea of writing a clone of Carcassonne (
>http://en.wikipedia.org/wiki/Carcassonne_(board_game) ) with Python,
>playable under Linux. Basically, it's made of square tiles that must
>match together forming a map, and one gets points if manages to complete
>cities, roads etc... Simple but fun, quite strategic.
>
>I'm having a look at pygame for its development and it looks promising.
>However most pygame tutorials etc. are aimed at arcade-like games, as
>far as I can see. That's cool, but that's pretty far from my aims.
>
>So I'd like to know:
>- Should I learn sprites or can I just learn surfaces? I'd like to have
>(or at least plan to support in the future) some (very simple)
>animation, like the tile rotation when asked to rotate it, or a fast
>movement of the tile into the board. Can I make it just with rectangles
>or do I need sprites?
You definitely can make your tiles to be just surfaces. But the question
then becomes, how to you want to create the robbers, monks, townspeople,
and farmers? I'd use sprites for them. Sprites aren't hard to use.
>- Where are the "widgets" needed for a configuration panel and/or a
>menu? Things like tick box, menus etc.?
http://www.pygame.org/wiki/gui
>- Any other basic advice in building a board game with pygame?
You can get exhausted making art, unless you are one of those
rare sorts that finds making computer art liberating. So first make a
version of your game that just does the game logic and doesn't
use pygame at all to start with. You can do test driven design
with this and get your logic bugs out first. Stupid ASCII art
where you just print 'C1' for castle-picture-1, and 'M1' for
monestary-with-a-road, and the like will be just fine. You
can call something like 'update_screen' and get a grid of
2letter tiles, for use when debugging the logic.
Then when you get that working, you only need to use the
pygame part as part of your next-generation 'update screen'.
The nice thing is that doing things this way will probably get
you Model-View-Controller for free. If you don't know what
that is, read http://sjbrown.ezide.com/games/writing-games.html
and then google around for some more until you understand why
this is a good idea.
>
>Thanks a lot,
>
>M.
I'm really looking forward to this. I want to play carcasonne
with friends on long airplane rides.
Laura