Ball Coaster Demo with worikng bicycle sprockets and chain

Ball Coaster Demo is a simulation, not a game.

I actually just wanted to do a working bicycle chain and wound up with this instead.


Posted “Blender Game Engine: ballcoaster” at http://youtu.be/FIGQs5lPdc4

Features:

  1. Working bucket lift with moving chain and sprockets. see chain.py
  2. Working Archimedes’ screw lift
  3. Working ball re directer that sends balls off in random directions.
  4. Numerous ramps the lead down to other things.
  5. Working unbalanced dump buckets that lower balls down.
  6. Funneling Ball drop.
  7. Spiraling Ball drop.
  8. A ball jump that did not work out because of the lack of momentum.
  9. 8 starting balls that are brass or gold color.
  10. A fire trap that destroys the balls.
  11. A paddle wheel that helps to load the buckets or destroy the balls or swat them up some times.
  12. A ball release that releases copper balls.

Development:

The chain appears to rotate continuously, but the chain and socket only rotates two link, resets, and then repeats the rotation. The chain is implemented as six pieces and animated via a python script. This is probably more effective than doing all the links individually. An animation loop might work better.

I did copy an older blender game ball demo, but wound up redoing everything anyway because …

A. it just didn’t work on 2.49b; game blender was totally was revamped.
B. I wanted my buckets lifted by the chain.
C. I wanted lots of track, so I curve extruded it. I wish I could of have curve extruded the supports to.
D. His buckets had a blunt edge, and did not pick up the balls, so I made mine have a sharper edge.
E. I grabbed textures where ever I could find them but often massaged them using gimp.
F. I do have some seams, but cast metals do sometimes. I could not decide if that was a feature or a problem.

Files for 2.49b, 2.64a and 2.70a work in Blender, post valid until October 18, 2014.

2.49b http://www.pasteall.org/blend/29264
2.64a http://www.pasteall.org/blend/29265
2.70a http://www.pasteall.org/blend/29266

Problems (minor):

  1. You need a good computer to run it. My AMD Athlon 64 X2 6400 with a GeoForce GT 240 runs it but a Gateway computer without a video card drags.

  2. Blender 2.64a was unable to generate an executable with textures applied???

  3. Blender 2.70a bucket dump got stuck down forcing me to add in a 104.0 degree hinge constraint???

  4. I have read that you should have a start screen, sorry. Read notes below for key board assignments.

  5. When I upgraded from 2.49b, to 2.64a and 2.70a , the Mouse sensitivity keep increasing making the view jump wildly. I probably need a better way to do it. In mouseMove.py the mouse sensitivity parameter “adjust” is either 0.1 or 0.01 for coaster_2_49b.blend or coaster_2_64a.blend files respectively. I suppose you might have to modify this value for different processors and/or hardware? The view spins madly around if adjust is set to large. I am not sure why 2.64a is so different from 2.49b, more efficient perhaps?

  6. Manually releasing to many balls can get them stuck in a funnel or impart enough energy to them so that they bounce off the bucket drop. Timed release seems to work just fine. The stuck ball script will impart energy into a stuck balls so that they become unstuck. Its funny to see two stuck balls do a hop. Dropped balls will be recycled. Dropped balls are rare, but do happen when balls are overly energetic or if mid air collisions occur.

  7. Mousemove allows you to look straight up and/or straight down with tilt staying tilt and pan staying pan. A camera up reorientation script executes every time the mouse is moved. The script should probably be polled independently from the mouse movement. Wiggle the mouse while looking at the tables horizon to re-orientate the camera with respect to the table more quickly if the reorientation seems sluggish to you. note: Drift seems to be a big concern in many posts with mouse pointing scripts, but this should not happen because the script is not supposed to execute when the mouse is stationary??? Blender 2.49b either used different numerical types and handled numerical conversions differently from from later Blender versions which required me to add some int() conversions to the mouse centering code due to a conversion error introduced when centering the mouse.

Notes:

Tab key: switches between the ball camera and 4 movable camera positions.

WASD keys: move the camera forward or back and right or left. Arrow keys also same.

Shift keys: switch forward or back to up or down.

N key: Releases new balls if < 15 balls in play.

F key: Override fire door.