Making game, some questions.

Hi,

Some of you might’ve seen my entry in the animation section, about a racing track. I was planning to make a very easy racing game. Well, maybe it should be considered a “granny driving game” :wink:
But anyway, I looked for some tutorials. Finally found this one:
http://www.users.bigpond.net.au/blendage/pages/tutorials/tut6/maze.html

A bit old in some parts, but I got myself through.
However, in the end, my ball won’t roll right. If I move it forward & backward, it starts to roll sidewards too, and right = right, but sometimes left, and left = left, but sometimes right :S
Could anyone help me?
The file:
http://www.4shared.com/file/4896165/3c7d9dca/maze.html

Svenniemannie

Use http://www.savefile.com to upload. It’s better than nothing.

And, http://www.4shared.com/ appears to be up, at least for me.

Well, OR it was up again 5 minutes after I looked, OR you didn’t log in. (Main page worked, log-in not)
Anyway, I’ve edited the link into my first post.

Svenniemannie

No-one can help?

On the motion actuator (where you specify the force the ball should move with) there is a little “L” button next to the force options. That means “Apply locally”. Every object has a global orientation and a local orientation. Orientations are represented by the red green and blue arrows in the 3D view. You can select “Local” or “Global” from a list under the image to view each. See the image below:

http://img364.imageshack.us/img364/209/yeahmancontrols1pq4.jpg

Each axis corresponds with a column in the Motion Actuator:

http://img410.imageshack.us/img410/6908/yeahmancontrols2da3.jpg

So when you put a number in the X colum of force, you are saying “When the user presses this key, apply this force to the X-axis in the positive/negative direction.” Now, the local axes roll with the ball, so the local X-axis is pointing a different direction each time you press the arrow keys. Global axes do not rotate with the movement of the ball, so to sum it all up in a very short answer:

Unclick the “L”

BTW, the positive direction is the direction the colored arrow points, the negative direction is the opposite way.

Thank you, fixed my problems :slight_smile:

New one turned up though: I parented the camera to the sphere, so it would follow the sphere throughout the game.
If I press “p”, by top/side/front/whatever view, the game works ok, but
if i look through the camera (0-numpad) the screen turns grey. (Not total screen, only the blenderscreenpart where I pressed ‘p’.

Thanks in advance

Svenniemannie

some has aready posted on this but i cant remember how to fix it.

but see how close you have the camera to the ball and if it is really close move it back a bit.(there is also a complex answer to this statment if you want to know)

Nope, camera-ball distance wasn’t the problem :S

And another problem showed up:
After you’ve downloaded this file:
http://www.4shared.com/file/4931981/b7bbd658/_2__maze.html
You will be in the front view of a new edited blend.file.
(Maze edited, new walls, other settings actor)
If I press “p”, the ball bounces up first, and then hoovers above the maze, although the radius is at the right setting, and I can’t think of other settings that might cause this…

I think I’ll come up with more questions about the game engine, so it might be usefull to change the name of the thread to something like “Making game, got questions”.
But how can I change Thread names? (If possible)

Svenniemannie

to change name just double click on the box were the name is but not on the name itself.

ill check the blend

I had that problem with the ball acting funny, too. There’s something wrong with your ball. When it moves, it’s object center is not moving with it. You need to replace it with a new ball. Follow these steps to save time:

  • Add a new Icosphere, subdivision level 3. Scale it down. Personally, I thought your objects were too small (there are lower limits to object sizes that make things act goofy if they are too small under bullet physics). I scaled the new sphere to .1 instead of .02 (like your old one was). Make sure you scale in Object mode, not Edit mode (press [Tab] to exit edit mode, press [S] to scale, type .1, press [Enter]).
  • With the new ball selected, hold [Shift] and select the old ball. The old ball will be the active object because it was the last one you selected. Press [Ctrl+C] and choose “Logic Bricks” from the menu. This will copy the logic from the active object (the old ball) to the other selected object(s) (the new ball). You can press [Ctrl+C] again to copy the material if you’d like.
  • Scale up the maze a bit (I pressed [S] and typed 3, pressed [Enter]).
  • Make the new ball an Actor >> Dynamic >> Rigid Body and set the radius to .1
  • Move the ball up a bit so that it sits just above the floor of the maze. You’ll need to move your camera back and up some. I don’t know why your camera is acting strange when it comes to parenting. Did you scale the camera at all? You can’t do that and expect good results.

Thanks for the help. It works fine now.
You’re right, I did change the size of the camera. I had the screen divided in 2 parts: one to change things, other camera view. Because the camera was as big as the maze, I scaled it down, and the camera view didn’t change, so I thought it could no harm.

Thanks.

New list :slight_smile:

(Would like to fix it myself, but Wikibooks has (almost) nothing about the game engine yet.)

-I added some dots on the ball, to see how it’s rolling. Now it seems it’s sliding forward and backward, (-), but the dampening works ok (+)
Exactly turned around: Left and right is done rotating (+), but the dampening doesn’t work (-).

No idea how this comes, as the controlls are exactly the same, except for the axis.

One minor problem: The rotating left/right looks as if it is sliding, and because of this sliding it starts rotating. Like a bowling ball that you throw; it first slides, and then starts to rotate.

Svenniemannie

Edit: The newest file:
http://www.4shared.com/file/4962529/90c06f1a/_3__maze.html
(I just add the file every time in case you need it. If you don’t, don’t use it :wink: )

If you want the ball to roll, you need to enable “Rigid Body” in the Logic buttons. Turn on “No Sleeping” too so that the ball doesn’t stop responding to the keyboard. I don’t think you’ll get the result you want, though. The ball keeps the force you give it, so when it hits a wall, it bounces back and rolls the other way. You could try increasing the “Damp” and “RotDamp” numbers (especially the “Damp” one…try setting it all the way to 1.0).

Well, some things helped:

+The ball already rolled to the left and the right, but not up and down. By pressing Rigid body, that has been fixed now. (But why would it roll left & right before?)

-The ball still slides like a bowling ball: First sliding, then rotating.

+I’ve set dampening & Rotdampening both to 1.000, and the ball slows down more than before.

  • If the ball bounces to a wall, it is being bounced back, but because of the ball still rotating (bowling effect again: ball bounces to wall, keeps turning), it bounces to the wall again.

-And a strange dampening problem
(tried with all possible damping settings: 0-0,1-0,0-1 <-- Dampening,Rotdampening): If I press the up button shortly, I would expect it to stop rolling, because of the dampening (or keep rolling, because of no dampening) However, it doesn’t really do either of them: As soon as the ball stops because of dampening, it moves in the opposite direction, or a 90 degrees turned direction. And if it should keep rolling, because of no dampening, it changes direction as soon as it hits a wall. (If it hits the wall in an angle of 90 degrees, it should be bounced back exactly the same way, but it never does, it turns to the left or right)

Well, many problems, (hopefully) many solutions.
Thanks