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.

DarkBASIC Discussion / I need help to a 2d car game!!!!

Author
Message
The Nerd
20
Years of Service
User Offline
Joined: 5th Jun 2004
Location: Denmark
Posted: 11th Jun 2004 18:02
hi!
i need help whit a 2d car game...
these codes is ritten in my game so far:
load bitmap "Car.bmp",1

And i cant see it on the sreen... (it is the car you going to control....)
but i know why..
i have to posotion the bitmap.. But how do i do THAT!!!
please help!
GameKit
22
Years of Service
User Offline
Joined: 6th Mar 2003
Location: USA, Staring Blankly at a Computer
Posted: 15th Jun 2004 01:43
You will probley want to make the car image into a sprite, or just use the "Paste Image" Command...

The code would read something like...

Sync On
Load Image "Car.bmp",1
X=320
Y=240
...
Do
...
If Leftkey()=1 then X=X-1
If Rightkey()=1 then X=X+1
If Upkey()=1 then Y=Y-1
If Downkey()=1 then Y=Y+1
Sprite 1,X,Y,1
...
Sync
Loop

I don't use sprite commands that often, but I hope the code works for you anyways...

...well...I hope I helped...

Programming isn’t an addiction, its more of a mental and social dependancy.

Login to post a reply

Server time is: 2025-05-26 04:55:28
Your offset time is: 2025-05-26 04:55:28