Slow images

BlitzMax Forums/BlitzMax Programming/Slow images

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

I am writing a 2D side scroller in Max and have been constantly running into speed issues through every step of its development. All of them seem to be linked to BMax's poor performance with large images. Here's a breakdown of my games frames per second as different portions of the rendering code are added in.

640x480x16

Blank Screen: 6,200 FPS

Render Map: 2 layers of 16 x 16 1.5 Scaled + Filtered Tiles
SetColor 255, 255, 255; SetScale 1.5, 1.5
a = 0; b = 0
If (playerList[myID].D = 1 Or scrollX > 0) Then tmpXOff = 1 Else tmpXOff = 0
If (playerList[myID].D = 0 Or scrollX < 0) And scrX > 0 Then tmpXOff2 = 1; a = -1 Else tmpXOff2 = 0

For y = scrY To scrY + 18
	For x = scrX - tmpXOff2 To scrX + 26 + tmpXOff
		If map(x, y, 0) <> -1 Then DrawImage imgTiles, Int((a * 24) - scrollX), Int(b * 24), map(x, y, 0)
		If map(x, y, 1) <> -1 Then DrawImage imgTiles, Int((a * 24) - scrollX), Int(b * 24), map(x, y, 1)
		a:+1
	Next
	If tmpXOff2 = 1 Then a = -1 Else a = 0
	b:+1
Next
SetScale 1, 1

Down to 2,600 FPS O_o

Render 320x240 2x Scaled + Filtered Background Image: 1,500FPS

So here with only a tilemap and one background image showing, frames per second are already at 1,500 on my PC, and are around 200 on my less powerful laptop. How am I sopposed to add in anything else when something this basic brings a Radeon 7500 / P4 2.0Ghz laptop to its knees? I have the latest drivers on all my systems, and after much testing I am very disappointed with OpenGL performance in general.

I was planning on having two parallax scrolling backgrounds but this doesn't seem possible. Does anyone have any speed tips they can share?