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.

Newcomers DBPro Corner / How do I make 2d levels for my games

Author
Message
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 16th Oct 2004 04:30
I would like to know how to make 2d levels in my game. I would also like to know how I can add textures to the map. thnx

using dbpro

I am a newb at DbasicPro creator.
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 16th Oct 2004 04:31
I would also like to know how I could get my character to collide with the walls objects trees etc.

I am a newb at DbasicPro creator.
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 16th Oct 2004 04:37
I got a question about the camera also. How do I make it so that it follows my character(sprite)

And what is the basic setup of a function.

Or an array

I would like to see some thnx

I am a newb at DbasicPro creator.
Dot Merix
21
Years of Service
User Offline
Joined: 15th Oct 2003
Location: Canada
Posted: 16th Oct 2004 05:17
USE THE EDIT BUTTON.. people hate so many posts in a row by the same person.



WindowsXP Home(Service pack 2), Athlon XP 2400+(2.1Ghz), 1GIG Ram, Ati Radeon 9800Pro 128MB.
Skeletor
20
Years of Service
User Offline
Joined: 21st Jun 2004
Location: florida
Posted: 16th Oct 2004 05:39 Edited at: 16th Oct 2004 06:00
Quote: "I would like to know how to make 2d levels in my game. I would also like to know how I can add textures to the map. thnx"


This code gets the screen prepared for your sprites and background image.


For your background image, open a paint program and draw/paint something 640 x 480 and then save it as Background.bmp (or what you prefer). Also make sure it is placed in the folder with your source code so you can load it into your game. Then...




Quote: "I got a question about the camera also. How do I make it so that it follows my character(sprite)"


If your using pure 2d there is no camera. The method I will be using is when the player's Y coord is in the center of the screen I will stop the player from moving up any higher and then add to every other sprites Y coordinate so it will look as if the player is moving up and the background is scrolling down.

Heres a pic from commando that might help you understand my method better.



Quote: "And what is the basic setup of a function."




This is a basic function from my 2d Shoot 'em Up engine.

to call this function during your game you would need this code


Since my function is determining if the player's bullet hit the shield you need to specify the Player's Bullet sprite number which happens to be 1 in our case, and then you need to specify the sprite number of the shield (which happens to be 3) that we are trying to see was hit.

Well I hope that this helps you a bit but what you really should do is start looking at previously made 2d games in the codebase. That should give you a good idea how games are crafted.


http://www.angelfire.com/games5/db_games/
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 20th Oct 2004 05:19
so how would i put in the little score bars and all that stuff like the number of grenades you have or bullets so the player knows how much he has left?

I am a newb at DbasicPro creator.
They Killed Kenny
20
Years of Service
User Offline
Joined: 18th Jul 2004
Location: FL, USA
Posted: 24th Oct 2004 00:53 Edited at: 24th Oct 2004 00:53
Variables or arrays both work to set the score. You can use an image to put the words SCORE on the screen and use Variables for the numbers.

make sure that it prints them next to the score.
Game pro
20
Years of Service
User Offline
Joined: 21st Mar 2004
Location: Usa
Posted: 18th Dec 2004 03:47
Ok thnx I get it now.

I am a newb at DbasicPro creator.

Login to post a reply

Server time is: 2024-11-27 16:37:59
Your offset time is: 2024-11-27 16:37:59