Basics Cookbook
This is a selection of code-snippets that use the basic techniques
introduced so far.
Feel free to copy or alter these to use in your own game.
Text in the code blocks can be cut and pasted into Ren'Py files.
Note: These examples should run as presented, but may contain
errors introduced by conversion and syntax highlighting for these
web pages.
- Naming the Player Character
- A safe way to allow the player to name their character.
- Debug tool
- A simple debugging tool to output debug messages while developing.
- Date and Period
- A simple calendar with day number, day of week, and period of day.
- Main Loop
- An outline main loop for sandbox and life sim style games where time is a factor and the player moves between different locations.