Skip to main content
This example demonstrates a complete on-chain game with characters, items, inventory, and gameplay mechanics.

Game Architecture

From examples/move/hero/sources/example.move:

Game Mechanics

Creating a Hero

Battle System

Inventory System

Admin Functions

Playing the Game

Key Game Design Patterns

1. Game instance isolation

2. Optional equipment

3. Consumable items

4. Battle events

Best Practices

1. Isolate game instances

Prevent cross-game interactions:

2. Use capability pattern for admin

3. Make progression meaningful

4. Emit events for game history

Next Steps