On 7/8/05, Tapani Paelli <[EMAIL PROTECTED]> wrote:
> ext Gustavo Barbieri wrote:
> 
> >>
> >>I know... I'll try a quick pygame app to test if side scrolling is
> >>doable at all. It it passes the test I'll write something on wiki so
> >>people can know how to do.
> >>   Expect something by the end of the night.
> >>
> >>
> 
> It's doable but if you want things like collision detection, physics,
> sound, player input reading you don't propably want to do it fullscreen
> in 770 with 800x480x16  (~700kb) screen. Blitting whole screen is a
> heavy operation even on the desktop side if you are doing much more at
> the same time (using software only).
> For faster performance you should use c/c++ with SDL and access
> screen-surface pixels directly doing operations for the screen pointer.
> Then you blit the modified rectangles from the surface and want propably
> take care of overlapping sprites.
> 
> 
> >I use dirty rectangles to just update areas that need to be repainted.
> >If this doesn't work, hardly any scroll side game will work.
> >
> >
> 
> I have a non-optimized shootemup scroller running on device and it's
> playable. If you really want to blit the whole screen I recommend you to
> have a gameui on sides and limit the visible game viewport size smaller
> than fullscreen. And I really really encourage you to visit
> http://www.libsdl.org, download some examples and read tutorials like
> http://cone3d.gamedev.net/cgi-bin/index.pl?page=tutorials/gfxsdl/index.

I already know what you said, I just want someone to test if simple
optimizations would do.
   For example, my first version was using 32bpp alpha-enabled images,
even the background! it ran about 15fps. It's a educative example on
how to structure your game internals.
   Then I got this and have images to be converted to 16bpp and use
colorkey for transparency, it should reduce the cpu load a lot. If
this runs about 30fps, you can have a complete (dummy i agree) full
screen solution that updates the whole screen 30 times a second.
   Then I did a more real-world version, it scrolls the background a
bit slower, just update the whole screen every 1 second. This uses
dirty rectangles animation, that is, it just updates the pieces that
were changed (dirty). This may reduce the CPU load a bit more. If this
version succeeds you can have a side scrolling using common tricks and
don't need any kind of special magic.

Again, this is an experiment. :-)

-- 
Gustavo Sverzut Barbieri
---------------------------------------
Computer Engineer 2001 - UNICAMP
GPSL - Grupo Pro Software Livre
Cell..: +55 (19) 9165 8010
Jabber: [EMAIL PROTECTED]
  ICQ#: 17249123
   MSN: [EMAIL PROTECTED]
 Skype: gsbarbieri
   GPG: 0xB640E1A2 @ wwwkeys.pgp.net
_______________________________________________
maemo-developers mailing list
maemo-developers@maemo.org
https://maemo.org/mailman/listinfo/maemo-developers

Reply via email to