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 / i need help with my game

Author
Message
poorrican
14
Years of Service
User Offline
Joined: 1st Mar 2010
Location:
Posted: 29th Apr 2010 03:42
ive been creating a game and i got the characters to move but u can only move one or the other. im not sure how to get both moving and i dont know where to start with collisions. can anyone help me understand how collisions work? and if u haven't guessed it im new.
DVader
20
Years of Service
User Offline
Joined: 28th Jan 2004
Location:
Posted: 29th Apr 2010 03:58 Edited at: 29th Apr 2010 04:06
It should be easy to move 2 things at once, just move both objects at the same time.

x=100
y=100
do
if upkey()=1
dec y
endif
sprite 1,x,y,image
sprite 2,x+10,y,image2
sync
loop

Just a basic example. You would need to load images in beforehand. The +10 on sprite 2 is an offset, obviously you can change that on both axis. I may be missing your point but example code or more info on what you are after would be needed.

http://s6.bitefight.org/c.php?uid=103081
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 29th Apr 2010 12:39
@poorrican, post some code and you'll probably get the help you need quicker. Posting the code you are having trouble with always helps!



poorrican
14
Years of Service
User Offline
Joined: 1st Mar 2010
Location:
Posted: 30th Apr 2010 21:02
ok the main part im haveing trouble is with the collision i m not sure how to input the colision and im goin to try the code you put up what i hav
`foward dash


poorrican
14
Years of Service
User Offline
Joined: 1st Mar 2010
Location:
Posted: 30th Apr 2010 23:48
this is what i have for collisions
TDK
Retired Moderator
22
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 4th May 2010 05:39
Quote: "until inkey$()="d" = 0"


Lol! You're just making it up as you go along aren't you?

If you want to take it seriously, read the tutorials (starting with 1 to 4) here:

http://forum.thegamecreators.com/?m=forum_view&t=99497&b=10

TDK

Login to post a reply

Server time is: 2024-11-27 09:25:35
Your offset time is: 2024-11-27 09:25:35