Skip to main content
Nyuron’s reward system encourages players to replay minigames and improve their scores by awarding coins based on performance. Coins can then be spent in the shop to unlock character customizations.

Coin Earning Mechanics

Score Multipliers by Minigame

Each minigame has a unique score-to-coin conversion rate:
MinigameScore MultiplierExample Calculation
Turtle Runner0.12000 points = 200 coins
Worm Catch2.580 points = 200 coins
Food Catch0.11500 points = 150 coins
MemoriceVaries by implementation-
Counting AnimalsVaries by implementation-
Nyuron ColorVaries by implementation-

Coin Award Implementation

Coins are awarded at the end of each minigame session based on the final score.

Turtle Runner (turtle_run/scripts/Main.gd)

func game_over() -> void:
    var final_score = int(score)
    if final_score > 0:
        var score_manager = get_node("/root/ScoreManager")
        if score_manager:
            score_manager.save_high_score("turtle_runner", final_score)
            
            # Award coins: score * 0.1
            var coins_earned = int(final_score * 0.1)
            if coins_earned > 0:
                score_manager.add_coins(coins_earned)
                last_coins_gained = coins_earned
Why 0.1x multiplier?
  • Turtle Runner scores scale rapidly (1000-4000+ range)
  • Lower multiplier prevents inflation
  • Keeps shop prices accessible

Worm Catch (worm_bucket/scripts/main.gd)

func _on_game_over() -> void:
    if score > 0:
        var score_manager = get_node("/root/ScoreManager")
        if score_manager:
            score_manager.save_high_score("worm_catch", score)
            
            # Award coins: score * 2.5
            var coins_earned = int(score * 2.5)
            if coins_earned > 0:
                score_manager.add_coins(coins_earned)
                print("Ganaste:", coins_earned, "monedas")
                last_coins_gained = coins_earned
Why 2.5x multiplier?
  • Worm Catch has lower score ranges (60-115 typical)
  • Higher multiplier compensates for smaller scores
  • Makes each successful catch feel rewarding

Food Catch (food_catch/main.gd)

func _check_game_over() -> void:
    if lives > 0:
        return
    
    if score > 0:
        var score_manager = get_node("/root/ScoreManager")
        if score_manager:
            score_manager.save_high_score("food_catch", score)
            
            # Award coins: score * 0.1
            var coins_earned = int(score * 0.1)
            if coins_earned > 0 and score_manager:
                score_manager.add_coins(coins_earned)
                print("Ganaste:", coins_earned, "monedas")
                last_coins_gained = coins_earned

Displaying Earned Coins

All minigames show earned coins on the game over screen:
func _show_game_over() -> void:
    title_lbl.text = "Fin del Juego"
    score_lbl.text = "Puntos: %d" % int(score)
    $UI/GameOverPanel/CoinsEarned.text = "Monedas obtenidas: +%d" % last_coins_gained
    
    panel.visible = true
    back_btn.visible = true
This creates immediate feedback and reinforces the connection between performance and rewards.

Coin Balance Display

The main menu shows the current coin balance in the top-right corner:
scripts/main_menu.gd
func load_and_update_coins():
    var current_coins = ScoreManager.get_coins()
    coin_label.text = format_number(current_coins)

func format_number(number: int) -> String:
    if number >= 1_000_000:
        var millions = number / 1_000_000.0
        return str(snapped(millions, 0.1)) + "M"
    elif number >= 1_000:
        var thousands = number / 1_000.0
        return str(snapped(thousands, 0.1)) + "K"
    return str(number)
This formatting keeps the UI clean:
  • 1250 → “1.2K”
  • 50000 → “50K”
  • 1500000 → “1.5M”

Spending Coins

Coins are spent in the shop to unlock customization items.

Shop Implementation

tienda/Script/store_menu.gd
func _on_buy_item(item: Dictionary):
    if ScoreManager.get_coins() >= item.price:
        ScoreManager.add_to_inventory(item.name)
        ScoreManager.add_coins(-item.price)  # Subtract cost
        
        update_coins()
        print("Comprado:", item.name)
        $SFX_Boton.play()
        
        # Update UI to show "EQUIPAR" button
        _show_item_info(item)
    else:
        print("No tienes monedas suficientes")
        $SFX_Incorrect.play()

func update_coins():
    coins_label.text = "Monedas: %s" % ScoreManager.get_coins()

Item Pricing

All shop items have fixed prices:
tienda/Script/store_menu.gd
var accesories = [
    { name="Corona", category="accesorio", price=25, ... },
    { name="Gafas", category="accesorio", price=15, ... },
    { name="Gorro", category="accesorio", price=20, ... },
    { name="Cadena", category="accesorio", price=50, ... }
]

var shells = [
    { name="Caparazón Azul", category="caparazon", price=10, ... },
    { name="Caparazón Verde", category="caparazon", price=10, ... },
    { name="Caparazón Purpura", category="caparazon", price=10, ... },
    { name="Caparazón Gris", category="caparazon", price=10, ... }
]
Price ranges:
  • Shells: 10 coins each
  • Accessories: 15-50 coins
  • Most expensive item: Cadena (50 coins)

Motivation Design

Replay Value

The reward system motivates players to:
  1. Improve high scores - Better performance = more coins
  2. Complete collections - Multiple items to unlock
  3. Express creativity - Mix and match customizations

Balanced Economy

The economy is designed to feel rewarding but not grindy:
  • One good run in Worm Catch (80 points) = 200 coins = 2 shells or 1 accessory
  • Turtle Runner high scores (2000+) = 200+ coins per session
  • Total shop cost: ~150 coins to unlock everything

Immediate Gratification

Players see rewards instantly:
  1. Earn coins at end of minigame
  2. Return to main menu (coin count updates)
  3. Visit shop to spend coins
  4. Equip items and see visual changes immediately

Score-Only Achievements

Some progression is tracked by high scores alone (no coin reward), documented in the Progress Tracking system.

Best Practices

Adding Coin Rewards to New Minigames

# 1. Store last_coins_gained for UI display
var last_coins_gained: int = 0

# 2. Calculate and award coins in game over function
func _on_game_over():
    var final_score = int(score)
    if final_score > 0:
        var score_manager = get_node("/root/ScoreManager")
        if score_manager:
            # Save high score
            score_manager.save_high_score("your_game_name", final_score)
            
            # Award coins (adjust multiplier for your game's score range)
            var coins_earned = int(final_score * YOUR_MULTIPLIER)
            if coins_earned > 0:
                score_manager.add_coins(coins_earned)
                last_coins_gained = coins_earned

# 3. Display earned coins in game over panel
func _show_game_over():
    $UI/GameOverPanel/CoinsEarned.text = "Monedas obtenidas: +%d" % last_coins_gained

Choosing a Multiplier

  1. Play your minigame and note typical score ranges
  2. Decide target coin earnings (100-300 coins per session is balanced)
  3. Calculate multiplier: target_coins / average_score
Examples:
  • High scores (1000-4000): use 0.1x
  • Medium scores (100-500): use 0.5x - 1x
  • Low scores (10-100): use 2x - 5x

Testing the Economy

# In ScoreManager.gd, temporarily add debug coins:
func _ready():
    load_high_scores()
    # add_coins(1000)  # DEBUG: Test shop with coins

Build docs developers (and LLMs) love