On 2010.4.15 11:49 PM, Mark Reed wrote:
Hey guys, I'm looking for something perhaps where you can specify a
gamefield like:
You might be interested in the code at:
http://kschnee.xepher.net/code/squirrelgame/
Screenshot: http://kschnee.xepher.net/pics/squirrel_game/100202squirrel.jpg
which
Hi all,
I'm trying to develop a little shoot'em up just for fun. The first try is a
disordered code that can do the begining of the job, but who has many bug. So
I'm trying to use an MVC pattern as explained in tut-design.
The tricky point for me is that I've only used individual sprites and
Without knowing details, one can only conjecture. You might use
Group.update(*args) to get info to each sprite. The sprite group in turn
calls Sprite.update(*args). You can pass anything, such as a source rect to
use in computing relative offsets, a list or dict of rects, or a callback
function.
I failed to mention that if you truly want to leverage MVC you might simply
send data to the View in a message attribute.
Gumm
With more detail (sorry if that's a noob problem) :
I use a big picture with different view of the plane (the charactor), so I need
to display only the good part of the surface. In my crappy version I have 3
attribute for the plane sprite : surface, source rect, and destination rect.
Everytime
I have done a tilemap, however I think it might be quite a bit more
involved than what you are looking for.
http://hg.thadeusb.com/Games/PyBTS/file/f7473ac7857e/src/pybts/terrain
See tileengine.py and tilemap.py
--
Thadeus
On Fri, Apr 16, 2010 at 2:29 PM, Mark Reed markree...@gmail.com
Sounds like you've got a filmstrip as your source image. Why not just
break the filmstrip up into multiple Surfaces during the __init__ method of
your Charactor sprite, and set one of the surfaces to be the current
self.image?
def breakup_filmstrip(filepath):
... (return a list of Surfaces
You have a zip of this? A demo game started?
I may be able to modify this code to support the types of games I'm
doing, and eventually I should get to more complicated games which
would make more use of PyBTS so at that time I'd be able to work on
it.
Burgess - You plan on continuing your work
All of the code is in the repositories (hg.thadeusb.com/Games)
PyBTS (pygame behind the scenes) is the game engine
MyRTS is a set of two proof of concepts that utilize PyBTS.
I do plan on continuing work when I find time to.
--
Thadeus
On Fri, Apr 16, 2010 at 4:13 PM, Mark Reed
I've got to release a bunch of games so if I do work with PyBTS I'll
be putting a lot into it.
However, I can grab PyBTS, but MyRTS gives an apparent server error:
abort: premature EOF reading chunk (got 801992 bytes, expected 5841998)
Mark
On Sat, Apr 17, 2010 at 5:18 AM, Thadeus Burgess
Sounds to me like you'd want to create a subsurface of your larger image
each game tick before calling group.draw() or sprite.draw(). Reference
pygame.surface.Subsurface().
self.image = pygame.surface.Subsurface(self.full_image, self.source_rect)
Gumm
I had difficulty following the explanation. Sorry If I misunderstand what
you're trying to accomplish, Vincent.
On the drive home I was thinking about this. The following little demo might
suit your purpose?
http://trollsouttaluckland.googlecode.com/files/subsurf_as_viewport.py
It assumes you
Odd.. seems as if the repository got corrupted... version control fail!
When I get back home I will be able to send you a zipped version until
I can figure out what happened to my repository.
I have been interested in further developing pybts, perhaps it is time
I gather my notes together :)
--
Looks to be a bug in hgwebdir with the large binary files.
Here is a gunzip of the files.
http://static.thadeusb.com/MyRTS.tar.gz
--
Thadeus
On Fri, Apr 16, 2010 at 10:02 PM, Thadeus Burgess thade...@thadeusb.com wrote:
Odd.. seems as if the repository got corrupted... version control
14 matches
Mail list logo