- 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
In a narrative game, the timing and order of dialogues, sound effects, and game endings play a crucial role in the player’s experience. The standard method involves:
- Playing a sound.
- Displaying a dialogue.
- Executing the event function.
- Concluding with the end of the game.
However, this sequence might not be ideal in all situations. That’s why the game context provides access to specific methods: openDialog
, playSound
, and end
, allowing you to customize the order and timing of these elements.
Advanced Usage
In some cases, you might want to take full control over the execution order to enhance a narrative moment or highlight an important action:
This approach allows you to weave complex sequences where each element - dialogue, sound, and conclusion - contributes to an immersive and memorable experience. Feel free to experiment with these methods to enrich the narration and emotional impact of your game.
Loading editor...
const bnm = ` ...00... ...00... .000000. 0.0000.0 0.0000.0 ..0000.. ..0..0.. ..0..0.. ` const game = createGame({ player: { sprite: bnm, }, templates: { B: { sprite: bnm, } }, map: ` ........ ........ .....B.. ........ ........ ........ ........ ........ ` })