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 / Ball physics

Author
Message
Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 27th Dec 2006 22:44 Edited at: 27th Dec 2006 22:46
I am making a game in which you take control of a ball and you have to guide it through a trap filled maze(kind of stupid sounding, but that's just the overall concept) I had a working camera, but it came to my attention that it was too basic for this game. I suck at camera coding and I know, this sounds like a 'gimme da codes' post as you all term it, but I don't know any physics, I have no skill in to code out a good camera that is smooth and allows for jumping the ball. I would greatly appreciate some help on this.

If at all possible, some physics for rolling the ball, slowing it to a halt, speeding it up to a certain speed, ball jumping(and it needs to be able to jump on a matrix) and a smooth camera would be extremely helpful.

Yes, I am a n00b when it comes to physics and I can never get a halfway decent camera working. If someone helps me out with this I swear to not make n00bish posts like this again.




EDIT: I have DBCe

Ant
19
Years of Service
User Offline
Joined: 27th Nov 2004
Location:
Posted: 27th Dec 2006 23:53
Hi Soroki

This is DBP code and very basic, and I'm not a very experienced programer at all, but it might give you some ideas!

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Dec 2006 14:30 Edited at: 28th Dec 2006 15:07
Okay this is going to be my input---

Here's some fully commented code on how to do what you just said. It has some simple rolling effects too. Picture positive speed as forwards, and negative speed as backwards. It should work in DBC. Also, I didn't add making the ball's speed unchangable in mid-air, but it can easily be added. Just make it so that all of that speed changing stuff only happens whan the ball is on the ground, or when Ball_On_Ground is equal to 1.





Here it is again, but with bouncing! Hooray! The ball will boucne vertically on the Y axis now.




If you need help with anything in this code, feel free to ask.

TEH_CODERER
20
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 28th Dec 2006 15:58 Edited at: 28th Dec 2006 15:58
I've just finished a game like this. I used Sparky's dll. It can tell you the normals of the polygon the ball is on which you can then use to change the balls velocity on the X,Y and Z axis. Alternatively, look into Newton or Dark Physics.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 30th Dec 2006 03:27
If you forgot about this thread then I'll be annoyed

Soroki
18
Years of Service
User Offline
Joined: 26th Jan 2006
Location: United States
Posted: 31st Dec 2006 04:04
Sorry for taking so long to post back, my Internet access is pretty limited. Thanks all for the great help. I am surprised no one called me a n00b(although I think I admitted it enough times already)

@Sixty Squares

Don't be annoyed...and thanks a whole bunch for the help!!!!

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 31st Dec 2006 19:52
Oh okay then, I just don't like it when I put lots of work into something for somebody and then they ignore it... lol. I'm glad that it helped you

Login to post a reply

Server time is: 2024-09-25 15:21:12
Your offset time is: 2024-09-25 15:21:12