Giter VIP home page Giter VIP logo

experiment-slotmachinev2's Introduction

SlotMachineV2

Slot Machine Prototype v2


Demo Video :

Demo Video


Walkthrough on sourceCode :

Settings Profile:

This prototype is based on setting profiles. A scriptable object holds all the game settings. This allows us to change settings, graphics, and behaviors easily, even in play mode.

To create new settings, right-click in the project, select Create, then Settings.

SettingsSO

Settings Resources:

The first tab in the settings profile is Resources. In this tab, we define our slot resources (type, background, and icon).

Settings_Resources

Spin Settings:

This tab is where we define the spinning behavior of each profile.

Settings_Spin

Paylines:

This is where we set paylines. We can also draw the payline on the screen and set an identity color for each one.

Settings_Paylines

Layout:

This tab allows us to control the slot machine layout by changing slots scale or adjusting the spacing on the vertical/horizontal axis.

Settings_Layout


How it works :

Spinning:

In this prototype, a different approach was used to make spinning smoother and more flexible. We translate the whole reel one step down and then return it to the start position after shifting the slot and generating a new one on the top, creating a full cycle.

Spin

Clamping:

After the spin is completed, we need to clamp the reel to the appropriate position. We compare the reel position with the top (start pos) and bottom (pos of the next step) and move to the shortest distance between them.

Clamp


Screenshots :

Game Coins Animation Paylines Draw Payline

experiment-slotmachinev2's People

Contributors

aircoder89 avatar

Stargazers

Jack  peng avatar Troy Santiago avatar

Watchers

James Cloos avatar  avatar

Forkers

madratzz

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.