How do I make email system emulation?

0 favourites
  • 3 posts
From the Asset Store
Create complex dialogues with ease with this tool/template!
  • Hello, guys! I am generally new in working with extended features like JSON, XML and other like-this stuff, so I don`t know what to choose and start learning.

    I am going to make a system, which emulates real-working email-service. I want to see in my game functions like this:

    • Getting new mails from AI(totaly scripted)
    • Deleting mails by user
    • All emails that weren`t deleted should be showed until their deleting
    • Answearing for some of them with 1-2 options

    What I should better use to make something like this?

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Interesting question. The premise reminds me of a game, but I can't quite remember the name of it. I think the premise is you find a phone and have to find out about the owner by sending messages to their contacts, looking at their photos, etc.

    Some of the requirements have parallels to a dialog system, which Laura has been writing a tutorial series about.

    I would probably create a JSON file with the data for your emails in, something like this:

    {
    	"first_email": {
    		"subject": "Welcome",
    		"from": "auto@ai.io"
    		"body": "Hello",
    		"responses": [
    			{
    				"body": "Hello to you too!,
    				"trigger": "second_email"
    			}
    		]
    	},
    	"second_email": { ... }
    }
    

    Each email is keyed with a textual ID, so you can easily look it up. Then the email object itself contains the various bits of text you would want to display on the screen but it also contains an array of response objects. The responses basically being a body of text and an ID of another email which the AI sends back to you. Allowing for a branching dialogue tree.

    In terms of saving what emails are visible you just need an array of the email IDs which are visible. To "delete" an email remove it from the array. When an email is "received" add it to the list. You should be able to quite easily save that array to localstorage to persist the game state between sessions.

  • Interesting question. The premise reminds me of a game, but I can't quite remember the name of it. I think the premise is you find a phone and have to find out about the owner by sending messages to their contacts, looking at their photos, etc.

    Some of the requirements have parallels to a dialog system, which Laura has been writing a tutorial series about.

    I would probably create a JSON file with the data for your emails in, something like this:

    > {
    	"first_email": {
    		"subject": "Welcome",
    		"from": "auto@ai.io"
    		"body": "Hello",
    		"responses": [
    > 			{
    > 				"body": "Hello to you too!,
    > 				"trigger": "second_email"
    > 			}
    > 		]
    	},
    	"second_email": { ... }
    }
    

    Each email is keyed with a textual ID, so you can easily look it up. Then the email object itself contains the various bits of text you would want to display on the screen but it also contains an array of response objects. The responses basically being a body of text and an ID of another email which the AI sends back to you. Allowing for a branching dialogue tree.

    In terms of saving what emails are visible you just need an array of the email IDs which are visible. To "delete" an email remove it from the array. When an email is "received" add it to the list. You should be able to quite easily save that array to localstorage to persist the game state between sessions.

    Thank you! Nice idea and explanation! I am glad to see how Scrira`s workers helps to deal with their products. You are rally great developers and people, guys!

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)