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 / darkBASIC Pro- 2D problems.

Author
Message
Game King
17
Years of Service
User Offline
Joined: 25th Mar 2007
Location: Naples, FL
Posted: 10th Jun 2007 22:47 Edited at: 12th Jun 2007 02:05
Hi. First I want you guys to look at this screenshot so you can see what I mean:



I want to replace the black background with a image of a mountain image I have created. I don't want it to tile the image nor stretch it, it's big enough. I just want to find out how I can put an image in the background.

How can I create gravity for a 2D platformer?

And sprite depth, how can I make it so that if an image is above another I can make the image that's under the other appear above it with a depth code.

Thanks!


Daemon
18
Years of Service
User Offline
Joined: 16th Dec 2005
Location: Everywhere
Posted: 10th Jun 2007 22:56
To put an image in the background just make it a sprite and make it be in the back or use paste image every loop right after the sync command (you should be using sync- if your not then look this up).

Sprite depth is easy. Just use set sprite priority.

Insanity is just a state of mind.--- See the SUI
Game King
17
Years of Service
User Offline
Joined: 25th Mar 2007
Location: Naples, FL
Posted: 10th Jun 2007 23:15
Thanks! got it to work. Oh and how can make gravity?
Twu Kai
19
Years of Service
User Offline
Joined: 2nd Oct 2005
Location:
Posted: 11th Jun 2007 13:08
For gravity, what I do is make a float (maybe yspeed#), I set the value of yspeed# to something in the negative, then when you press the jump key, it sets the value to something positive, but gradually decreases into a negative number again. Also you'd move the object you wanted to jump up by yspeed#. Like this:


Hope it helps.

Try.
Roxas
19
Years of Service
User Offline
Joined: 11th Nov 2005
Location: http://forum.thegamecreators.com
Posted: 11th Jun 2007 13:42
an other tips put every sprite backsafe off (but not the background sprite) and when loading images and u want it to be accurate image use this command load image "yourimage",id,1

where 1 is extra param wich makes ur image accurate (No Mip-Maps)


[B] - LINKIN PARK - [/B]
Game King
17
Years of Service
User Offline
Joined: 25th Mar 2007
Location: Naples, FL
Posted: 12th Jun 2007 02:07
Twu Kai~ Thanks! it helped.

The Full Metal Coder Roxas~Thanks for the tip.

What I ment about depth is if an image is above text, how can I make the text over all the sprites

Ty Again



Login to post a reply

Server time is: 2024-11-25 17:51:28
Your offset time is: 2024-11-25 17:51:28