sprite candy for an isometric game

Blitz3D Forums/Blitz3D Programming/sprite candy for an isometric game

slenkar(Posted 2007) [#1]
O.K.
In sprite candy you have to put images on layers, layers are z-ordered,

When making an isometric game you have to draw each tile and then objects that are on top, then move on to the next tile.

If you put different things (walls,floors,objects) on different layers it will not be drawn to the screen in the right order

So, another way of doing it could be-putting all graphics on the same texture.
But arent there problems with large textures?


any ideas appreciated


Uncle(Posted 2007) [#2]
I wrote an isometric game using spritecandy, and the only issue I had was speed related. But with a small modification to the SpriteCandy code it worked well.

I seem to recall the problem was that everytime you set the z order of a single sprite it would resort the whole sprite z order list. The most optimal way is to first assign the new z order details to each sprite and the do one sort with the all the z order figures.

In the meantime I've just looked at the source code, and it was a problem with the command HUD_SetObjectOrder. In that function you will see a call to another function SC_SortObjects. Obviously if you are doing a mass change on the z orders of sprites you dont need to sort the every single time, so I simply blanked out the call to the function SC_SortObjects, sorted all my sprites into order and the finally called SC_SortObjects. This speeded up the processes alot.

You can see it in effect by looking at the highway encounter remake in my sig.


slenkar(Posted 2007) [#3]
nice graphics in that highway encouner game...
did you put all graphics on the same layer?


Uncle(Posted 2007) [#4]
The backgrounds i.e. the trees, the roads, the fences etc are all drawn using standard blitz 2D drawing commands. I found this took up less memory and was much smoother and faster than trying to draw the whole scene in Sprite Candy.

I then used sprite candy to overlay everything else (the hud, the menus and all the sprites). The sprites are all a single layer.


slenkar(Posted 2007) [#5]
I didnt know you could put 3d hud gfx over 2d gfx,
doesnt renderworld clear all 2d stuff


Uncle(Posted 2007) [#6]
Usually yes it would overwrite the screen with the 3D render, however you can change the Clsmode of the 3D camera so it doesn't. Here is my camera set up...

	Cam=CreateCamera()
	PositionEntity Cam,0,-10000,-10000
	CameraClsMode Cam,False,False