question

Matt avatar image
Matt asked

In-Game Mail System

Hey folks,

I'm just curious how people are generally handling this type of feature. I plan to send a message to all users whenever there's a relevant event (such as an update, balance changes, etc). I'd also, potentially, like to send an in-game mail when there are specials in the shop. I'll be attaching some currencies also (that'll just be some flag in the message itself, so that's not really a big deal).

I imagine there are various limitations, for instance a cap on how many KVPs I could use if I were to save these messages in user data. Also, I've seen games with a Language option in settings, which I think I'll need in order to localize these messages since they aren't coming from the devices themselves. I only bring that up because all of these messages are being handled from...Cloud Script?

Thanks!

Matt

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
brendan avatar image
brendan answered

We'll be providing a generic message system in a future update, for custom messages to users. For the generic messages (like game updates, etc.), we'd recommend using the Title News and/or Title Data systems, since that allows you to do a single update which will be visible to all users right away. A number of titles use that now, to drive in-game events and special offers.

For more custom messages, you could potentially set some player data with a distinct message, but you are correct that you would need to reserve the key/value pairs that you want to use for this, as you do have a finite supply to work with. If there's some complex logic that requires server authority in creating these messages (as opposed to a simple template system where the client can swap in Username, etc.), you could do that via a Task that triggers a short Cloud Script, though bear in mind that Tasks cannot run at infinite speed - for any non-trivial size player population, there will be some period of time between when the first user has the message set, and when the last does.

For localization, one of the more common techniques is to use some form of tag that indicates to the client (or server) which string to use (like "Greeting01") which you can then look up in your localization file(s) - which you could distribute to players via the Content service.

6 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Matt avatar image Matt commented ·

Thanks for the info Brendan.

So I guess my first question would be the notorious...'when do you think that system will go live?'. I know it's impossible to really predict, but if you think possibly within 3-4 months, I'll simply put my task on hold.

I've done localization in the past by having a file, shipped with the game, and then using tags to read the appropriate strings. These messages aren't going to be predetermined before I ship though, so I wouldn't be able to include them in my localization file. Luckily, I haven't done localization work yet, so I'll also have to take a look at how to use the CDN for this purpose.

I think I need to narrow down exactly what I want to do with the mail system. If I want to track whether the player has read and deleted the message, or opened their rewards, the UserData option sounds more appealing to me. It also seems more future-proofed to me, just in case I want to get fancy later on. I like the Title News idea, but that seems more like a News Bulletin and less like an inbox.

0 Likes 0 ·
brendan avatar image brendan Matt commented ·

Sorry, but until we have something in active development, we do not provide any dates. As a live service, our schedule can (and does) change frequently, to make sure we're addressing the most critical needs. So to avoid setting a false expectation (which could then make you miss a date), we simply do not go there. Instead, you should always consider that the functionality available for your title's launch is what is live in the service while you are in development, though if we have specifically announced something upcoming, you can plan for that. I realize this does mean that occasionally we'll produce a feature where it would have saved you some time and effort if you had known it was coming X amount of time prior, but that's going to be unavoidable, as it's critical that we not impact someone's schedule by saying "such-and-such feature will probably be in the next three months", and then we miss that date.

For user data, bear in mind that it's going to be a fairly limited inbox, given a) the limited number of keys, and b) the fact that you cannot have a large number of players accessing the same user data (it's not sharded or cached, as it must be consistent).

0 Likes 0 ·
Matt avatar image Matt brendan commented ·

I'm pretty sure I can fit my design into 10 KVPs (UserReadOnly to be specific). I think I'd save a timestamp with each and just replace old ones.

Do you think TitleNews would be a better option, bearing in mind that I still do want the player to be able to open/delete/reward the various messages?

0 Likes 0 ·
Show more comments
Canberk Soner avatar image Canberk Soner commented ·

Is there a feature request we can vote on for this?

0 Likes 0 ·
Andy avatar image Andy ♦♦ Canberk Soner commented ·

Sort of. I found a couple that are related:

We're definitely aware of the request, but don't have anything more to discuss about it right now.

0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.