Chapter 13Inventory and Power-Ups

Badly wounded by the goblin, the hero reaches into their backpack. Uncorking a terrible smelling potion and drinking it, their wounds close. Refreshed, the hero is ready to return to the good fight.

This scene is a staple of modern fantasy games: the adventurer finds an item on the map, stores it in their inventory, and then uses it later when needed. Substitute the smelly potion for a healing system controlled by sympathetic nanobots, and you have a similar game mechanic for a sci-fi game.

With items and inventory systems, you can add variety to your game. Players can now make tactical decisions based on item use—they’ll need to consider whether it’s worth the potential injuries to reach an item despite the ...

Get Hands-on Rust now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.