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 / what have i done wrong

Author
Message
Pure Pessimist
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: Australia
Posted: 3rd Oct 2002 07:08
Im using the demo version of darkbasic
my program runs but not the way I want to.

heres my code

load bitmap "static1.bmp",1
sprite 1,30,500,1
do
if rightkey()=1 then offset sprite 1,20,0
loop

I cant see my sprite how do I make this work
My games are good , but there not good enough
Pure Pessimist
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: Australia
Posted: 3rd Oct 2002 10:58
ok ok I need to simpifiy it

Im making a 2d game how do I make a sprite

My games are good , but there not good enough
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 4th Oct 2002 01:38
I thought you needed an image for a sprite. Use:



and your sprite should show up. Make sure you put the sprite somewhere visible. I use the sprite command to move the sprite, but I don't know if that's the proper way to do it.
Zeal
21
Years of Service
User Offline
Joined: 10th Oct 2002
Location: Colorado Springs, CO
Posted: 12th Oct 2002 23:17
dont forget to sync!

All you need is zeal
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 15th Oct 2002 16:33
By default your app is running in 640x480 (In DB classic).
You use the command:
sprite 1,30,500,1

The syntax is:
Sprite Sprite_number,X,Y,Image_number

Since the screen is only 480 pix in height and your sprite
is placed 500 pix down it will be out of screen.

Use this instead to center the sprite at the screen:


Width this code you will also be able to move the sprite in
all directions.

"It's good to be bad..."
Dungeon Keeper

Login to post a reply

Server time is: 2024-03-29 02:20:19
Your offset time is: 2024-03-29 02:20:19