[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [pygame] Tile Based games



On Thu, Oct 18, 2001 at 10:07:09AM -0700, Pete Shinners wrote:
> >from what i've found, when you are scrolling, the best bet is usually 
> just to redraw the entire screen each frame. one benefit to this method 
> is it works very well with hardware accelerated surfaces (if you can get 
> one). when stuck in a software mode, you'll likely be around 25fps on 
> average hardare. 25fps actually seems like enough for most 
> sidescrollers. this also frees you from needing to keep track of updated 
> rectangles on the screen, which is simpler.
I don't think so.. 25fps by itself is rather optimistic (or your idea of
an average hardware ;).. and don't forget that this means you spend 100%
CPU time on redrawing! I tried this approach for EoM myself and it all
worked great. Nothing to worry about (as everything was redrawn anyways) and
some 40 fps.. but then when you get down to 300+ MHz machines you're
totally lost. Even 700 Mhz have shown to be too slow.
And last but not least there is absolutely nothing else involved at that
time! No game calculations, no sounds, nothing. As soon as you get fancier
you'll lose speed and therefore the fps drop dramatically.

Of course this is only my personal oppionion on this matter based on my
personal experiences made with the EoM rendering engine. And I agree that
there is a lot more stuff to take care of when you're only updating parts
and in fact it can get even slower if you aren't careful. But imho it's
worth it.

@Leonardo: You may want to take a look at this:
http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/eom/eom/client/screen.py?rev=HEAD&content-type=text/vnd.viewcvs-markup
(sorry for the long URL.. might break)
This is the rendering engine we use for EoM..it's under development and there
are certainly parts that can be improved (if anyone sees any major
improvements let me know pls. thx).
Or alternatively you may want to take a look at pyplace.sf.net which is a
real isometric tilebased engine.

hth
-- 
Raiser, Frank aka CrashChaos
IRC: irc.openprojects.net #pygame

"I saw a film where there was an alien crawling around inside a spaceship's
air ducts and it could come out wherever it liked," said Johnny
reproachfully.
"Doubtless it had a map," said the Captain.
        -- (Terry Pratchett, Only You Can Save Mankind)
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org