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.

Dark Physics & Dark A.I. & Dark Dynamix / Creating a Simple Ball Rolling Game

Author
Message
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 13th Jun 2007 03:44
Hello. I know this kind of post may be shunned upon here, but I've got a few questions about making a simple ball rolling game.

1. How do I get the ball to actually roll forwards, not simply on the Z axis, but forwards?

2. How can I make the ball start back at the beginning of the level after it falls off the level?

3. Would jumping be done by adding a Y force, or is there an easier way?

If you could help me answer these questions it would be great.

Thanks,
-Sixty Squares

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 24th Jun 2007 21:48
*Bump*

Does anyone have any input?

David iz cool
19
Years of Service
User Offline
Joined: 21st Sep 2005
Location: somewhere lol :P
Posted: 24th Jun 2007 23:14
phy add rigid body force #,x,y,z,(i use 2 here)

this is the only way ive found to be able to control a ball,u have to give a negative # for x to move left,positive # for x to move right,positive # for z to move forward,negative # to move backwards.

to jump just give a y force
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 25th Jun 2007 04:37


Hello
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jun 2007 04:42
Thaks to the both of you for responding Questions 1 and 3 seem to be solved for the moment... I'll try out your ideas when I get the chance. For restarting a level, am I supposed to make a NEW ball, or reposition the old one at the start somehow?

Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 25th Jun 2007 05:16
for question 2:


Hello
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 25th Jun 2007 05:21
Wow. Now I feel really dumb lol. Thanks for that

Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 26th Jun 2007 20:51
My approach would be to delete the physics on the ball then restate the properties else the ball will still retain the velocity etc

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Xarshi
18
Years of Service
User Offline
Joined: 25th Dec 2005
Location: Ohio
Posted: 26th Jun 2007 23:54
Haha,no problem man. Doesn't mean your dumb btw

Hello
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jun 2007 00:06
Quote: "Doesn't mean your dumb btw"

Ok I didn't know it was so simple though.

@Codger: That's what I was thinking, but I was wondering if there was an easier way.

Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jun 2007 00:29
Okay I just wrote this code and all that works is the gravity and ball rotation... Could someone post an example or tell me what is wrong with this code?



Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 27th Jun 2007 02:20
Try This



I needed to use variables to make it a little more readable but basically I just changed the code to apply force rather than rotation in response to the left or right arrow. I also increased the force amount it takes a lot of force to move (or stop) a 10 meter or 40 foot diameter ball.

Hope this helps

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 27th Jun 2007 02:33
It didn't work for me The ball starts to go crazy--- probably because the ball rotates and the local "Z" direction changes because of this. I tried adding normal force instead of local force and it helped some...



Codger
22
Years of Service
User Offline
Joined: 23rd Nov 2002
Location:
Posted: 27th Jun 2007 03:09
I Modified the camera to follow parameters and it looks a lot smoother



I also adapted your texture method modified it and applied it to the ball it looks neat kinda like a 70's Disco ball ( that ages me)

Codger

System
PIV 2.8 MZ 512 Mem
FX 5600 256 mem
Bozzy
18
Years of Service
User Offline
Joined: 10th Sep 2006
Location: Birmingham, UK
Posted: 27th Jun 2007 20:57
lol this has been useful
Sixty Squares
18
Years of Service
User Offline
Joined: 7th Jun 2006
Location: Somewhere in the world
Posted: 28th Jun 2007 01:06 Edited at: 28th Jun 2007 01:07
@Codger: Yes that is great but with all due respect it's not what I'm looking for help with. I'm trying to figure out why the ball movement isn't working.

@Bozzy: Yes it has...

Login to post a reply

Server time is: 2024-11-24 18:40:23
Your offset time is: 2024-11-24 18:40:23