TEMPLATE/MODULE : Doors

Started by Monsieur OUXX, Sun 17/03/2013 16:00:25

Previous topic - Next topic

Monsieur OUXX

Hello everyone, young and old, tall and small.



I made a little module to help you manage all the doors in your game. Since it relies on custom properties, I also provided a template so that you don't have to type them manually into the Editor.

You're gonna say: "managing doors is easy, why would I need a module?"
Yes. But there are tricky things with doors :

First of all, a door is not as straightforward as it sounds. Think of all the things you might need for one single door:
- that boolean used to save the door's state (open/closed)
- the two images (open door, closed door)
- you might want to change the baseline of the door when it's open or closed, so that the character can walk behind it (see the video)
- the door might need to have walkable areas enabled or disabled when it gets opened or closed
- you need to play the open/close sounds
- you want to character to walk to the door before he interacts with it (you'll need a pair of coordinates)
- you want him to face the correct direction
- you want to have default sentences ready to say when the player does something stupid (e.g. pick up the door)
- you want the character to change room when he enters the door, and you want him to appear at the correct coordinates.

Phew.

Also, you might have requirements coming from your development process:

- You might want to separate as much as possible the scripting from the room's design (imagine you ask your artist to script the doors of the room he/she just drew. There's a 50% chance he/she'll insert a non-trivial bug that will be discovered 6 months later in the final release).
This module allows him/her to manage a door entirely with only 3 lines of code.

- You might want to avoid copy and paste as much as possible to avoid cluttering your room scripts.

This module allows you to manage a door entirely with only 3 lines of code.

You'll notice that its design is a bit similar to the design of the 9-verb template, but it is much more thorough in implementing all the properties required for doors.

Video tutorial - part 1
Video tutorial - part 2

Download 1.0
The download includes :
- the demo game sources
- the compiled demo game
- the template (and the modules files if you want to go the manual way)
- the manual
 

Anian

Not yet using this, but THANK YOU.
It even has a tutorial, which is very nice.
I don't want the world, I just want your half

SMF spam blocked by CleanTalk