[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] board game
marta sanz wrote:
Hi!
I'm a newbie in game programming. I am programming -well, trying to do
it.. :D- a board game like Trivial, a board game of questions and
answers.
In this game, you have a board with many squares, and each one have
one question to be answered by the player, there are 6 types of
squares, and depending on the type, the question is about sciences,
maths, history,etc.
The problem I find is to know how to draw that board, don't know if
it's better to draw the entire board with a paint program (inkscape,
gimp..) and then load it with pygame, or draw each individual squares
and the load them one by one making the board, or what. The board has
an hexagonal shape.
Any idea?
Regards and Thanks for all.
Marta.
You need to go a little further describing your game.
For example, if the tile are static (i.e not animated), you can draw the
whole board and calculate which tile is clicked on from the mouse
position. This is much simpler and I advise you to do that..
The alternatives is to design each tile and then join them with you
program. This has the advantage to allow animated tiles but it is much
harder (more concepts and more code involved).
Beside, except if it is a core mecanism of the game, forget the
hexagonal shape, at least for now : it will add complexity to your code
with little benefits but visuals.
Once you have done a first version of the complete game, you can redo
this particular part of the code. This is a good way to progress.
But even if you take the first path, more generally you need to specify
you game. What happen when one clik on one tile ? A popup appears ? Is
it another window or is it within the pygame window, etc...