Skip to content

Latest commit

 

History

History
53 lines (27 loc) · 2.26 KB

Recipes.md

File metadata and controls

53 lines (27 loc) · 2.26 KB

Recipes and Examples

The following are some basic examples of common ways to implement inventories in games. These examples are intentionally minimal and basic; real-world examples of the presented mechanics will probably require a great deal more polish.

Collectibles

Collectibles like medals can be used to enhance and reward player exploration, or as a generic reward for solving puzzles or completing other challenges.

This recipe shows how you can create basic collectibles, and use events to automate rewards for earning collecting them.

View the twee source code.

<iframe height="400px" src="recipes/collectibles.html"></iframe>Open in new tab.

Crafting

This recipe illustrates a very basic crafting and gathering style game.

View the twee source code.

<iframe height="400px" src="recipes/crafting.html"></iframe>Open in new tab.

Equipment

This recipe shows how to create a basic equipment system.

View the twee source code.

<iframe height="400px" src="recipes/equipment.html"></iframe>Open in new tab.

Keys

Key style items are very simple to create and use. Here's an example of the player being able to find an important item that can be used to advance.

View the twee source code.

<iframe height="400px" src="recipes/keys.html"></iframe>Open in new tab.

Potions

Examples of some basic consumable items, like potions that can restore the player's HP.

View the twee source code.

<iframe height="400px" src="recipes/potions.html"></iframe>Open in new tab.

Shops

This recipe shows how you might handle basic buying and selling.

View the twee source code.

<iframe height="400px" src="recipes/shop.html"></iframe>Open in new tab.