canvas size limitation

BlitzMax Forums/BlitzMax Beginners Area/canvas size limitation

hub(Posted 2006) [#1]
Hi.
My game use 1024x768 resolution.
I've coded an game-editor to place some ennemies ships on a canvas. Next i save their positions. In the editor, With a 1024x768 window, i can't fix the canvas size more than 1024x768 pixels. This is a problem to position some ennemies outside this zone (in my game, a space shooter, a lot of ennemies come from outside the screen)

The following code, is an example, in my game editor i can't use a pixmap : i use a lot of max2d commands as Drawline, drawimage, to position things on the canvas.

Is there another solution than use a 1152x864 window !?!

Thanks !




Dreamora(Posted 2006) [#2]
Saving the things with types internally and draw all stuff that is within the current "view rect" which bases on a virtual position an a virtually unlimited canvas.

You don't need a 10000x10000 canvas ... it must only be virtually that large -> works similar to a regular tile system with "draw whats within screen"


Grisu(Posted 2006) [#3]
As Dreamora said.

Use a virtal "Viewport" and only draw items/enemies inside it. The canvas size itself stays the same.


hub(Posted 2006) [#4]
ok, thanks for the idea.


hub(Posted 2006) [#5]