- 1. Getting Started with OdyC
- 2. Naming Your Game
- 3. The Hero
- 4. How to Draw?
- 5. The Map
- 6. Dialogues
- 7. Sound in the Game
- 8. Advanced Template Parameters
- 9. Camera Control
- 10. Integrating Events
- 11. Event Target Manipulation
- 12. Dynamic Hero Modification
- 13. Modifying a Cell
- 14. Global Model Modification
- 15. Orchestration of Dialogues, Sounds, and Endings
- 16. Dynamically Loading Maps
Now, let’s start customizing your game. We’ll begin by adding a background color and a title.
To add parameters, you need to tell the createGame
function what you want your game to look like.
Here’s an example:
Note
Every time you modify the code, the game restarts from the beginning. When a
title
parameter is provided, you need to press space or enter to bypass the title screen.
For the background
property, you can specify any number between 0 and 9. Each number corresponds to a different color. If the default palette doesn’t suit your taste, you’ll learn later how you can define your own colors.
Keyboard shortcuts for adding curly braces:
On Mac:
{
: Option + (}
: Option + )
On PC:
{
: AltGr + 4}
: AltGr + 9
Loading editor...
createGame()