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 / The Bain of my Existence: Gravity

Author
Message
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 31st Aug 2005 03:35
Ok, I sem to be having problems with this, and many of you who half half a brain for programmin, will be able to figure this out lickity split. But I\'m new, again, so I need help... heres my whole entire code... I can\'t figure out how to get collision to work on the left wall, i can get it to work, but you can also jump if your touching the left wall, which allows you to use it as an elevator by holding the space button while touching it.
Chris K made an attempt to teach me this last year, but as you can see, it went through on ear and out the other for me...



A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 31st Aug 2005 07:15
Shadowed Lightning,

Please comment your code with REM statements.


+NanoBrain+
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 1st Sep 2005 01:12 Edited at: 1st Sep 2005 01:14
I usually don't, I prefer it that way... I'm to lazy to remark...
Ill repost it though... here:

This is the part I seem to be having trouble with:
(the bottom one works, it is the _ground_wall_collision subroutine,
but the top one, the _left_wall_collision subroutine doesnt work, I dont know why, the problem it has is that it allows me to jump when im colliding with the left wall, which makes it possible to use the left wall as an elevator, in other words, i can move into the left wall, and hold space and y character keeps going up. i dont know why)


EDIT: I've come to the conclusion that this code sucks, my whole program needs to be rewritten, so that i understand it, if anyone has a better suggestion on how to do the collision, or can tell me how to fix this, please let me know...

(im a noob to this stuff, as you can tell)

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/
NanoBrain
19
Years of Service
User Offline
Joined: 20th Jan 2005
Location: Portland, OR
Posted: 1st Sep 2005 09:40
Shadowed Lightning,

Check the line below. Does the double equals sign have anything to do with it? If not, may you upload your media, that I may test run your code to figure out the bug. It is quite difficult without seeing the effects.




+NanoBrain+
Sven B
19
Years of Service
User Offline
Joined: 5th Jan 2005
Location: Belgium
Posted: 1st Sep 2005 17:30
I'm sorry NanoBrain, but this is DBP code. (However the == doesn't work in DBP with me neither).

To solve your problems:

Since you are working in a box area, I think that math boundries would be enough.

If posx# < 5 then posx# = 5
if posx# > 25 then posx# = 25

Ofcourse, implemented in your code.

It's the most simple collision that has ever existed. So - ofcourse - you can use it.

Immunity and Annihalation makes Immunihalation...
Shadowed Lightning
20
Years of Service
User Offline
Joined: 10th Nov 2004
Location:
Posted: 1st Sep 2005 23:44
@nanobrain
no that has nothing to do with it, ive tested that, and it makes no difference, but thankyou... and there is no media, the cubes and spheres are it, im not one for media, since i have dialup and am not fond of having to DL or UL

@Sven B
I know i could do that, but i want more flexibility, because i plan on using it in my other games (that are based with cubes and spheres as well )

A C.P.U is not smart at all, all it is, is a colleciton of millions of switches (albeit an extremely fast, exceptionally sophisticated collection of switches)/

Login to post a reply

Server time is: 2024-11-27 18:46:52
Your offset time is: 2024-11-27 18:46:52