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 / Can someone help my collision problem, please??

Author
Message
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 30th Dec 2002 09:24
Im trying to make a game similar to Bubble Bobble, my problem is that when I try to introduced another player or enemy that collides with the platforms into my code the main character cannot jump anymore. I was originally trying to use read/data code to make the maps, but the xcollision didnt work in DBPro. Please help, tell me if there are any major problems with what Im doing.


Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 30th Dec 2002 22:49
Your code was quite hard to understand. Your problem was probably due to your layout, try and make the code a bit neater, thats your major problem. Put remarks in aswell.

I have normal db but I just had to make a few adjustments to your program to make it work so Im hoping that you will have to only make a few adjustments to mine to make it work, I wrote your program again except neater and using static collision.



Yum! Yum! Yum! Yum!
Hamish McHaggis
21
Years of Service
User Offline
Joined: 13th Dec 2002
Location: Modgnik Detinu
Posted: 30th Dec 2002 23:02
Ill also pick out a few bits which I dont know what they do:

if upkey() and grav#=0 and get object collision y()950 then posx#=950

Is this meant to control jumping? You should do this-

if upkey=() and playergrav#=0 then playergrav#=jump_power#

What does this do? You havent even created that object(1000), or have you?

a#=wrapvalue(a#+2.0)
position object 1000,500+sin(a#)*20.0,250+cos(a#)*30.0,785.0

is this meant to reposition the enemy when it gets beneath the screen?

if eosy#629 then eosy#=629

Also dont set the screen resolution too high, my computer was really slow displaying it. I dont mean to be too critical but I dont get alot of the program.

Yum! Yum! Yum! Yum!
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 31st Dec 2002 01:18
Thanks for your honesty, I guess you wrote this in DB1, cos it doesnt really do what my original code did, I'll have a decent look at it 2moro after I sober up. Thanks again
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 31st Dec 2002 05:35
Hehe, I didnt read that space jumped, not upkey like it used to be. My bad, sorry
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 2nd Jan 2003 00:06
Ive added some moving enemies, unfortunately they appear to have random movement but they arent meant to, all I wanted them to do was to go as far right as they could, then go as far left as they could, with gravity of falling off the platforms. But they tend to migrate to the left side after awhile and the more I have on screen the faster they do that. Also I have made enemy into a seperate gosub, maybe doing them all at once may have been better. I remed out the 2 last enemies to make things look a little better

heres my code, maybe its quite long for a simple rework/fix


Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 2nd Jan 2003 00:10
Also I noticed that in the orginal version the player and enemies jumped thru the platforms and landed on top of them, even though it is impossible in reallife. How would I go about this, the player would hit his head on the bottom of the platform in the codes present state??
Cpt Caveman
22
Years of Service
User Offline
Joined: 29th Aug 2002
Location: New Zealand
Posted: 2nd Jan 2003 20:36
Apparently this code has no problems at all on my friends computer, but mine has the same problem of stuck enemies in both DB1 and DBPro. Can people it test out to see if it works on theirs.
soap_shoes
21
Years of Service
User Offline
Joined: 22nd Dec 2002
Location: United States
Posted: 3rd Jan 2003 19:40
sure....once i have a pc w/ db on itlol!

noobie game designer

Login to post a reply

Server time is: 2024-11-23 21:08:09
Your offset time is: 2024-11-23 21:08:09