Physiczz

Hi Blenderartists!

I’m ‘Jake’, a 12 yo boy from Finland. I’m learning python so I made this game.

The game is a sandbox game based on physics. You have four objects to spawn. It’s pretty simple.

Objects:

  • Basic cube, Dynamic.
  • Some kind of a toy, ball, goes right and spins. You can use it eg. to break a wall of cubes, dynamic.
  • Ball, dynamic.
  • Torus, spins, can be used for “launching” other objects, static object.
  • Cursor objext, spawn/despawn with C. Can be used to move objects around. Follows cursor.

Controls:

R to restart scene
C to Spawn/despawn cursor object
Right click on objects in the UI to select them
left click to spawn the selected object.

PS. Please use the standalone fullscreen mode, because if you move your cursor out of the game and put it back, the objects will reset to the cursors position. Help would be appriciated to fix this.

Screenshots!:






Download:
https://drive.google.com/uc?export=download&id=0B5ix-9R1D0kcRUF3Q2swcGxZWDQ

Hi, did you want to share the demo? Maybe you forgot to.

You can use this code:

mouse_position = bge.logic.mouse.position  
width = bge.render.getWindowWidth() 
height = bge.render.getWindowHeight()   
x_position = width * mouse_position [0]
y_position = height * mouse_position [1]                 
bge.render.setMousePosition(int(x_position),int(y_position)) 

to make sure the mouse never leaves the main game window in stand alone player. I don’t know if that’s what you were having trouble with but it’s a useful function for keeping the mouse inside the play area.

Thanks for the code and notifying me about forgetting the demo :slight_smile: