オーストラリアでは、スロットマシンを「ポーキー」と呼びます。
JavaScriptとTypeScriptのサーバーサイドビデオスロットゲームロジックフレームワークであるPokieを紹介します。
npm install pokie
Pokieを利用して、バックエンドにビデオスロットゲームメカニクスを実装します。ゲームセッションを作成および管理し、それらをシリアル化し、APIを介してペイロードをゲームクライアントに転送します。
楽しみのためにプレイするとき、クライアント側にスタンドアロンゲームロジックを実装して、不必要な負荷からサーバーを解放することができます。シミュレーションを利用して、デモンストレーションのために特定のゲーム機能を紹介します。
Pokieは、スロットゲームの数学モデルのパラメーターのバランスをとるための不可欠なツールとしても機能し、没入型のゲームエクスペリエンスを確保しています。ゲームセッションを構成し、モンテカルロシミュレーションを実行して、モデルが必要なすべての要件を満たしていることを保証します。
Pokieで実装されたさまざまなビデオスロットゲームメカニクスの例を参照してください。
8つの勝利ラインを備えたシンプルな5x4ビデオスロットゲームの例。
特徴:
フリースピンを備えた5x3ビデオスロットゲームの例。
特徴:
粘着性のあるレピン機能を備えた5x3ビデオスロットゲームの例。すべての勝利の組み合わせは、すべての勝利シンボルがその場所に保持されるReスピンを引き起こします。新たな勝利がある限り、再スピンは続きます。
スロットゲームの数学モデリングにPokieをどのように利用できるかについての中程度の記事。
ビデオスロットゲームロジック。
import { VideoSlotSession } from "pokie" ;
const session = new VideoSlotSession ( ) ;
session . play ( ) ;
session . getSymbolsCombination ( ) ; // symbols combination
session . getWinAmount ( ) ; // total round win amount
session . getWinningLines ( ) ; // winning lines data
session . getWinningScatters ( ) ; // winning scatters data
一定数のゲームラウンドを実行し、RTPを計算します。
import { SimulationConfig , Simulation } from "pokie" ;
const simulationConfig = new SimulationConfig ( ) ;
simulationConfig . setNumberOfRounds ( 10000 ) ;
const simulation = new Simulation ( session , simulationConfig ) ;
// set the callbacks if you want to control the session manually
simulation . beforePlayCallback = ( ) => {
console . log ( "Before play" ) ;
} ;
simulation . afterPlayCallback = ( ) => {
console . log ( "After play" ) ;
} ;
simulation . onFinishedCallback = ( ) => {
console . log ( "Simulation finished" ) ;
} ;
simulation . run ( ) ; // 10000 rounds will be played
simulation . getRtp ( ) ; // RTP of the current session
特定のゲーム機能をキャプチャします。
const simulationConfig = new SimulationConfig ( ) ;
simulationConfig . setNumberOfRounds ( Infinity ) ;
simulationConfig . setPlayStrategy ( new PlayUntilSymbolWinStrategy ( "A" ) ) ;
const simulation = new Simulation ( session , simulationConfig ) ;
simulation . run ( ) ; // the simulation will be stopped on any winning combination with symbol "A"