Simple messaging UI for mobile game

A place for Ren'Py tutorials and reusable Ren'Py code.
Forum rules
Do not post questions here!

This forum is for example code you want to show other people. Ren'Py questions should be asked in the Ren'Py Questions and Announcements forum.
Post Reply
Message
Author
User avatar
Nighten
Regular
Posts: 48
Joined: Fri Jan 26, 2018 12:29 am
Completed: Vincit, Sentiment Enneigés, The Devil took my Candies
Github: NightenDushi
itch: nighten
Location: France
Discord: Nighten#3081
Contact:

Simple messaging UI for mobile game

#1 Post by Nighten »

A simple messaging system for texting-based mobile game, such as "LifeLine" or "Bury me, my Love"; it's based on the NVL mode and it's really easy to use!

It's a follow up of my previous phone system, but with a vertical layout and some other improvements, such as choices directly available in the phone interface.
viewtopic.php?f=51&t=62837#p545278

Image

Instruction
- This project is optimized for 1080x1280 resolution
- Add the images and *PhoneTexting.rpy* to your project
- In this file, change the name of the main character to yours (MC_Name)
- Edit the nvl screen in screen.rpy as follow:

Code: Select all

screen nvl(dialogue, items=None):

    #### ADD THIS TO MAKE THE PHONE WORK!! :) ###
    if nvl_mode == "phone":
        use PhoneDialogue(dialogue, items)
    else:
    ####
    ## Indent the rest of the screen
        window:
            style "nvl_window"
            # ...
- Change gui.nvl_list_length in gui.rpy to None, so that all the message are shown
- Now you just have to make a NVL character speak :)
- To include emojis and pictures, you can simply use an image tag; make sure they are the right size for the phone screen.

Image

⚠ Note that the rest of the UI is not optimized for vertical game; you'd have to edit most of the screens to provide a pleasant experience to the player. I hope this phone will be a good starting point tho!
(in this project I only increased the size of some text to make it testable)

Browser demo on Itch.io
Mirror download on my website
Full source code on Github

If you have any issue or question, please let me know! I hope this will help you :)
I made this originally for a friend but I figure it can maybe help some of you!
If you need help with your project, you can hire me as a programmer! :D

Image ImageImage

User avatar
ghostclown
Regular
Posts: 28
Joined: Sun Oct 11, 2020 2:33 pm
Projects: R. I. P. Tour
itch: ghostclown
Contact:

Re: Simple messaging UI for mobile game

#2 Post by ghostclown »

Thank you for this! I've been trying to figure out how to get the NVL choice menu into a phone-like interface for ages now.

Post Reply

Who is online

Users browsing this forum: bloodzy