[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] learning pygame: what to focus for a board game?



Luke Paireepinart ha scritto:

>> 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?
>>   
> I'll preface this with "huh?"
> what do you mean "the tile rotation when asked to rotate it?"

Sorry. It was late in the night and I was getting sleepy...

Once a tile pops out from the random sample, I assume it will be showed,
but the user will want to rotate it, often, before placing it in the
board. What would be nice is to have the rotation not to be completely
instantaneous, but to actually see the tile rotate somehow smoothly.

It is that kind of details I won't enter into for a LOT of time, and
probably never. But programming other projects teached me that planning
in advance for flexibility in adding features is good (I spent painful
days refactoring a data analysis application in my lab...) , so if
sprites allow this and more, I'd start directly with sprites when
planning graphics.

> there are different kinds of rotation.
> smooth rotation, rotation by fixed degrees, and rotation by increments
> of 90 degrees,
> all behave differently.
> rotation by 90 degrees is the simplest, because the size of the image
> doesn't change.

OK. I'll dig into it.

 > in other words, in most cases, using Sprite will help you simplify
things.
> For example, I haven't read the description for your board game, but if
> you were making, say, chess,
> you could have a sprite group containing all the pieces, then whenever
> you needed to move a piece, you could use the collision methods to check
> if it were moving onto another piece, and if so, delete that other
> piece... and then use the draw method to blit all the pieces to the
> screen again.
> whereas with rects, depending on how you're storing them, it may be more
> complicated, or may not.

Thank you. I'll have a look at sprites, then.

>> - Where are the "widgets" needed for a configuration panel and/or a
>> menu? Things like tick box, menus etc.?
>>   
> pygame is meant to be low-level and as efficient as possible, so that
> the game developer is not restricted in any way.
> as such, you're expected to either implement such things yourself (which
> really isn't as hard as it sounds)
> or use OcempGUI, Phil's PGU, etc, etc.  In other words, go to the Pygame
> GUI page and find out which
> third-party library does what you need.

Oh :(

I was wondering if wxpy integration was useful, but pygame wiki says
it's BAD BAD BAD (and it has good reasons). PGU instead seems what I was
looking for.

>> - Any other basic advice in building a board game with pygame?
>>   
> I have specific advice for this game:
> if you don't already have artwork for the tiles,
> DON'T DRAW IT NOW!

Haha, sure. I think drawing real artwork will be the last thing. :)

> point #2: You may not want to call your game carcassonne.  Since
> Microsoft is making a clone of it for the x360 arcade,
> you might get some hostility from them if you release a free version of
> a game they're charging people for!

Sure. There are freeware carcassonne clones for windows out there (plus
a -sorry to say- very crappy one in Java), so I guess patent/copyright
problems on the game itself are not that hard (tried to look for
specific info, found none). But nonetheless I won't ripoff the game 1:1
completely.

Anyway, chances are that the x360 game will be much better than mine, so
MS shouldn't be in terror.

> This game looks like a lot of fun! let me know how you progress.

Thanks a lot!

> Some general advice, if you're new to game development:
> get a gmail account, so that you can register your project with google
> code.
> This will provide you with an online SVN server.
> Then get TortoiseSVN if you're on Windows (if you're on Linux or Mac I
> assume you already have a subversion client.)
> then, register for a www.blogger.com blog (affiliated with Google)
> and you can keep a log of your progress on it.
> Get a photobucket or imageshack account so you can upload game screenshots
> easily for inclusion on your blog.

The blog idea is cool; I already have gmail accounts so I guess I can
use the one I'm mailing you from. I've seen a lot of people moving on
google code. I was accustomed to the old idea that SourceForge was THE
place for free software projects. I'd love to know why google code is
better than sourceforge.

I will surely use svn, anyway.

m.