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 / A little moving trouble

Author
Message
Crazy Ninja
19
Years of Service
User Offline
Joined: 27th Aug 2005
Location: Awesometon
Posted: 16th May 2006 12:43 Edited at: 16th May 2006 12:44
Hey guys. I'm working on a new game(that i'll hopefully finish) thats kind of like a frogger clone. I'm using an array to make the cars and position them but i'm having trouble getting them to move. Here's what i got:

If someone could help me that would be great. I'll try to look for the problem myself too. Thanks.

The nintendo Wii. Okay...
Ant
19
Years of Service
User Offline
Joined: 27th Nov 2004
Location:
Posted: 16th May 2006 19:53
try this !

smallg
Valued Member
18
Years of Service
User Offline
Joined: 8th Dec 2005
Location: steam
Posted: 16th May 2006 20:42 Edited at: 16th May 2006 20:43
change this


to



life's one big game
spec= 2ghz, 1gb ram, 512mb gpu, directx 9.0c, dbpro and classic
zenassem
21
Years of Service
User Offline
Joined: 10th Mar 2003
Location: Long Island, NY
Posted: 16th May 2006 21:09 Edited at: 17th May 2006 16:24
and i would change this


to



Makes it easier if you ever need to read in the data again. Or, to add new data you just have to restore to a new data line.

of course you can combine the loops and data together to read X and Z; and the above initialization of car(c).

than just



lastly, It could be made into a function.

Note: I have had times where the above gives a compiler error. Can't remember if it was DBC only. I don't know fully why this happend. In those circumstances I found that I had to assign the read to a variable first.

eg.
read v
anum=v
carx(c)=anum

~zen
Ant
19
Years of Service
User Offline
Joined: 27th Nov 2004
Location:
Posted: 16th May 2006 21:53
Or this is a slightly better version of my previous attempt !

Crazy Ninja
19
Years of Service
User Offline
Joined: 27th Aug 2005
Location: Awesometon
Posted: 17th May 2006 12:49
Hey thanks guys. I'll play around with this and hopefully get it all fixed soon.

The nintendo Wii. Okay...

Login to post a reply

Server time is: 2024-11-26 20:01:57
Your offset time is: 2024-11-26 20:01:57