Any 2d engines with fast individual pixel plotting

Miscellaneous Forums/General Discussion/Any 2d engines with fast individual pixel plotting

Hello,

Are there any 2d engines which are available which can handle writing to an 800x600 display each individual pixel at a decent frame rate?

Writepixelfast/readpixelfast are fine for doing a few pixels here and there but if I want to draw large portions of the screen using these routines they are very slow.

Is this a directx issue? A blitz issue? Why is it faster to use 'drawimage' style commands to fill the screen many times over than to plot individual pixels to fill the screen?

My reason for asking is because I am attempting to put together a game using 2d pre rendered scenes with 2d creatures moving about in the scene. The scene is rendered isometrically so that no scaling of the creatures is needed, but to have creatures move behind/in front of obstacles the only way I know of handling depth issues is to store a 'depth' map on a per pixel basis and draw the creatures a pixel at a time. There has got to be a better way of doing this.

Any advice would be greatly appreciated.

I thought Blitz+ was pretty fast at this.

Not fast enough (Blitz+ can draw pixels very fast, much faster than blitz3d but not as fast as I'd like - but then maybe I have unrealistic expectations)- but I have found a work around using blitz3d:

If anyone is interested this is a simple method of doing this which I found on the ogre forums but can be applied to blitz3d.

Graphics3D 800,600,32,2
SetBuffer BackBuffer()
camera=CreateCamera()
sprite=LoadSprite("DragonScene.png") ;You will need to change this line to some picture that you have if you wish to test it out
EntityOrder sprite,1
ScaleSprite sprite,40,30
MoveEntity sprite,0,0,40

cube=CreateCube()
MoveEntity cube,0,0,10
TurnEntity cube,5,5,5

mesh=CreateSphere()

EntityColor mesh,255,0,255
MoveEntity mesh,5,0,10
d#=0.1
Repeat

HideEntity cube
HideEntity mesh
HideEntity sprite

CameraClsMode camera,True,True
ShowEntity sprite
RenderWorld
ShowEntity mesh
ShowEntity cube
HideEntity sprite
CameraClsMode camera,False,True
RenderWorld
HideEntity cube
ShowEntity sprite
CameraClsMode camera,True,False
RenderWorld


x#=x#+d
If Abs(x)>5.0 Then d=d*-1
PositionEntity mesh,x,0,10 

UpdateWorld
Flip


Until KeyDown(1)
End


It requires that a 3d mesh be made of the scene though to represent occluders...

It requires that a 3d mesh be made of the scene though to represent occluders...
What?! If you're going to go to that much trouble, why not just render the whole thing in 3D in the first place, and maybe have your animals as sprites with an AnimTexture containing all movement/orientation frames?

big10p - I can make a low poly mesh for occlusion & collisions but use a very high poly mesh which is rendered as the 'visual appearance' of the scene in a rendering package.

This demo by Binary Therapy is mighty impressive. Its written in BlitzMax (source included).

I stripped out the music and side panel graphics to save on file space. I hope the original coder (FlameDuck) does not mind. Credits in the zip.



Binary Therapys FireDemo