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! / Dumb question about sprites

Author
Message
Mountain Dew Freak
20
Years of Service
User Offline
Joined: 14th Nov 2003
Location:
Posted: 22nd Nov 2003 01:36
This may seem like a dumb question, but how do you go about moving sprites that are consisted of image textures on 3d plains? I'm using darkbasic classic and am just looking to move the sprite on the x and y axis. Just a simple instruction for reading input from the arrow keys and moving the sprite correspondingly is all i'm looking for, thanks. Also what is the best way to animate sprites if you are using 3d plains to represent the sprite?

"It's like a koala bear crapped a rainbow in my brain!" - Capt. Murphy, Sealab 2021
Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 22nd Nov 2003 03:54
To move objects you can use the.....

position object

command.

I think these are the scancodes for the arrow Keys. Not sure though I just grabbed them out of one of my programs.

if keystate(203)=1
if keystate(205)=1
if keystate(208)=1
if keystate(200)=1


So they are checking for the keypresses, now all you have to do is increment/decrement X/Y.

Pincho.
highschool gamedude
20
Years of Service
User Offline
Joined: 23rd Sep 2003
Location:
Posted: 3rd Dec 2003 05:17
you can also just do:

if leftkey()
if rightkey()
if upkey()
if downkey()

i believe that is pretty self explanitory...

if a tree fell in the forest and it hit a mime... would he make a noise?
MrSparkle
20
Years of Service
User Offline
Joined: 18th Oct 2003
Location:
Posted: 6th Dec 2003 05:45
the keycodes are right, btw...it so happens i had 2 find out those codes tonight lol

Old school is awesome - music, games, etc...

Login to post a reply

Server time is: 2024-05-09 02:38:57
Your offset time is: 2024-05-09 02:38:57