We are about to switch to a new forum software. Until then we have removed the registration on this forum.
https://openprocessing.org/sketch/410859
Although I'm not yet finished id like to show this gravity thing I'm working on. I realized today there's a resemblance to agar.io but that's unintentional. https://drive.google.com/file/d/0B0OptcnSyKyWMzR3UnZXaXFma0E/view?usp=sharing
Controls: Make balls by dragging the Right mouse-button. Throw balls around by dragging them with the Left mouse-button. Pan the view by dragging in "empty space" with Left mouse-button. Zoom-in/out with scroll-wheel. Open/Close settings with S-key on keyboard. In settings you can turn on/off gravity.
So what's the point? There's not really much you can do, except throw balls into orbits, but it's a start.
Comments
That's pretty cool. I like the fact that you can choose the color of the ball just by moving the mouse around. It's a really good idea.
I think you should use a library for the ui this could be more simple and clear.
Not asking for help, just want to share my ideas.
In case someone sees this I'd like to hear your comment on my ideas.
Problems I'm aware off
Balls falling inside each other is a glitch due to not doing proper collision detection.
Zooming causes wonky panning.
Changing size off a ball by pressing the keyboard is not supposed to happen.
As Castaneche pointed out the ui could be more simple, I have some ideas for it.
Ideas worth considering UI
I'm working on simplifying this to the point where you can easily do everything with just the left mouse button.
There's not that much you can do so it shouldn't be too hard.
If that works then it should also work on android.
Graphics
Graphics will be kept at a minimum, but I'm making a couple simple svg-vectors in Inkscape.
"Tracelines"
The tracelines thing is a quick fix to find balls that's not on screen.
I have an idea to replace it with an arrow on the edge of the screen (kind of like smash bros).
If you drag that arrow towards the middle, you'll pan/teleport to where that ball is. Or if you drag that arrow off screen you delete that ball from the scene.
Numbers and scale
I have an idea to make large numbers (balls masses and the coordinates on ruler ontop of the grid) less cluttery by rounding them to some short format.
Powers of 10, or suffixes like K M G for thousand million, billion etc..
Rejected ideas
Double
I'we considered converting some floats to double (64-bit float).
That would enable a larger world, larger balls, and more detail.
However there are more important things that needs to be fixed first.
Rotation
As an addition to panning and zooming, tilting the view could be cool, but not essential
A game
Games are cool, but much more complicated than a sandbox
3D
I saw processing could do 3D, however I can't do 3D, so I'll stick to 2D
Good thing you rejected Doubles. Processing relies internally upon floats, so you'd need to keep converting floats every now and then, not advisable of course.
Excellent idea.
I like your idea on the whole and would be very grateful if you posted the code after completion.
Not completed but this is what I'we done so far.
Download zip
gravity 0217 project zip
Balls no longer fall into each other.
Fixed the zoom.
New UI with icons, they're a bit counter-intuitive right now, see them as placeholders.
"Trace-lines" is now trace-triangles, they're not interactive yet though.
Numbers now shows with suffixes K M G up to Yotta.
Some new bugs arose but they're minor ones. Still got more problems to solve and ideas to work with.
Good job!