Anubis PHPSlots with Odds Verifier

Anubis PHPSlots with Odds Verifier

Released 6 years ago , Last update 6 years ago

A slot game framework that is easy to use, simple to customize and fun to play

When putting together any form of online game, the thing everyone wants is fun. And what is an age old method of having fun? Slot machines have been good fun in Vegas and beyond for a great number of years, and why not bring that to your world?

This Slot game framework will handle running the game for you, and even allows you to customize the reels to your liking. In fact, I spent the extra time to package together an Odds Verifier command line program to go along with the slots game.

NOTE: Custom Reel Arrays can have strings for array keys.

Simply run it as such:

$ php OddsVerifier.php
How many spins (Suggested: 1,000,000 for accurate reporting)? 1000000
How many reels (Min: 3 - enter D for the default game set.)? d

+-------------------------------------------------+
|    RESULT      |        NUMBER (PERCENT)        |
+----------------+--------------------------------+
|      WIN       |        2906 (0.29%)            |
|     LOSE       |        997094 (99.71%)         |
+----------------+--------------------------------+

Reel Item (6) - 1669159 shows (56% of total, 0.000% of wins)
Reel Item (5) - 314138 shows (10% of total, 38.334% of wins)
Reel Item (0) - 126507 shows (4% of total, 1.755% of wins)
Reel Item (4) - 283795 shows (9% of total, 29.043% of wins)
Reel Item (3) - 229823 shows (8% of total, 16.036% of wins)
Reel Item (1) - 173829 shows (6% of total, 4.818% of wins)
Reel Item (2) - 202749 shows (7% of total, 10.014% of wins)

Or you can try out a reel design of you own. Reels are put together with "weights." Meaning, each item in the reel is given a weight, and that weight defines how many of that item will be on that reel. Here is an example of a custom reel attempt:

$ php OddsVerifier.php
How many spins (Suggested: 1,000,000 for accurate reporting)? 1
How many reels (Min: 3)? 3
How many reel items for reel number 1 (Min: 1)? 4
What is the weight for reel item number 1 (Min: 1)? 600
What is the weight for reel item number 2 (Min: 1)? 250
What is the weight for reel item number 3 (Min: 1)? 100
What is the weight for reel item number 4 (Min: 1)? 50

How many reel items for reel number 2 (Min: 1)? 4
What is the weight for reel item number 1 (Min: 1)? 600
What is the weight for reel item number 2 (Min: 1)? 250
What is the weight for reel item number 3 (Min: 1)? 100
What is the weight for reel item number 4 (Min: 1)? 50

How many reel items for reel number 3 (Min: 1)? 4
What is the weight for reel item number 1 (Min: 1)? 600
What is the weight for reel item number 2 (Min: 1)? 250
What is the weight for reel item number 3 (Min: 1)? 100
What is the weight for reel item number 4 (Min: 1)? 50

Is there a "near miss" reel item? and if so, which reel item is it? (N or n for no, or enter the reel item number) n
+-------------------------------------------------+
|    RESULT      |        NUMBER (PERCENT)        |
+----------------+--------------------------------+
|      WIN       |        0 (0.00%)               |
|     LOSE       |        1 (100.00%)             |
+----------------+--------------------------------+

Reel Item (1) - 2 shows (67% of total, 0.000% of wins)
Reel Item (2) - 1 shows (33% of total, 0.000% of wins)

Pricing

14 day 14-day money-back guarantee

$4.99

Non-Commercial License

  • Perpetual license

  • 1 site, 1 server

  • No distribution (hosted use only)

  • Non-commercial use

Implementation

If you are ok with using the default setup of 6 reel items, and 1 near miss item, than you can simply call the system like so:

<?php

    require_once('Slots.php');
    $game = new Slots();

?>

It will put the game together, and run it for you. But remember all this does is play the game. It doesn't pay the player anything, it doesn't do anything but play the game.

To verify that the game is a winner or a loser, we must use this method:

$game->verifyResults();

This will return true if the game is a winner, or false if it is not. For visual aspects of the game, you may want to know exactly what was spun in the game! So we call:

$reels = $game->getReels();

This will return an array of Reel objects. To find out what each reel is you must call the getResult method on the Reel objects.

foreach($reels as $reel){
     echo $reel->getResult();
}

Or you could store the result. The result will simply be the array key (Reel number) of the reel that won.

You can also create the game using a custom reel set. This must be an array of reels and weights like so:

$reels = array(
    array( 0 => 600, 1 => 250, 2 => 100, 3 => 50), // Reel 1
    array( 0 => 50, 1 => 100, 2 => 250, 3=> 50), // Reel 2
    array( 0 => 600, 1 => 250, 2 => 100, 3 => 50)
);

// Is there a reel object that should ALWAYS lose? (optional, default is False)
$blankKey = false;

$game = new Slots($reels, $blankKey);
2 licenses, starting from From » $4.99 View Licenses

Get A Quote

What do you need?
  • Custom development
  • Integration
  • Customization / Reskinning
  • Consultation
When do you need it?
  • Soon
  • Next week
  • Next month
  • Anytime

Thanks for getting in touch!

Your quote details have been received and we'll get back to you soon.


Or enter your name and Email
No comments have been posted yet.