pingus-devel
[Top][All Lists]
Advanced

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

Re: SmallMap issue(s)


From: Ingo Ruhnke
Subject: Re: SmallMap issue(s)
Date: 10 Oct 2002 13:26:34 +0200
User-agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2

David Philippi <address@hidden> writes:

> If you find a solution that doesn't have to go through every object
> you'll surely speed things up - but how should this be done? You
> can't get informations from all objects without touching them in
> some way.

As long as its just a O(N) runtime I wouldn't care, if it would be a
O(N^2) then that could most likly be done better, but anyway such
loops are exctaly *no* problem at all. If we blit a tiny pingu to the
screen we run through loops that are multiple times as large than the
stuff that happens in the World class.

If somebody wants to make Pingus faster than there are basically two
ways:

1) take the Blitter class and rewrite it in assembler or at least
   replace all the evil get_pixel()/draw_pixel() blitters with real
   ones that act directly on the data. (Note: these are only used to
   paint on the groundmap, normal Sprites which get drawn to the
   screen use ClanLib stuff)

2) Fixup the fastmode and let it update only the screen regions that
   have changed instead of the whole screen, to work this requires
   that the animated backgrounds get disabled
   (CL_Display::put_display() vs flip_display()), this could easily
   give a speed up of mulilpe hundred percent.

-- 
WWW:      http://pingus.seul.org/~grumbel/ 
Games:    http://pingus.seul.org/~grumbel/gamedesigns/
JabberID: address@hidden 
ICQ:      59461927




reply via email to

[Prev in Thread] Current Thread [Next in Thread]