A simple browser-based trading game with RPG elements.
- Player movement with arrow keys
- Inventory system with item collection
- Trading system with NPCs (press 'E' near an NPC to trade)
- Chat system
- Health and mana stats
- Different item types (herbs, coins, gems, scrolls)
- Open
index.htmlin a modern web browser - Use arrow keys to move around
- Walk over items to collect them
- Press 'E' near NPCs (yellow circles) to trade
- Use items from your inventory by clicking on them
- Chat using the chat input at the bottom right
The game is built using vanilla JavaScript and HTML5 Canvas. The codebase is organized into three main files:
index.html: Main game structure and UI elementsstyles.css: All game stylinggame.js: Game logic and mechanics
- Arrow keys: Move player
- E: Interact with NPCs
- Click inventory items to use them
- Enter: Send chat messages