QuickSand

Community Forums/Showcase/QuickSand

Pineapple(Posted 2008) [#1]
QuickSand is a program that I've been writing for a while and is nearing completion. It is updated regularly at http://www.freewebs.com/grasshopperinteractive/ . Since the last post which had a typo in the title (which is probably why it didn't get much attention) it has recieved a huge update.

Try it out, it's an excellent program

Here are some screenies: (The faulty icons are due to my ancient machine)






ImaginaryHuman(Posted 2008) [#2]
It's cool. I definitely preferred your custom fullscreen GUI to the ugly Windows GUI, though. Also for some reason on my iMac running Windows Vista it would not display anything on the screen no matter what I clicked.


Pineapple(Posted 2008) [#3]
Heh, you're the first one to call it ugly. All the other comments on it have been 'simple and clean'

So far it's only been tested on Windows XP, and somebody told me that they were running Vista and it worked. I don't know how that can be fixed.


Nike(Posted 2008) [#4]
fun and addictive


chwaga(Posted 2008) [#5]
On my computer (vista), when I downloaded this a week or so back, I noticed that the mouse is messed up, I believe that unless the window was in it's correct position (which I couldn't pinpoint), the cursor would be offsetted.


TartanTangerine (was Indiepath)(Posted 2008) [#6]
Neat but somehow I don't think I should be able to create a pile of water :)




big10p(Posted 2008) [#7]
Maybe they're ice particles.


Pineapple(Posted 2008) [#8]
Indiepath, you can make your own physics for it, which includes increasing the rate at which the stuff spreads.

Also, please note that the most recent version is now 1.51 - download it on the website. As for chwaga's bug, that was fixed several versions back.


Sauer(Posted 2008) [#9]
Another wonderful B+ production; wonderful to see.


Taron(Posted 2008) [#10]
the idea is quite brilliant! I would call it very inspiring and a great draft for something highly compelling! I really dig the conceptual simplicity.
Without having read through the thread I'd say from the top of my head:
- support more realistic dynamics for the elements:
water more fluid
ice melting to turn into water
buoyancy for lose things such as wood
steam collecting in enclosures

- consider implementing elasitc materials
rubber
wood breaking under pressure (depending on thickness of "painted area")

There's probably a whole lot more, but those are my first thoughts.
Very cool, though! Rock on!


chwaga(Posted 2008) [#11]
agreed, but you do realize this idea has been done countless times before already? Not to be discouraging, but the sand game idea isn't exactly revolutionary.


Taron(Posted 2008) [#12]
Sounds discouraging to me! Let this guy do his thing, I think he's learning a great deal with this project and that's the best part about it as far as I'm concerned! Discovery as a personal thing leads to those beyond.


chwaga(Posted 2008) [#13]
But you were phrasing it like it's never been done before, if that were the case I think this guy would deserve a million dollars, but otherwise it's still a really cool app (I can't ever seem to get my sand apps to go fast enough...)


Taron(Posted 2008) [#14]
You know, thank you for letting me know that it's been done before. I've seen some water effects done with the same method before in several contexts, but never the whole thing. However, what's so important about letting "this guy" not have his brief moment in the sun, so to speak? Don't worry so much about me, I have nothing to offer to him, really, except a little feedback and another reason to follow his passion. Don't be too afraid that people would get glory for the wrong reasons! They often do. It's only important what they make with it. And my other tip, although it's a funny one, don't envy people for the praise they receive, justified or not! It only makes your day harder and your character weaker. Be strong, be the best you can be and be happy with someone else, if there's a good chance. Makes life nicer everytime.

I, however, can't stand if anyone shows his stuff, labeling it as "Excellent" anything, really. But it's exactly the kind of angry feedback and downtalking that causes those exaggerated claims. What ever happend to humble on either side?


Damien Sturdy(Posted 2008) [#15]

don't envy people for the praise they receive, justified or not! It only makes your day harder and your character weaker



new fave quote! Excelent!


chwaga(Posted 2008) [#16]
...did I offend somebody?


Damien Sturdy(Posted 2008) [#17]
Don't think so? I just liked that quote! :-)


Pineapple(Posted 2008) [#18]
If you visit www.fallingsandgame.com you will see various other sand games and get an idea of what I'm shooting for. Although you may doubt the truth of the statement, my sand game does contain several new ideas, which to my knowledge, have not before been done (In a falling sand game)

I appreciate the ideas for the more advanced physics, but this is a particle physics simulator which concentrates less on the physical behavior of individual entities, but rather emphasizes the reaction between such elements.
Water being more fluid is a big issue for me, as you are not the first to raise this suggestion, and some have complained about it. My engine's physics are streamlined and extremely fast due to the excessively simple physics, which use nothing more than simple addition, subtraction, and comparison to get the job done.
For ice melting into water, I'm considering 'Energy' which would allow certain elements to emit and conduct various forms of defined energies, and such could be heat.
Bouyancy is an elements of rigid body physics, but it is possible to an extent. Simply make wood fall and give it a lower density than water.
I'm not sure what you mean by steam collection in enclosures, but you must realize that all of the elements are moddable and I am trying to keep moddability very easy, and such may not be very comprehendable to do.
About you elasticity and wood breaking, these also would require rigid body physics to accomplish unless I am mistaken, so I'm afraid they likely will not find their way into the game.

I appreciate your support and enthusiasm, Taron, and I understand your logic, chwaga.


chwaga(Posted 2008) [#19]
rigid body and fluid physics, now THAT would be cool. Plus breakable objects are much more pheasible in 2D, so it's not really impossible.


Nate the Great(Posted 2008) [#20]
What exactly is the "secret" to making sand games. I tried a basic one and after 200 particles it slowed down so much it wasn't fun anymore.

also for more ideas google Powder game It is very fun. :)


chwaga(Posted 2008) [#21]
Same for me...


Pineapple(Posted 2008) [#22]
Yea, I love powder game and is one of my several inspirations. BTW, here's the link: http://dan-ball.jp/en/javagame/dust/


The "secret"(s) to making a good sand game:
First and foremost, you must make a decision:
Am I going to use particle or pixel physics.
QuickSand uses pixel physics.
What are pixel physics? And what are particle physics?

Pixel physics are easier and much faster.
Particle physics are slower and harder, but allow for much more detailed physics.

Pixel physics is where you have an array holding data for each pixel on the screen, recording what element is there.
Particle physics uses objects (Types to us Blitzers) to record all the particles


Some of the many methods I use for speed, and what things slow it down for your reference:

I use trig and floating point integers in only two places, neither of which is a major component of the game. Floats are slow, so don't use 'em.

For...Each loops are pathetically slow in BlitzPlus. So I have a cool solution: I have a type for the different kinds of reactions to make them more flexible. QS was quite sluggish when iterating through each and every reaction just to find the ones assigned to the element it's checking for. So to fix that, I have a bunch of references so that it is no longer necessary to go through them all. It's difficult to explain, but if you really want it, I'll post the code for this part.

Use as few loops as possible, they make your code, when done correctly, easier to look at, and faster to operate. For example, instead of doing something like this:
;Assign a bunch of numbers to 0
For i=0 To 7
  x(i)=0
Next
;Assign some other bunch of numbers to 0
For i=0 To 7
  y(i)=0
Next

Do this:
;Assign two variables to 0
For i=0 To 7
  x(i)=0
  y(i)=0
Next

It may seem trivial, but it adds up.

Use the code archives.
I was able to find integer only line and circle functions in the code archives, and after some minor modifications, they fit my game perfectly. It's a whole lot faster than drawing to a buffer with blitz drawing commands, scanning the pixels, then putting them on the sand buffer, like I might have done was it not for the functions I found.

Lock the buffer when drawing. This should be obvious.

If an element has no reactions assigned to it, don't check it for reactions. If it has no physics assigned to it, don't update it. Wall has no reactions and no physics, so the program just skips right over it.

But perhaps the most speed provoking thing I did is how I draw elements. I call it the "Never Cls Method". Instead of draing all the elements each loop, when they need to change color, I draw them, and under no condition do I draw it otherwise.. when a pixel falls, I simply swap the two pixel's data and draw those two. This saves so much speed, it's insane. This is much harder, if not impossible, to do with particles.


Well, there you have some of the secrets.

But the most difficult thing was DEFINITELY making it so when you draw an element, lines connect your last mouse position with your latest. Download an earlier version and try to draw an element to see what I mean.