Saturday, December 28, 2013

Dialog System almost done



I've done a nice progress on the dialog system, not as fast as I would like but now I can begin to work on the script and try it right away.

Here are the current features:
- Almost everything gets resized depending on the screen resolution, characters keep aspect ratio while the other objects don't.
- Almost everything is customizable from the inspector
- All text include a shadow to improve its readability.
- A main background for the scene or no background at all.
- A textured container for the main dialog, using an alpha unlit shader.
- Pressing the accept button makes the dialog go faster.
- Animated icon to notify the end of the paragraph.
- Manual mode: Pressing the accept button at the end of paragraph makes it jump to the next.
- Auto mode: Automaticaly jumps to the next paragraph after a specified time.
- Container parameters: Max number of lines per paragraph, nÂș of letters per cycle and letter speed (defines the cycle).
- The dialog lines get auto-formated based on the container parameters.
- Clickable buttons which can have text, texture, pressed texture and/or pressed color.
- Dialog lines can use the buttons to request different answers from the player that can lead to different lines.
- Dialog flow/lines are comfortably entered through the inspector.
- Other dialog actions available are: clear the scene from characters or just clear one anchor.
- Characters with many different looped or 1-time animations.
- Characters can be anchored to different specified positions, anchors are unlimited.
- 1 character per anchor, when a character gets anchored to a position, the previous character on that position dissapears.

Coming soon:
- Calculate the number of letters per line depending on the container size.
- Automate text-shadow.
- Improve encapsulation (one thing I hate about Unity).
- Show only on orthographic camera
- Multiple backgrounds that can get called from the dialog lines.
- Transitions between multiple backgrounds.
- Movable characters.
- Extra animated character parts (like mouth and eyes)

Could be implemented:
- More dialog actions, like tremor or other effects.
- Load/save dialog flow from/to xml.
- Divide the text-meshed to a small enough size to get auto-batched. (Not really worth it right now)
- Use shared materials to avoid editor-mode error messages (doesn't affect while playing)
- Animated texture for the container and buttons.
- Animated backgrounds.
- Animation/transition for character scene enter and scene exit.

No comments:

Post a Comment