pokie
1.0.0
在澳大利亞,他們稱老虎機為“ pokies”。
引入Pokie ,這是一個用於JavaScript和Typescript的服務器端視頻插槽遊戲邏輯框架。
npm install pokie
利用Pokie在後端實現視頻插槽遊戲機制。創建和管理遊戲會話,序列化,然後通過API將有效載荷傳輸到遊戲客戶端。
玩樂時,您可以在客戶端上實現獨立的遊戲邏輯,從而使服務器免於不必要的負載。利用仿真來展示特定的遊戲功能以進行演示。
Pokie也是平衡老虎機數學模型參數的重要工具,確保了身臨其境的遊戲體驗。配置遊戲會話並運行蒙特卡洛模擬,以確保該模型滿足所有必要的要求。
請參閱Pokie實施的各種視頻插槽遊戲機制的示例。
一個簡單的5x4視頻插槽遊戲的示例,該遊戲具有8個獲勝線。
特徵:
帶有免費旋轉的5x3視頻插槽遊戲的示例。
特徵:
具有粘性重新旋轉功能的5x3視頻插槽遊戲的示例。每種獲勝的組合都會觸發重新旋轉,在此期間,所有獲勝的符號都在其位置舉行。只要有新的勝利,重新旋轉就可以繼續。
一篇關於如何用於老虎機遊戲數學建模的中等文章。
視頻插槽遊戲邏輯。
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"