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! / How do I scroll the back ground using the arrow keys?

Author
Message
D18AGON
21
Years of Service
User Offline
Joined: 25th Sep 2004
Location:
Posted: 26th Sep 2004 15:27
First I need to know how to load a bitmap which much bigger than the screen, then assighn the camera to start on looking at he bitmap
in a certain position upon execution. Plz give simple example.

Second I need to know is how to make the background scroll from their in a specified direction when I press an arrow key. Plz give simple exsample. Also give example of how to put these two together in same program so I can load a background and scroll it using arrow keys.
IanM
Retired Moderator
23
Years of Service
User Offline
Joined: 11th Sep 2002
Location: In my moon base
Posted: 28th Sep 2004 07:49
You're not going to get very far going the 'big bitmap' route. You need to think about using a tiling system instead.

Here is a very basic example of one way to get the effect that you want : http://www.thegamecreators.com/?m=codebase_view&i=dc2f1b35292009ad54b84331daee10ef

It's not pretty but it does the job

*** Coming soon - Network Plug-in - Check my site for info ***
For free Plug-ins, source and the Interface library for Visual C++ 6, .NET and now for Dev-C++ http://www.matrix1.demon.co.uk

Login to post a reply

Server time is: 2026-06-11 17:32:14
Your offset time is: 2026-06-11 17:32:14