WIP: Tilting ball maze game in 3D – Contest Entry

I’m working on a tilting ball maze game like “Labyrinth Plus”:



http://www.youtube.com/watch?v=KvZdRXfCeAM



It is simple enough for me to actually get it done but can be easily extended by additional features. It will use physics to tilt a plane and move a ball through a labyrinth. I'll put a special focus on the settings and usability because I myself am often annoyed by commercial games for example not implementing a desktop or fullscreen window mode and crashing while alt-tabbing to i.e. the web browser and back.

My top priority is:
- Finishing it
- Correct working physics
- Low hardware requirements (GL1) to make it run on most devices
- Multiple application types (Applet, Webstart, Desktop, ...)
- A nifty GUI to switch settings like resolution and display type (Fullscreen, Window, Desktop)

If there is time, I might proceed to Android Hell and implement some additional features like:
- Sound effects and a sound track
- A chrome like reflecting ball (have to learn shader stuff)
- Obstacles, holes, terrain instead of plane
- A nice looking environment
- Multiple levels / custom levels
- Android platform with gyroscope tilting (I hope there is a good android simulator with OpenGL, Java and accelerometer input support because I don't have such a device in hardware. Or perhaps santa can Kindle my Fire :D).

I'll post a first demo after I have solved some jbullet physics problems. Actually, they are solved but not yet implemented in a clean way. Skyrim and Anno 2070 take their toll, you know? :D
3 Likes

Good luck! If you need any help with the rules, just ask!

If you are genuinely playing Skyrim and developing this at the same time then my hat’s off to your sir. I simply refuse to go anywhere near that game until long after the end of the comp :wink:



Do you plan on putting any twists on the “tilting ball maze game” game play ?

@thetoucher said:
Do you plan on putting any twists on the "tilting ball maze game" game play ?

I'm not quite sure what you mean by "twists" (no native speaker) but in the simplest, first stage it will just display a timer in the HUD measuring the time you need to find the exit. If you find it, there comes a congrats screen showing the time and probably a (local) high score list. In a second stage (if enough time), there can be holes which make you loose a life or earn you a penalty time. There might also be power-ups that reduce your time, obstacles, portals, ..., but first I KISS to get at least something finished.

@thetoucher, I couldn’t resist not playing it. It’s more than worth it :slight_smile:

@memonick said:
I couldn't resist not playing it. It's more than worth it :)

Not playing it? ^^

lol remove not :stuck_out_tongue: Got confused in words :slight_smile: I was playing it right now ^^

There ain’t not no way that I could resist to write this line either… neva eva. :smiley:



Here is a first version:

http://www.nabyrinth.com/NabyBallMaze/

Looking very nice :slight_smile:

A little update. I had a hard time with Nifty, but now a first version of the game menu is finished. It looks like this:







It contains a “Display Settings” dialog which makes it possible to switch the display settings in game (Applet version, too!). Here it is:







Currently, the Applet version lacks the ability to switch to “Display Type: Desktop” due to the fact that an Applet is not allowed to call

[java]System.setProperty(“org.lwjgl.opengl.Window.undecorated”, “false”);[/java]

I’ll ask the LWJGL guys if they can make that switch available via a method call.



I also had to implement the resolution switching myself in the Applet version by using the static methods of “org.lwjgl.opengl.Display” since “com.jme3.system.lwjgl.LwjglCanvas.restart()” is mostly a stub. Finishing that would be really cool.



You can test it yourself here:

http://www.nabyrinth.com/NabyBallMaze/



The next step will be the implementation of real game logic like displaying a timer (how long one is trying to find a way out), recognizing if one has found a way out, congratz screen, highscore, …



After that, I might dig some holes into the floor and recognize if the ball falls through them (respawn costs time).

1 Like

Looking very good!

Sweet idea. I like it.



yeah, nifty is a hard one but when you challenge it, it can fullfill your dreams.^^


@thetoucher said:
If you are genuinely playing Skyrim and developing this at the same time then my hat's off to your sir. I simply refuse to go anywhere near that game until long after the end of the comp ;)


Hehehe same to me. Skyrim would kill my deadline without turning a hair.

It worked really well on my (fairly old) laptop! Runs 1080p at 110fps. One thing I noticed was that the physics wasn’t exactly realistic, like the ball didn’t bounce and stuff. Other than that it was very stable, no weird crashes or glitches, the menu options were all seamless and everything worked as it was supposed to.

very nice, it works flawlessly

@all: Thanks!



@Momoko_Fan: Finding realistic looking physics parameters is a science in itself. I use rather uncommon parameters to prevent that the ball is catapulted elsewhere by the high tangent velocity of the “outer rim sectors”.

[java]

speed = 10f;

ball_phy.setDamping(0.99f, 0.99f);

[/java]

The high damping eats up all “bounciness” and also the velocity. To compensate, I increased the speed itself. This gives smooth and stable physics at the cost of missing bounciness. Other parameter sets (i.e. more restitution) always broke the game play by making it possible to overcome walls. I guess I have to play with the parameters a bit more.

@survivor said:
Finding realistic looking physics parameters is a science in itself.

Not really, the physics should look real if you have a scale of 1 unit = 1 meter and realistic masses for the objects, I'd investigate in other things than the physics base settings making it look not real first, e.g. accuracy.

Yes, in reality, the tangential velocity wouldn’t be that high but I made the plane rotate really fast and up to 45° to underline the 3D effect. I might have overdone it. :smiley:

Small update:

  • Level completion is now recognized and congrats screen is shown



    I also played a bit with the physics to get some bounciness without breaking the game. These are the measures I took:
  • doubled the wall height
  • maxTilt = approx. 10°
  • input inertia to prevent jerking the ball over a wall



    This special version can be tested in an applet here (high input inertia). To save you time I made some videos.



    High speed and damping gives a fast game play at the cost of bounciness.

    http://www.youtube.com/watch?v=3E_AJgWiZYc


Raising the walls doesn't help much because the input is really jerky.
http://www.youtube.com/watch?v=X4MM8Y7sH6E


Adding some inertia to the input helps, but is wasn't enough.
http://www.youtube.com/watch?v=OmiY6_CZjrU


Really high input inertia should prevent wall climbing but the control feels quite laggy and slow.
http://www.youtube.com/watch?v=ECY25za1dpI



Fast pace game play or more realistic one with some bounciness? It might also be possible to put an invisible plane over the labyrinth to prevent cheating. What do you think?

Cool, works great!

looking fantatsic, good job man!



invisible plane will be really easy and a quick win.



Why not go with both fast and realistic: you could add a power-up to switch between to two ?