README
5/04/2006 version 1.12
Dana Cordes (dcordes@pudding.org)
The Gravity Machine
------------------
I wrote this little toy after being inspired by the BallDropping (http://www.balldroppings.com/) website. I figured that I could do something cooler, pretty easily and had been hankering to build a little game for a while. Blitzbasic rules.
If you like this free game, drop me a note dcordes@pudding.org.
System Requirements
-------------------
Not too sure. It'll require some minimal 3d acceleration of some sort. And sound.
The Basics
----------
This is a little game with no objective other than general amusement. Balls drop as you create platforms for them to bounce off of, which makes a sound.
As you're creating or modifying a platform, it's angle is displayed in the lower left hand corner of the screen (some people like math).
The sound the ball makes as it strikes a platform is determined by several things:
- The impact velocity determines the volume of the collision. Shallow angle is quieter than sharp angles. Greater speed means louder.
- The length of the platform will impact the pitch. Longer platform, lower pitch.
- Location on the screen will change the left/right pan of the sound. If it's way on the left of the screen, the sound will come from way on the left.
These sound characteristics along with the continual dropping of balls can lead to some interesting rhythms. Combine that with the constant motion of the falling balls and the challenge of directing their paths, and I guess you have a game.
Once you create a platform, you can move the endpoints by clicking on them once, and then moving them to where you'd like them to be. You can move the whole platform by clicking on the center portion. Right-clicking on a ball or platform will remove it.
The Controls
------------
+/- on the numpad will increase/decrease the ball drop rate
z manually drop a ball
(esc) pulls up the game menu
q quit the game
(del) clear balls and platforms
(home) clear balls only
(space) pause balls in mid air
(tab) pause balls dropping
[ / ] to increase/decrease gravity
(page up) increase the ball's bounciness
(page down) decrease the ball's bounciness
(shift) hold down and move platform handles to change the length (tone) of the platform without changing the angle
1,2,3,4 pause/unpause individual balls dropping
q,w,e,r decrease the ball drop interval (speed up dropping)
a,s,d,f increase the ball drop interval (slow down dropping)
(ctrl-s) to save the current setup
(ctrl-l) to load a saved setup
(enter) start rotating the camera, this freezes mouse input, and just makes things cooler to look at.
(up)/(down) increase/decrease cam rotation rate
TODO
----
-have (del) reset everything back to defaults, not just clear field. Gravity, bounciness, timings, etc.
-way to seperate position/direct ball streams
-Save mp3/raw wav sounds
http://www.blitzbasic.co.nz/codearcs/codearcs.php?cat=3&order=&asc=&lang_id=1
-Change tails to use Lotus particle engine:
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=1654
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=1657
-Add GUI menus from a lib, instead of the ones I wrote. Cause they suck.
http://www.blitzbasic.co.nz/toolbox/toolbox.php?cat=14
-AI to build a set of platforms automatically, so can be used as a screensaver
Version History
---------------
Version 1.12 5/04/2006
-removed some debug from the save function. This was creating files in c:\ It's fixed now.
-fixed the ball pause/unpause
Version 1.11 5/03/2006
-added additional lighting
-fixed bug with manual ball generation not working
-sync'd ball timing so they won't deviate over time. Unfortunatly, this will break the ball timing from saved games. Platforms will still load correctly.
-fixed a significant bug in the loading routine that was preventing a user from loading more than one file without restarting the game.
Version 1.10 4/27/2006
-when scene was rotating, the tone of the notes would change. This has been fixed.
-added generator object to top of screen
-the ball sound indication is now bigger
-add camera rotation speed control with up and down arrow
Version 1.9 4/27/2006
-message texts now fades out over a short period of time
-added splash image on load
-fixed ball spacing between game pauses.
-changed manually dropping ball control from (ctrl) to z, to remove conflict with save and load, that also use the control key
-changed non tonal sound scaling to be a broader range. From high pitch to lows, instead of just mids to lows.
-added (enter) key to start rotating the field. This freezes mouse input, though key controls still work.
Version 1.8 4/26/2006
-added save/load. User (ctrl-s) to save and (ctrl-l) to load. Files are stored in an xml schema, so feel free to mess with it, though if you tweak too much, you might break the game. =)
-created a windows installer using NSIS
-used these:
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=1393
http://www.blitzbasic.co.nz/codearcs/codearcs.php?code=916
Version 1.7 4/25/2006
-refactored ball interval and control logic to be controlled independently
-added 1-4 controls to pause/unpause individual ball streams
-added q,w,e,r and a,s,d,f controls to control the individual drop rates of the balls
Version 1.6 4/24/2006
-platform handles now pulse on platform impact
-fixed a bug that was causing the end point of a newly created platform was not sticking to the cursor after any platform had been moved.
-added (shift) key modifier that will constrain a platform's scaling to the original angle of the platform. For instance, if you have a 45 degree angled platform, holding down (shift) while moving one of it's endpoints will change it's length, but not change the angle.
-adjusted impact volume modifier so give a broader range of volume. If a ball falls from the top to the very bottom it'll get full volume. Used to be if it fell just a short way it would get full volume.
-ball now pulse every time any one of a specific color triggers. They pulse bigger if the sound volume that that impact is larger.
Version 1.5 4/21/2006
-cleaned up some platform movement code.
-made the platforms and platform handles larger so they're easier to click on.
-increased the size of the whole playfield so you have more space to play with.
Version 1.4 4/20/2006
-Adjusted pitch of non-tonal notes to be about half of what it was before.
-Added version label to the app title
-Added two new ball streams. Now beat, tone, cowbell and cymbal. I know, it needs MORE cowbell, but this'll have to do for now. We're on a budget you know.
Version 1.3b 4/20/2006
-Fixed the labeling of the updated notes from 1.3a
Version 1.3a 4/20/2006
-Fixed the tonal generation so it actually hits the notes it says it's hitting.
Version 1.3 4/20/2006
-If the velocity of a ball falls below a certian point, it will violently self descruct. This will prevent ball buildup, and help with the sticky balls issue.
-Fixed resouce leak that was causing slowdown and crash over a period of time. The EntityInView function was always returning true, so the balls never got cleaned up. I'm not sure why that commang wasn't working, but the solution that I'm using is faster that picking, anyway. Regardless, the balls get cleaned up now.
-normalized the volume of the two samples.
-added (end) button to clear all balls
-fixed resolution switching so it doesn't crash.
-now shows the current note that a tonal ball will make when creating a platform
Version 1.2 4/19/2006
-Made platforms a little less transparent so they're easier to see.
-Change normalization code from using the Delta Time technique to Frame Tweening. This makes all the physics work much better.
-Added tone control based on the standard american scale. 72 possible notes for tonal ball types.
-Add addition ball type. Now have a single tonal type, and a single 'standard' type. Two sounds, two balls dropping.
Version 1.1 4/19/2006
-Added (space) to pause the ball flow. This will allows you to cleap up balls and arrange platforms without balls.
-Added (tab) to pause the balls from dropping. You can use this in conjunction with (ctrl) to carefully plan you design before lettign loose with a full stream of balls.
-Added velocity normalization code to keep the balls traveling at the same rate (or very close to) regardless of system spec or current cpu load.
-Added messages to control commands. So, if you adjust the gravity, it'll say that you have, and to what rate it is currently set.
-Added ability to increase/decrease ((page up)/(page down)) the bounciness of the balls.
-Added ball trails ...purdy...
-Added colored visual effect for ball strikes on platforms
-Changes square platform ends to round and made them smaller
Version 1.0 4/18/2006
-Initial release. Only a single ball stream.
FAQ
---
(+[HK]Phage) is therea way to delete one platform?
(@Bloater) right click it
(@Zombie_Work) here's a feature you need
(@Zombie_Work) the ability to cancel creation of a platform
(@Bloater) Just right click instead of left and it'll cancel.
08:14 (@Zombie_Work) how do you get it to take up your entire desktop?
08:14 (@Bloater) Zombie_Work: no easy way right now
08:14 (@Bloater) if you hit esc you can change the resolution.
Random Notes
------------
14:32 (@voodooc) well you may want to restrict the pitch changes to actual notes
14:33 (@voodooc) eg if it falls within this range of size, you get a G, this
other range, you get a G#, etc
14:33 (@voodooc) make balls represent specific waveforms
14:33 (@voodooc) maybe the width of the platform determines the sustain
14:34 (@Bloater) width determines pitch
14:34 (@voodooc) i mean thickness in the other direction
14:34 (@Bloater) I was thinking of the note thing
14:34 (@Bloater) oh
14:35 (@Bloater) I kinda meant what intruments
14:35 (@voodooc) wide/narrow vs thick/thin
14:35 (@voodooc) (@voodooc) make balls represent specific waveforms
14:35 (@Bloater) chime, cowbell, base drum, etc
14:35 (@Bloater) oh
14:35 (@Bloater) hm
14:35 (@voodooc) yah, those are waveforms
14:36 (@Bloater) Well, I'm using samples, not generating tones here.
14:36 (@voodooc) but you can reduce the # of different balls (and give more
variety)
14:36 (@voodooc) if you change the sustain w/ the thickness
14:36 (@voodooc) eg 'bell' ball vs a thin/narrow sounds like a cowbell
14:41 (@voodooc) and the same ball could sound like a gong with a thick/wide
14:43 (@voodooc) but yeah, restricting the range to valid notes is probably
really important
14:50 (@voodooc) not so important for some sounds
14:50 (@voodooc) percussion-type sounds
14:52 (+[HK]Phage) yeah, make lengths = notes in a modal scale
14:52 (+[HK]Phage) so it always makes chords
14:52 (+[HK]Phage) marimba, snare, cymbal, bass drum or something
14:53 (@Bloater) kk
14:53 (+[HK]Phage) with the marimba being notes, snare being volume, cymbal
being type (ride, high hat, whatever) bass drum being
note... that would rock
14:53 (@Bloater) volume it impact velocity
14:53 (+[HK]Phage) i make it more complicated with every idea :)
14:54 (+[HK]Phage) i'm just thinking, cause there is no "note" in snare, so
what would longer platform do
11:38 (@Knightmare) and you should make the color change with each scale
11:38 (@Knightmare) so like the lowest scale C-B is one color, next octave is a
different color, etc
11:39 (@Knightmare) yeah, so just try to make it so the color shifts at the
scale points if possible
11:39 (@Knightmare) so like say, the lowest octave would all be shades of blue
11:41 (@Knightmare) one octave is normally C, C#, D, D#, E, F, F#, G, G#, A, A#, B
14:29 (+[HK]Phage) i need WAY more space, we need to figure out this note
thing, and i need to be able to save my layout so i can
export it ;p
14:38 (+[HK]Phage) so i just did a C, E, G, C and if i make the G a G# then it
sounds right
14:38 (+[HK]Phage) so its not off by much, but a little
17:10 (@Zombie) hmm
17:10 (@Zombie) it dosen't like it if you have a platform perpendicular to the
ball dropping
08:09 (+[HK]Phage) now you need to make it take less than 100% of my work
desktop so i can check my email while i play :P
08:10 (@phargle) and a boss key
13:56 (+[HK]Phage) pausable/speed adjustable streams, larger workspace would
make it way easier to do music