Does anyone know the easiest way on how to make a game like this?
http://dan-ball.jp/en/javagame/dust/
Thanks in advance.
Does anyone know the easiest way on how to make a game like this?
http://dan-ball.jp/en/javagame/dust/
Thanks in advance.
Not to discourage you my friend, but TGF hasnt anywhere near the power needed to create a clone of the Powder Game and maintain an acceptable framerate. Why?
-All the little particles that make up the powder: In TGF, every particle would have to be an active object. Currently (on my machine), TGF can only support under drawing a couple hundred actives with an acceptable framerate (>30 fps), and this only rises to a couple thousand with HWA (which TGF currently doesnt offer). The Powder Game has and can maintain numbers in the many tens of thousands.
-The logic needed behind the scenes: It looks to me that forces are applied to the particles by having an array of vectors that the particles positions are mapped to, which would then determine what vector to apply to the particle. The array also seems to balance itself out. Lets do some math:
Lets assume you have an array that devides the screen into 30 X segments and 20 Y segments. (You could reduce this, but the more segments you have the more seamless the simulation appears)
Lets also assume that to cause the vectors in the different cells in the array to balance out, they need to check themselves against thier 8 neighbors every frame.
Lets also assume you have 400 active particles (dust).
The particles have no physics, other than the vectors applied.
And lastly, you are using the software rendering method.
Now, given:
You need to parse the vectors array every frame to balance out the vectors.
You will apply vectors to all the particles separately in thier own fastloop.
(Alternatively, when you update the vector array you could check all particles against the current cell, adding many redundant loops )
And, lets just say you somehow condensed all the code for the particles into one event (next to impossible).
This means that you will need 30*20*8 = 4800 fastloop iterations just to update the array once!
(30*20 for each cell in the array, the *8 is to check it against every neighbor)
The throw on the 400 iteration overhead for applying the updated vectors to the particles, and your looking at 5200 fastloop iterations. Not too shabby a number, but if that werent bad enough, toss on the rendering time for all 400 objects in software mode and you would have a simulator that crawls. Remember that this is nowhere near 20,000 particles, nowhere near the number of segments in the vector array the Powder Game used, and completely without collisions (adding particle collisions would bring the simulator to its knees).
But, if the FPS is no object and you still wish to try anyway, I sent you a PM outlining how you might go about such a project.