User Tag List

Results 1 to 2 of 2

Thread: Any suggestion on how to make a game like this one

  1. #1
    No Products Registered

    Join Date
    Feb 2009
    Posts
    70
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Any suggestion on how to make a game like this one

    Does anyone know the easiest way on how to make a game like this?

    http://dan-ball.jp/en/javagame/dust/

    Thanks in advance.

  2. #2
    No Products Registered

    Join Date
    Jan 2007
    Location
    NC - USA
    Posts
    261
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Any suggestion on how to make a game like this one

    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.

Similar Threads

  1. Suggestion for the next build: how to make the Active Object much easier to use
    By fawfulfan in forum Multimedia Fusion 2 - Technical Support
    Replies: 14
    Last Post: 17th April 2012, 06:26 PM
  2. Suggestion for pausing the game when the Home button is pressed?
    By mobichan in forum iOS Export Module Version 2.0
    Replies: 6
    Last Post: 23rd January 2012, 02:48 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •