User Tag List

Page 18 of 18 FirstFirst ... 8 16 17 18
Results 171 to 177 of 177

Thread: Spryke - hardcore new-school platformer

  1. #171
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Yes, if you were wondering why Officeworks no longer seems to have any erasable pens in stock, now you know why

  2. #172
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AftPeakTank's Avatar
    Join Date
    Apr 2013
    Location
    Greece
    Posts
    376
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    Seriously, I am pushing my brain to the edge, trying to imagine would your particles need 90+ Alt. Values.....

  3. #173
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Well, take twirling for example, which is a movement that kicks in semi-randomly:



    When twirling begins for a leaf (if it's marked for twirling in the first place, that is), we first need to create a fulcrum around which it'll twirl and store its ID, so that each leaf/fulcrum pair will be correctly 'married'. We must figure out where to put the fulcrum (which is normally invisible): so that's the fulcrum's direction in relation to the leaf, plus the radius at which the leaf will twirl around it. We determine how wide the radius should be by taking into consideration a few factors, including how fast the leaf is travelling and how close it is to the player; we calculate these into variables we call the speedFactor and layerFactor. We also need to decide how many revolutions around the fulcrum the leaf will make, and we need to keep track of how many percent of its twirling journey have been completed. We calculate that by keeping track of the leaf's starting direction, finishing direction, and current direction.

    The leaf is always spinning, but we give it a little bit of extra spin when it twirls. We also give it some extra scale while it twirls, to add the illusion of it twirling towards the camera a little. And we also give it a little extra speed during the twirl. But we can't just abruptly add extra spin, scale and speed when the twirl begins, and then abruptly take it away when twirling ends - that would look broken. So we need to gradually increase/decrease the spin, scale and speed, by a separate acceleration value. Now, for the twirl itself, we need to figure out how to actually achieve that - in other words, what modifications we need to make to its X and Y position. We do that by taking the leaf's current twirl angle and performing some trigonometric functions on it, which gives us the X and Y values we need, which we call twirl X and twirl Y. We can then add these to the leaf's main positionX and positionY values, so that the current portion of the twirl will be included the next time we reposition the leaf.

    However, we don't want the leaf to perform perfectly circular twirls, as that would be unrealistic. Instead, we want it to to twirl in an ellipse that is pointing in same direction that it's moving. To achieve that, we need to somehow convert the leaf's 32-directional value into X and Y format so that we know how much X and Y movement to apply to create our ellipse. There's probably an easier way to do this with trigonometry, but the way I do it is by setting a variable called xDirectionfactor2way to Abs(8 - Abs(Dir( "Group.Particles" ) - 16)) * 0.125 and then using it to set another variable called xDirectionfactor4way to ( ( Abs(Dir( "Group.Particles" ) - 16) - 8 ) / Abs(Abs(Dir( "Group.Particles" ) - 16) - 8) ) * xDirectionFactor2way( "Group.Particles" ). And of course I do the same for yDirectionfactor2way and yDirectionfactor4way. Though unwieldly, these equations produce two simple values: how much X movement and Y movement is involved in a particle's trajectory, no matter its direction (so if it's moving straight up, X is 0 while Y is -1.0; if it's moving diagonally right and down, then X is 0.5 and Y is 0.5)

    So our twirl is done. However, we'd like to modify it depending on why the leaf is twirling. If it's just twirling on its own, then this is fine. But if it's twirling because Spryke just collided with it, then we want to give it some more turbulence, so we transfer some of Spryke's movement speed into a variable called extra twirl and use that to make the twirl faster, smaller, and with more revolutions. If, however, the leaf is twirling because the wind has picked it up, then we also need to adjust the elliptical direction of the twirl to be more in line with the direction of the wind (if the leaf is travelling downwards but the wind is blowing it sideways, the leaf should twirl mainly sideways, not downward), so we also need to factor in the windXspeed and windYspeed

    So there you have it. The 27 or so bold words above are alterable values. And that's just for twirling. There's also pivoting, spinning, wobbling, scaling, veering, opacity, lifespan, rgb, and splashes to worry about. Like I said, this was one of the most complicated things I've ever done. I'm very happy to be finished .

  4. #174
    Clicker Fusion 2.5Android Export Module
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    AftPeakTank's Avatar
    Join Date
    Apr 2013
    Location
    Greece
    Posts
    376
    Mentioned
    14 Post(s)
    Tagged
    0 Thread(s)
    OK, now this was complicated as hell... But is totally clear... Thank you for even bothering writing it down .

    The result is very fine by the way.

  5. #175
    Clicker Fusion 2.5 (Steam)Fusion 2.5+ DLC (Steam)

    Join Date
    Nov 2017
    Posts
    90
    Mentioned
    4 Post(s)
    Tagged
    0 Thread(s)
    Sir Vol, this looks absolutely amazing. How in the heck does Spryke run at 120+ FPS. My game runs at a much lower resolution and grinds to a halt when I start generating lots of particles (fastloop-based custom physics engine). I feel exceedingly inadequate in the Fusion. department.

    Please show your working. I think you're cheating!

  6. #176
    Clicker Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)
    Volnaiskra's Avatar
    Join Date
    Jan 2014
    Location
    www.sprykegame.com
    Posts
    2,245
    Mentioned
    87 Post(s)
    Tagged
    0 Thread(s)
    Well, each particle uses the bouncing ball movement, which is faster than manually moving things, and I don't have to worry about coding in events to make speed and 32 directions work. I also try and figure out as many necessary calculations as I can during the creation stage and store them as altVals, so that Fusion won't need to calculate them repeatedly during the execution stage. And once all particles are created, I run a loop that assesses each of them to see how often they need to be updated for various attributes. For example, if a particle ends up with parameters that will make it spin, but not very much, or it's very small, or far away, then I'll flag it as updateAngleSlow, so that Fusion only has to update its angle every once in a while. Here you can see that certain things, like updating the RGB coefficient, I only do about 3 times per frame (every 41 ticks). Others I do every 7 ticks, every 5 ticks, every 3 ticks, etc. as needed.

    Doing different things at different tick intervals also helps spread the load more evenly, so I'm not burdening Fusion with a huge workload in one particular frame, which might end up causing a spike that creates noticeable stuttering. That's also why I use every 41 ticks rather than something more regular like every 40 ticks. 41 is a prime number, which means that if I set certain things to be done every 41 ticks, they should end up being done on their own more often, rather than frequently at the same time as those things which are set to be executed every 2, 3, 5, 7, or 10 ticks, for example. For instance, every 30th tick will always coincide with every 2nd tick, every 3rd tick, every 5th tick, and every 10th tick, since 30 is divisible by all those numbers. But every 41st tick will only coincide with every 2nd tick 50% of the time (41, 82, 123, 164...) and every 5th tick only 20% of the time (41, 82, 123, 164, 205, 246...) and so on.




    In case it's not clear, the way I can tell when it's every X ticks is by setting up a little system of altVals that makes use of the mod function:



  7. #177
    Clicker Fusion 2.5 DeveloperAndroid Export ModuleHTML5 Export ModuleSWF Export ModuleInstall CreatorInstall Creator Pro
    Fusion 2.5 (Steam)Fusion 2.5 Developer (Steam)Fusion 2.5+ DLC (Steam)Android Export Module (Steam)HTML5 Export Module (Steam)iOS Export Module (Steam)Universal Windows Platform Export Module (Steam)

    Join Date
    Aug 2006
    Posts
    1,125
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    @Volnaiskra Thanks to share your very preffessionnel works. Can you speak more about your maps ? Do you made a level editor ?

    Thaks.

Page 18 of 18 FirstFirst ... 8 16 17 18

Similar Threads

  1. Beardy Isle Hero - old-school style platformer
    By oruga in forum WIP & Released Games & Apps
    Replies: 5
    Last Post: 24th May 2015, 12:09 AM
  2. Spryke - a lush, hardcore platformer
    By Volnaiskra in forum Desktop Releases (PC & Mac)
    Replies: 0
    Last Post: 10th February 2015, 11:46 PM
  3. Launch day! Hardcore wallbounce platformer "Nobody Said It Was Easy" (free)
    By JoeRoth12 in forum iOS Released Games & Apps
    Replies: 4
    Last Post: 8th February 2015, 01:06 AM
  4. Ninja Twins - Mindblowing Hardcore Puzzle
    By Matriax in forum Released Games & Apps in Flash
    Replies: 0
    Last Post: 6th May 2013, 10:33 AM

Posting Permissions

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