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.

2D All the way! / jumping and gravity help

Author
Message
The_Devil
16
Years of Service
User Offline
Joined: 25th Dec 2007
Location: Australia
Posted: 25th Dec 2007 08:24
ok i hope i don\'t get flamed for this but i have been trying for about 5 days now and so far i\'ve been able to work things out myself jumping,gravity etc. now ummm this is sort of hard to explain ill try though now i can either jump then gravity pulls me back down onto the ground platforms \"which is normal of course\" but when i walk off the top platform i stay on the same y axis as the platform and don\'t fall to the next etc. Now i also solved that to but LOL now if i land on the platforms i can\'t jump.

here i will give you\'s all a look at me code



its probley something realy simple and i just can\'t see it ROLF
Zergei
19
Years of Service
User Offline
Joined: 9th Feb 2005
Location: Everywhere
Posted: 25th Dec 2007 17:51
Ok, i've seen you've posted twice, and that your join date is the 25th (odly the posts date is the 24th) .
First thing is that, as your new , your post have yet to be approved, thats why they may take a while to appear. Second, there is a minimum time between post one must make regarding asking the same question. I mean, this ain't a chat, peaple aren't standing on guard awaiting for some new threads to answer.
And third and most important, its Christmas. I find it hard to see someone going through your code when there's 1:30 hs left , and that in other time zones it might already be past 0:00 .

Ok, aside that, lets take a look at that code...

Found the following...




I moved ...

upward, to make the check of no collision before and also added to each if the condition jump<>1.
The first because, as soon as it moveed it might enter the no collision if , and added that jump<>1 because its only under that condition it must work, not on all the other states of jump.

Now, i\'m not sure what type of game your trying to do here, but i\'d take a look at a tiles system before going any further as it might come usefull not only for scenary building but also for collition.

I\'m working on a 2d sidescroller, which works based on tiles, and because of that i am in no need of using the sprite collision command, as i used tiled proximity collision wich only works with numbers, making it really fast.

Hope it helps, and , if in doubt, ask...

Further on my stuff at...
TurboSquid.com
The3dStudio.com
The_Devil
16
Years of Service
User Offline
Joined: 25th Dec 2007
Location: Australia
Posted: 26th Dec 2007 16:55
Yeah i just realized that there was a post aprovel system lol sorry about that for a second there i thought my posts where getting deleted or something ROLF.

Anyway back to the program ahhh now i see thanks very much for your help. i was going to make it with tiles but thats just to hard for me atm since im still a big old noob lol plus im just doing and testing different things in dark basic.

Login to post a reply

Server time is: 2024-05-17 10:28:06
Your offset time is: 2024-05-17 10:28:06