Strict Standards: Non-static method phpbb_feed_factory::init() should not be called statically in /home/jacius/rubygame/forums/feed.php on line 66
[phpBB Debug] PHP Notice: in file /feed.php on line 171: Cannot modify header information - headers already sent by (output started at /feed.php:66)
[phpBB Debug] PHP Notice: in file /feed.php on line 172: Cannot modify header information - headers already sent by (output started at /feed.php:66)
Rubygame Forums 2010-05-27T01:51:39+00:00 http://rubygame.org/forums/feed.php?f=4&t=131 2010-05-27T01:51:39+00:00 http://rubygame.org/forums/viewtopic.php?t=131&p=524#p524 <![CDATA[Blitting surfaces at 1000x1000]]>
I have a surface that's 5000x1000 in size but it is divided into 5 clips(1000x1000 each) and when I try to blit them the framerate drops from 50 to around 9-10. I thought that SDL clipped the images by itself for you? Or do I have to calculate what area to paint myself?

I know it is the blitting that slows it down to that framerate since when I remove the blit statement of that surface it goes back up to 50 FPS.

Code commented away to get back to 50 FPS:
Code:
surface.blit(@screen, coords, src_rect)


What I'm trying to paint is a sectors(I divide a huge map into sectors and only render the ones in view) terrain image. The different clips are the layers/levels/z of the sector which are rendered by: y -= layer * 32

Anything else you need to know just ask. That framerate drop is too painful

**EDIT**
Played around a little more and when I moved the camera so it looked at the coordinates 900x900 so that it didn't show all the other layers, it went up to 50 in FPS

Statistics: Posted by Groogy — Thu May 27, 2010 1:51 am


]]>