Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / top down map scrolling?

Author
Message
Remlap Neb
20
Years of Service
User Offline
Joined: 18th Sep 2003
Location: United Kingdom
Posted: 20th Dec 2003 12:27
ok well ive got a 2d map and a guy on top and i hav it so he moves around the map and all that but when he reachs the edge of the map he just dissapears.
i know how to stop him doing that but i want the map to scroll just as if it was 3d and you moved the camera.
now ive tried before where the map moves as well as everything on it but that slows it down to much u know with moving all the other sprites and all.
so i was wondering if anyone had any better solution to get the map to scroll.
thanx in advance
ben


Ben Palmer(Guitarest, Drummer and Bassist)
IanM
Retired Moderator
21
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 20th Dec 2003 14:14
Have a look at the tiling example I've got in CodeBase to start you off : http://developer.thegamecreators.com/?m=codebase_view&i=dc2f1b35292009ad54b84331daee10ef

For free Plug-ins, source and the DBPro Interface library for Visual C++ 6 and .NET
http://www.matrix1.demon.co.uk
Remlap Neb
20
Years of Service
User Offline
Joined: 18th Sep 2003
Location: United Kingdom
Posted: 20th Dec 2003 14:17
thanx ianm

Ben Palmer(Guitarest, Drummer and Bassist)
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 20th Dec 2003 14:20 Edited at: 20th Dec 2003 14:21
Well, like you said earlier, it's fastest to move a camera than a whole bunch of objects. Make the game with plains or sprites, and move the camera. If you are afraid of 3D then use copy bitmap from a back screen to a front screen. The copy command has an offset which can be used to scroll the image.

Copy Bitmap X1/Y1, X2/Y2

Copy Bitmap X1+2/Y1, X2+2/Y2

This copies a picture, then copies it again but 2 pixels to the right.

This only works if the hidden picture is bigger than Bitmap 0.

Or you could use a background that is a sprite. I haven't tried that, but it is supposed to be fast in DBPro.

There is also the tile method, that can be found by searching around on those pages.

Pincho.

Login to post a reply

Server time is: 2024-05-11 19:22:42
Your offset time is: 2024-05-11 19:22:42