Navi - a message library (6/11 demo)

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
litearc
Citizen
Posts: 57
Joined: Thu May 17, 2012 12:40 am

Navi - a message library (6/11 demo)

Post by litearc » Mon May 21, 2012 1:48 am

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:
- adjust width of message
- 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.

Alright, enough talking. Here's the download. Thanks!
Attachments
navi.zip
(289.11 KiB) Downloaded 661 times
Last edited by litearc on Wed Jul 17, 2013 6:35 am, edited 5 times in total.

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

Re: A message system

Post by SiENcE » Mon May 21, 2012 10:52 am

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 .

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

Re: A message system

Post by litearc » Mon May 21, 2012 12:05 pm

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.

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

Re: A message system

Post by Ellohir » Mon May 21, 2012 12:35 pm

This is awesome :ultrashocked:

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

Re: A message system

Post by Nixola » Mon May 21, 2012 12:59 pm

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
lt = love.thread
li = love.image
lg = love.graphics

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

Re: A message system

Post by SiENcE » Mon May 21, 2012 4:02 pm

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.

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

Re: A message system

Post by litearc » Wed May 23, 2012 4:54 am

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
message_system.png (24.48 KiB) Viewed 8542 times

User avatar
Roland_Yonaba
Inner party member
Posts: 1563
Joined: Tue Jun 21, 2011 6:08 pm
Location: Ouagadougou (Burkina Faso)
Contact:

Re: A message system

Post by Roland_Yonaba » Wed May 23, 2012 10:14 am

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
Untitled 1.jpg (84.17 KiB) Viewed 8526 times

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

Re: A message system

Post by coffee » Wed May 23, 2012 11:23 am

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

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

Re: A message system

Post by T-Bone » Wed May 23, 2012 12:27 pm

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'


Post Reply

Who is online

Users browsing this forum: Google [Bot] and 61 guests