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 / Some simple movment not working?

Author
Message
JesterDev
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location:
Posted: 8th Jul 2003 08:04 Edited at: 8th Jul 2003 08:16
This is an edited post. I figured out the movement part. Just couldnt change the topic.

I'm trying to learn collision with this code. I'm not sure if im doing this right. Trying to get it to stop at each edge of the screen.



JesterDev
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location:
Posted: 8th Jul 2003 08:08 Edited at: 8th Jul 2003 08:18
Is there a way to store the value of x,y in a variable then use the if statments to tell if x/y are greater then the resolution? I'm sure there is..

Xeridox
21
Years of Service
User Offline
Joined: 19th May 2003
Playing: Scrap Mechanic
Posted: 8th Jul 2003 09:34
Yep, do it like this!

if x>screen width() then whatever
if y>screen height() then whatever

IRC Channel: #darkbasic on server irc.uk-net.org Ports 6667 or 6668. Helpers and game serves welcome or just come and chat!
JesterDev
21
Years of Service
User Offline
Joined: 22nd Jun 2003
Location:
Posted: 8th Jul 2003 22:17
Thank you!

Xeridox
21
Years of Service
User Offline
Joined: 19th May 2003
Playing: Scrap Mechanic
Posted: 9th Jul 2003 01:24
No Prob!

Anyone that needs help, I'm available and we need more people at the DarkBASIC IRC channel, check out my sig below for details. Please help the DarkBASIC channel going!

IRC Channel: #darkbasic on server irc.uk-net.org Ports 6667 or 6668. Helpers and game serves welcome or just come and chat!

Login to post a reply

Server time is: 2024-11-24 20:47:48
Your offset time is: 2024-11-24 20:47:48