hi,
I am still thinking about a marble machine with tracks for marbles.
With a marble rolling down in 3D construct.
There is a system made of wood that I would like to program in processing:
http://www.cuboro.ch/de/Info/Produkte
(there seems to be an elevator system for the marbles they are proud of)
There are wooden blocks with tracks upon it, but also blocks with tunnels in it, even
blocks with 90° curves in or upon it.
When I program it, I want to run a marble through it, not as a proper physics engine but as data structure
that knows, where is the cube and where is/are its entry point(s) and exit point(s), so the marble can pretend to follow the right path and fall where it should etc.
I am not sure how to make a class for it.
I could have an ArrayList of all cubes and its pos, its type and its rotation.
There are I think 9 basic types like
- straight tunnel with straight track upon it (both same direction)
- straight tunnel with straight track upon it (90° to each other)
- straight tunnel with curve to the left upon it,
- straight tunnel with curve to the right upon it,
- crossing of two tracks upon it (+) and tunnel leading in on the side, coming out of the button ( \ )
- etc.
How can I make my class so, that the rolling marble comes into the block, knows its new direction and in which cubes it goes next and from which of its sides? This must be some kind of a rule set.
How can I make connections between two tracks / cubes?
Later the marble machine could be shown visually 3D with the rolling marble, camera follwoing it, marble making noises when rolling or falling.
Later still there could be a visual editor to make and save your own marble machines.
Thanks for any thoughts on that data structure thing!
Greetings, Chrisir
P.S.
my old approach:
http://www.youtube.com/watch?v=PwgY3AvAhLg
1