Scrolling back ground point and click?

BlitzMax Forums/BlitzMax Beginners Area/Scrolling back ground point and click?

Pete Carter(Posted 2008) [#1]
I know the best way of making a scrolling back ground is tile maps. but would the best way of doing it in a monkey islands style point and click be to use one large (long and thin) bitmap for the background you want to scroll and then offset all the x positions of the background image, objects and characters? the backgrounds are detailed and painted.


GfK(Posted 2008) [#2]
Create your background image but load it with LoadAnimImage as a bunch of, say, 256x256 tiles.

If you load an entire bitmap as a single 2048x600 bitmap

A) it will take a hell of a lot of graphics memory as the whole image will have to be sent to the graphics card in order to draw it (even if most of it can't be seen), and:

B) it might not even work on some hardware.

This is how I'm doing it with the zoomable, scrollable map for Magicville. Objects on the map are given in x/y coordinates relative to the overall size of the image (1536x1152 represented by 108 (12x9) 128x128 tiles)


Pete Carter(Posted 2008) [#3]
ok thanks so its better if i just cut it into square tiles and only load the next bit as the screen get near it. ok


iprice(Posted 2008) [#4]
If you only load the next bit when you get near it, there could be a slight pause in the action. Better to load each whole screen (in segments as mentioned above) before displaying it.

BTW I did a small (non-scrolling) point and click game in BMax - http://www.booleansoup.com/index.php?p=40&mode=view_item&type=full&id=128


Pete Carter(Posted 2008) [#5]
Sorry im new to 2d, i only have 3d experience. but if i load all segments at once what difference would it make over having it as a piece or is it about blitz not rendering the segments off screen?


GfK(Posted 2008) [#6]
but if i load all segments at once what difference would it make over having it as a piece or is it about blitz not rendering the segments off screen?
I'd say load them all, unless you have thousands and thousands, then you might want to think of another way, but generally, load them all in one go.

The 1536x1152 map for Magicville uses a bit less than 7MB of graphics memory. I don't use more than 2-3MB on top of that (on the map screen) for other stuff, so I know I'm good to go on a 16MB graphics card.

You need to decide what your minimum hardware requirements are going to be, then base all your calculations on that. A 512x512 texture equates to about 1MB of graphics memory:

maxMemRequired = (imageWidth * imageHeight) / 262144 (512x512)


Pete Carter(Posted 2008) [#7]
ok thats cool, i didnt mention something that which will make a big difference, its for the tigsource retro demakes compo and its only going to be 640x480 and prob take up only half the screen with the game and the rest will be a boarder for the gui. its ment to look like an amiga game.


iprice(Posted 2008) [#8]
Max doesn't render off-screen.

There's a big difference between loading a large image from the harddrive as you need it, rather than having it in all in memory prior to it being used and displaying as required.

This doesn't mean that you have to load all graphics in before the games starts (you can do this, but if you have lots of large images, this could take a while and waste time/memory when you can do it more efficiently later), it means loading all required graphics for that individual level/screen/scene into memory prior to setting up the scene.


MGE(Posted 2008) [#9]
Seriously....worrying about 16mb cards is really not your typical casual gamer who purchases software. I'd say you could easily use 32 or 64mb as your minimum vram considerations in today's market. Plus, if you use the DirectX render, load all you want, it will be properly managed for you. ;)