Sweet Frenzy - Slots Like Godot 4.x Game Template
Sweet Frenzy - Slots Like Godot 4.x Game Template
Quote:Project
>assets (all of the assets used in the game)
>images
>misc
>sounds
>sprites
>scenes (the project has only 3 main scenes)
>scripts (all of the scripts needed for the core logic of the game)
...
var symbolValue = {
"respinSymbol": 3, # 3 symbols needed for a respin
"valueSymbol_1": 0.02, # each valueSymbol_n represents the value for 1 symbol popped
"valueSymbol_2": 0.008,
"valueSymbol_3": 0.005,
"valueSymbol_4": 0.003,
"valueSymbol_5": 0.002,
"valueSymbol_6": 0.001
}
...func _checkSymbols():
...
if(symbolsAppearances[symbolName] >= minSymbolsNum):
var symbolWinnings = (((betValue * symbolValue[symbolName]) * symbolsAppearances[symbolName])) # calculations based on the number of appearances of the symbol
...var baseWinChance = 0.35 # Base chance of creating a winning spin (35%)
var respinSymbolChance = 0.04 # Base chance of getting respin symbols (4%)
var minRespinSpacing = 10 # Minimum spins between respin features
var spinsSinceLastRespin = 0 # Track spins since last respin feature
var targetRTP = 0.96 # Return to player percentage (94%)
var winStreakFactor = 0.80 # Reduce win chance after wins (by 20%)
var lossStreakFactor = 1.20 # Increase win chance after losses (by 20%)
var consecutiveWins = 0 # Track consecutive wins
var consecutiveLosses = 0 # Track consecutive losses
var totalSpins = 0 # Track total spins
var totalBetAmount = 0 # Track total bet amount
var totalPayoutAmount = 0 # Track total payout amount
var currentRTP = 0.0 # Current calculated RTP
Sweet Frenzy is an inspired game by the popular Sweet Bonanza slot game. This was made when I decided starting to work on a knock-off slot game would be interesting, since the online slots industry got so big I wondered how these games are made.
The game has similar features as the Sweet Bonanza game.
All of the work was done in Godot v4.4.1 using the built-in scripting language - GDScript and can be used as a reference project or even to introduce more features to it.
Initially my plan was to publish this game on the Google Play Store, but getting the game ready for that was challenging since it needs a lot more polishing. From my point of view the game is not ready, the interface would need an overhaul, animations would need to be reworked, the feature spins would need to be improved, but overall I would say that it has quite some potential to be turned into a decent game.
Link to Github repo: https://github.com/Rahmid93421/Sweet-Fre.../tree/main
The main features implemented in the game:
Quote:Project
>assets (all of the assets used in the game)
>images
>misc
>sounds
>sprites
>scenes (the project has only 3 main scenes)
>scripts (all of the scripts needed for the core logic of the game)
...
var symbolValue = {
"respinSymbol": 3, # 3 symbols needed for a respin
"valueSymbol_1": 0.02, # each valueSymbol_n represents the value for 1 symbol popped
"valueSymbol_2": 0.008,
"valueSymbol_3": 0.005,
"valueSymbol_4": 0.003,
"valueSymbol_5": 0.002,
"valueSymbol_6": 0.001
}
...func _checkSymbols():
...
if(symbolsAppearances[symbolName] >= minSymbolsNum):
var symbolWinnings = (((betValue * symbolValue[symbolName]) * symbolsAppearances[symbolName])) # calculations based on the number of appearances of the symbol
...var baseWinChance = 0.35 # Base chance of creating a winning spin (35%)
var respinSymbolChance = 0.04 # Base chance of getting respin symbols (4%)
var minRespinSpacing = 10 # Minimum spins between respin features
var spinsSinceLastRespin = 0 # Track spins since last respin feature
var targetRTP = 0.96 # Return to player percentage (94%)
var winStreakFactor = 0.80 # Reduce win chance after wins (by 20%)
var lossStreakFactor = 1.20 # Increase win chance after losses (by 20%)
var consecutiveWins = 0 # Track consecutive wins
var consecutiveLosses = 0 # Track consecutive losses
var totalSpins = 0 # Track total spins
var totalBetAmount = 0 # Track total bet amount
var totalPayoutAmount = 0 # Track total payout amount
var currentRTP = 0.0 # Current calculated RTP