## Navi - a message library (6/11 demo)

litearc
Citizen
Posts: 57
Joined: Thu May 17, 2012 12:40 am

### Navi - a message library (6/11 demo)

Hi everyone! This is the latest version of Navi, a message library for LOVE. I've been working on this for a few weeks now and it has pretty much all the features I want. I initially planned to create an RPG construct ('arc') that included the message system here, but given my time commitments, that may have been an overly ambitious project likely to fail. I started with the message system, and thanks to the members of this board who pushed to make it as independent and self-contained as possible, I have at least something to release and contribute instead of a project that's larger but incomplete.

Navi is simple to use and well-contained, so it won't clutter your workspace. It creates two objects, 'arc', which stores resources used by Navi (and possibly shared by future libraries), and '_navi', the message class. It has a wide range of features, which can be used either by string formatters or a table of options. Here is a general overview of them (if you want a more detailed description, look at the manual.txt file included with the game):

Formatters:
- change text color
- insert a newline
- continue message in the next message box
- pause message until player presses a key
- pause message for a certain amount of time

Options:
- align message horizontally and vertically
- end message with either a keypress or a wait
- make message not skippable
- adjust message speed (can make message instant)
- have message box or no message box
- include name or face picture in message
- include an animated "blinker", which indicates to press a key
- make messages scroll
- includes choices at the end of the message
- fix the number of rows in the message

Again, look at the manual.txt file for more info and how to use these features. The demo shows some of them off, so you can look at the code there also.

No one else has tested this version so far, so there is a high chance there are still bugs, so if you find any, please let me know. I haven't set up a github yet (like I said I would 10 times by now) because I'm too lazy to learn how to use git. For now, just post any problems here or send me a PM - I may setup a github in the near future. Also let me know if you have any suggestions or requests for other features, and if they're not difficult to implement, I'll add them in.

Attachments
navi.zip
Last edited by litearc on Wed Jul 17, 2013 6:35 am, edited 5 times in total.

SiENcE
Party member
Posts: 791
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

### Re: A message system

Nice!

It works on both 0.7.2/0.8.0 but stops on "asking for a keypress," !?

You have an bloc and message class. I would suggest to create classes from the whole system (esp. draw_text,draw_list,play_messages,unformat) and an easy way to integrate it .

litearc
Citizen
Posts: 57
Joined: Thu May 17, 2012 12:40 am

### Re: A message system

O, sorry, you have to press 'z' to continue. I should have put that at the beginning. I'm not sure what you mean by create classes from the whole system though.

Ellohir
Party member
Posts: 235
Joined: Sat Oct 22, 2011 11:12 pm

### Re: A message system

This is awesome

Nixola
Inner party member
Posts: 1949
Joined: Tue Dec 06, 2011 7:11 pm
Location: Italy

### Re: A message system

I needed something like this for an RPG I was going to develop for PSP, I'll try to adapt it to LuaPlayer HM7, thanks!
lf = love.filesystem
ls = love.sound
la = love.audio
lp = love.physics
li = love.image
lg = love.graphics

SiENcE
Party member
Posts: 791
Joined: Thu Jul 24, 2008 2:25 pm
Location: Berlin/Germany
Contact:

### Re: A message system

litearc wrote:I'm not sure what you mean by create classes from the whole system though.
Why not putting draw_text, draw_list, play_messages, unformat also in a class? Otherwise they are gobal and might conflict other peoples projects.

litearc
Citizen
Posts: 57
Joined: Thu May 17, 2012 12:40 am

### Re: A message system

Got it, will do. Also, an update on the (small) progress made. I added the following options:

- message box around the text
- text alignment (in both x and y directions), i.e. left, top
- display name at the top of the message

The screenshot below shows an example that uses all these options at once. I also made a lot of the arguments optional since there started to be too many and I want to keep things simple. I won't put up the release just yet but will do so after a few more features are added.
Attachments
message_system.png (24.48 KiB) Viewed 8551 times

Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Contact:

### Re: A message system

That's becoming really sweet. Fact is, I was about to propose the message box.
Could you make it so that one can decide to display the message in a box or in full screen, with a custom back color backColor (the game will be paused then).

Another feature, that i've seen in most of the RPGs, when a person is peaking, there is an indicator blinking, to let the player know he has to tap a key to enable the remaining part of the text.

You can easily add that feature, too.
Attachments
Untitled 1.jpg (84.17 KiB) Viewed 8535 times

coffee
Party member
Posts: 1206
Joined: Wed Nov 02, 2011 9:07 pm

### Re: A message system

Roland_Yonaba wrote:Another feature, that i've seen in most of the RPGs, when a person is peaking, there is an indicator blinking, to let the player know he has to tap a key to enable the remaining part of the text.

You can easily add that feature, too.
That would do the trick as also technocat (I think it's from him) did in his Message in a Bottle https://love2d.org/wiki/Message_in_a_Bottle

T-Bone
Inner party member
Posts: 1492
Joined: Thu Jun 09, 2011 9:03 am

### Re: A message system

Also, if you could add a way to have a picture of the person currently talking on the left side (very common in RPGs) that would be awesome.

Try to put everything in a single .lua file, that can be used something like this:

Code: Select all

messagesystem = require 'messagesystem'



### Who is online

Users browsing this forum: No registered users and 52 guests