Giter VIP home page Giter VIP logo

wp-slotkit's Introduction

wp-slotkit

A slot game engine for WordPress.

Intro

This is an engine for creating slotgames. It is created for the implementation of this idea, and you can test some games created with it here. It is open source, however, so you can use it for your own projects as you wish.

It is implemented using PixiJS and is distributed as a WordPress plugin. If you want to test it, just install WordPress, then download the zip file and install it to your site as you would install any other WordPress plugin. Hopefully it should be self explanatory how to proceed from there.

Creating games

Games are created using the WordPress administration interface. Once the plugin is installed, you will find an extra admin menu called "Slotgames" in the regular left hand side administration menu. You can use it to create and edit games. The game creation editor lets you upload the graphics for the background of the games, as well as graphics for the keypad and symbols. It also lets you adjust parameters like spin speed and a whole lot of other things.

Tweaks

A "tweak" is an way to change how the game behaves, and a way to extend the functionality of a game. For example, this game has flashing starts when the symbols are idle. This game does not have those stars. The stars are implemented as a tweak. The architecture for how to implement tweaks is similar to the hook architecture in WordPress. In short, the observer pattern is used, and the tweak can listen for various events from the game. There is also a mechanism where the tweak can tell the surrounding system which parameters is expects, and the user or designer creating the game will be given the opportunity to edit those parameters in the administration interface. As an example, the source code for the "idle stars" tweak can be found here. You can see the mechanism where the tweak hooks into the game in the code that looks like this:

game.on("symbolStateChange",function(ev) {
    ...
});

Player accounts

The user management system built into WordPress is used to maintain the player accounts. However, WordPress has no mechanism for letting users deposit and withdraw funds from their account. If the wp-crypto-accounts plugin is installed alongsite the wp-slotkit plugin, then this will be detected by the wp-slotkit plugin and it will be possible for users to play with the funds in their Bitcoin account provided by wp-crypto-accounts. If the wp-crypto-accounts plugin is not installed, it will still be possible to test the games, but only with playmoney. The mechanism where wp-slotkit detects available currencies is extensible, so it is relativly easy to hook into other new or existing systems.

wp-slotkit's People

Contributors

limikael avatar

Stargazers

 avatar

Watchers

James Cloos avatar  avatar  avatar

wp-slotkit's Issues

Lower quality images

Make it possible to use lower quality images / harder compression in case of low bandwidth.

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.