Engines NIFE Roadmap Shatterloop Game Projects
Deprecated Saepes Mundi Other Projects Blog

Deprecated

Slots Project Checklist

Posted October 4, 2022 by Xhin



There are 2 Replies


Algorithm Work

( going to just make a library for accelerative / decelerative animations ).

  • Find a displacement function that tells displacement when velocity reaches zero -- probably need to plug the acceleration formula for velocity back into the displacement formula. Haven't done physics in forever.

    Basic Wheel

  • Create const wheel{}.

  • wheel.init(obj) should take an object that has the parent element to render the wheel in and a list of face objects (for now, bg, color, font, sym). This sets the settings for all wheels.

  • Set the vertical height of each face as well, and I guess the horizontal. The vertical is actually important though and should be stored separately.

  • wheel.render(el,{ face_start }) will create and render a wheel to the appropriate element, starting on the appropriate face with the appropriate settings of the above. It should also store it internally, using the el as a distinct key -- the el is just the name of an id of an element.

  • wheel.spin(el, { direction, speed, acceleration }) will store stuff internally and then begin to spin the wheel. Will need a separate checklist for this most likely. Speed and direction dictate which way it spins and how fast it's going; acceleration dictates how fast it stops.

  • October 4, 2022
    Xhin
    Sky's the limit

    Wheel Stopping

  • wheel.stop(el,microtime) will stop the wheel at the appropriate microtime. In-game this would be whatever the microtime is when you release the mouse, but I need to be able to check my displacement formula.

  • Anyway this function will run the internally-stored acceleration speed and will eventually land on a Y position.

  • From there it needs to actually land on a face somehow in a discrete way -- idk may want to reexplore this or play with the spinning, also how do IRL slot machines work?

  • In any case, it lands on a face. This will be important later.

    Displacement

  • There needs to be a displacement object that will run the actual physics function based on the initial settings of some wheel. This will require its own checklist.

  • There also needs to be a testing thing so I can make sure the physics calculations actually match the jquery stuff.

  • Displacement needs a PHP equivalent as well.

    Seeding

    The way the seeding algorithm works is you pass a seed and stuff like stopping value, and then the engine figures out the speed and acceleration from this

  • October 5, 2022
    Xhin
    Sky's the limit

    Reply to: Slots Project Checklist

    Username
    Password