Yet another noob with a plan (and looking for a game engine)

I am working on producing a system for IF/ARG style games using text messaging as the medium. I believe that this is an “under used space” and that some really engrossing games could be built in it. My sense is that the games would be played with sparse interactions in real-time. A short game might be played over 5 days with 3-5 bursts of communication a day. I believe that modelling real communications patterns coupled with the use of real text messaging could be compelling. I also believe that in this case the medium matters. I believe it makes a difference if someone is using an app that simulates text messages vs. actually using text messages. I also like the idea that a real-time text message game could be played anywhere and anytime (almost). People routinely answer texts in school, business meetings, etc. And as a bonus, you’ve already installed the app on your phone.

My existing platform runs as a server, as in I start a program when I’m working on it and it checks for messages that have been sent to it, processes them and sends the responses. Obviously at some point it will run 24/7 but can be located anywhere – not needing to be a real server. It is designed to serve multiple games and multiple users via multiple transports. Only a single instance of any game is loaded into the system, player context is loaded when a given player’s input is being processed, and then it is persisted when done. Currently I’m focused on two main transports – local console and phone-based texting via email-to-text gateways. The system processes messages by loading an inbound queue, processing messages from the inbound queue to the outbound queue, and transmitting outbound messages. Pretty simple. The processing section has three main steps – 1 game specific C# preprocessing, 2 game specific chat bot processing, and 3 game specific C# postprocessing. Step 2 is a chat bot that includes XML scriptable processing.

The chat bot is extendable and I have largely limited efforts to developing simple interactions (not yet games) using only step 2. Some of this is using the native functionality and some by developing gaming extensions to the base scripting language. In the end I believe that I will be able to develop whatever complex game specific functionality is required as extensions to the bot tech and have the authoring system output the bot script. But it would be great to be able to fast track some of the development and testing of the text message game idea itself by using an existing engine. Using the same flow but flipping the emphasis, I could do little to nothing in step 2 and “drop-in” an engine in step 3 and have that simply play the game, getting user input and spitting out the response.

I’m looking for suggestions about what might be available in a C#/.Net drop-in engine. I would of course want something that could do text only (for now, mms works fine, but I’m saving that for later) and be easily divorced from it’s front/back-end. I’m also running in “single step mode” meaning that I would need to be able to readily, load game state, interact once, and then save the game to and from data streams I would manage. I realize I’m looking for some magic here, but who knows. My long-term plan is to develop an engine/authoring system geared specifically for conversation-based games, but I also want to open the door for non-programmers to begin playing with the concept before then.

Thanks,
Rich.

Ink fits your description if what you’re looking for is a choice-based engine. Or an engine where user input can be boiled down to selecting from a set of available choices.

If you want to accept arbitrary text input (or as arbitrary as SMS/text messages get), that’s hard. A hard design problem, I mean, quite aside from implementation questions.

if i understand correctly, you plan to send everything over real SMS, not a fake SMS-lookalike app.

That being the case, you’ll have to parse the responses. Of course, if those are just a choice response, it’s easy, but my feeling is mostly it won’t be if the system is to have the feel of real communication.

I also think this won’t be like a normal IF game, so perhaps an existing .NET IF engine won’t be right. You might have to start building something custom yourself.

A lot will also depend on the game subject domain. For example, some years ago i was in discussion of a similar idea for a Risk/Diplomacy style game. Which would work with turn based moves, perhaps over email;

The idea was that your responses could be narrowed down to a very limited repertoire involving things like “invade X”, “offer truce with Y”, “offer pact with Z”, “accept alliance with W”. etc etc.

Using a limited domain meant that parsing plus a bit of guesswork would almost always get the right player move.

If instead your game involves arbitrary conversation with machine simulated people, you have a bigger problem.

jkj yuio and zarf thanks for your replies.

So yeah, I’m looking to chase the “bigger problem” and yes, if I talk to the user about train schedules from Prague to Munich and the user comes back with “did you see the movie the Martian” the game is going to have to vamp. On the other hand I’ve done some experiments that didn’t go horribly. There are a lot of considerations and the game won’t (generally) come down to issuing commands like “go north”. It will be conversational. It is about advising an NPC or hearing a clue in something they say. It is more about what is said than what is manipulated. I am basing this on a bot library meant to deal with these problems although in a different context. Part of the challenge is technical and part is writing in ways that lead or drive the user in specific directions. But I will have to parse the responses as they (in general) should not be simple choices. In one of my early tests, a play tester with no information about what was happening got stuck almost instantly by asking a really obvious question that I had missed completely. But once I added that line of questioning to the game, the rest flowed well. There will be some new skills and some new approaches.

One could play Zork over text messages, but that’s not this. I am developing my own engine and my own authoring format(s) but this is new and I don’t have a good sense of what the final form will be. For now I’m writing in SIML a bot specification language (XML) which allows for non-exact matching with entity extraction and the like. I was hoping to do some short cutting to do concept testing by using the bot to handle the interactions and let an existing game engine handle world management. But that might be a meaningless set of tests. This may be one of those cases where you have to do the whole thing before you can test anything.

Thanks,
Rich.

Are you still thinking about this venture? I had an inkling of something similar a few years ago, but it went nowhere.

There’s one possibility that occurs to me. Every game starts with the player getting an incoherent message. It becomes clear the engine i.e. the person on the other end of the line, speaks little or no English. The player has to sort of ‘train’ the engine. In fact, the engine is training the player a small range of nouns and verbs that it will understand, then the game can proceed like a normal text adventure. This possibly means that if you can hook the text message input/output up to, say, Inform, it saves you a lot of work.

Having said that, Inform games on a phone via xyzzy are a bit like that. You’d have to have some additional ARG-like features. Wanna discuss? - We could do it in public on intfiction, and perhaps attract some wise heads.

Gil

This message transferred from private messages
Rakar said:

I suppose you could call me a full-stack developer. I published a book on interactive fiction. Though I have stood on the shoulders of AGT and Inform for my most enduring games, I have also developed full engines for Atari800, Java Applet, and Android Java. In all these latter cases, the platforms have moved out from under me, and I didn’t pursue them.

Iceweb, written in Inform7, is my latest, published in Mythaxis, which I also edit.

I am usually fully committed to one thing or another (I’ve just delivered a control system for model railway turntables, based on Arduino), but I can be amazingly productive in short bursts.

I’ll get stuck into the concepts you are exploring - a group I belonged to started to develop a sort of ARG based on burner Android mobiles being left in public places to be picked up by members of the public. The idea was that the finder would discover a conspiracy being developed in emails and data files on the mobiles, but the feasibility tests demonstrated that the phones were either returned to the owner address, or stolen, rather than ‘played’ in the simple arg we’d placed on them.

What we discovered was that even the simple ARG we developed for beta testing involved lots of hard work in building the imaginary situation, and real-time/real person responses and events, so your idea of limiting the interaction to automated texts and emails has some merit.

Explain to me in more detail what you’ve done so far. Are you happy to keep discussion to private message so far?

Transferred from messages:

rakar said:

I’ve done a quick run-through of :

https://www.codeproject.com/Articles/866760/Add-a-Chatbot-to-a-Csharp-application-using-SIML-S

SIML’s own site didn’t give me a clue how it all worked, but that article was excellent.

I can see that you have the power to implement a sophisticated user input parser in SIML, and responsive output. I guess you are joining this to text/email I/O. I think you’re halfway there.

Presumably you can detect the source address of incoming texts and vary the destination addresses of outgoing ones.

I now see that your main problem is likely to be plotting, and part of that is going to be making sure you are limiting the player’s ability to go off-piste and start inputting stuff you can’t parse! Perhaps, if you can see that happening, you can step in in real time and, pretending to be the bot, put them back on the rails? You’d have to be alert. Will you be able to run multiple simultaneous games on a dll? Is your bot-driver parked on a Windows host?

Are you likely to want the player to take action in the real world as many ARGs do? Most ARGs rely on humans at the other end of the interface to play the parts, set up meets, discover real world treasures etc. You could leave clues and rewards on created odd (free) blog websites, in which you could introduce some colour and image. Also, you could refer the player to other people’s real-world websites for clues etc.

Anyway, I guess what you want me for is some game design. Am I right?

From Private messages,

rakar said:

Ouch! that SIML code is pretty extensive for a simple situation. Inform, with its libraries, presets etc. could execute that ‘game’ in a couple of lines. I can see why you’d want a language with compiler. I gather SIML has the facility to do regular expressions. That’ll be helpful. I’ll give some thought to a language spec which bears in mind the restrictions of text.

I want to mention a couple of things about what constitutes a “game” in my platform and the eventing issues I’m working on. Since the game is “server” based, the game is actual code. I create a game specific class and game specific data class in c# that gets compiled in into a DLL. That means that all of the game implementation could be in c# in which case there is no limit or issue to what I want to run, no eventing issues, etc. But I expect that the development will be more accessible in some other form, so I’m pushing for a pure SIML implementation (almost there) and in the end serious games will most likely be a hybrid, with some game specific functionality in c# either in the form of custom adapters or just straight code. Currently the code and data for CoD are essentially empty, beyond constructors an a single line serialization function.

Long term I would expect Informish gets translated to custom SIML during development and then at some point (maybe) it gets converted to code.
I expect I will also produce a generic wrapper that will load any “SIML only” game.
[Edit] Without realizing it, I already produced the generic wrapper - funny how that stuff happens.

I just started a wiki for this project and put up a few notes about conversational flow control.

yes, but if this works, the xml is no issue.
Either the xml get’s optimized, or there is some translator, or who knows what at the moment.
Frankly I (a coder) like a little more white-space and structure.

O Romeo, Romeo, wherefore art thou Romeo?Yo! Dude where are you?
say “[one of]O Romeo, Romeo, wherefore art thou Romeo?[or]Yo! Dude where are you?[at random]”.
<x:Random value=“O Romeo, Romeo, wherefore art thou Romeo?|Yo! Dude where are you?” />
say random(“O Romeo, Romeo, wherefore art thou Romeo?”,“Yo! Dude where are you?”)
say next(“O Romeo, Romeo, wherefore art thou Romeo?”,“Yo! Dude where are you?”)

I haven’t checked the Wiki yet, but on the basis of your next but two posts, I’m interpreting what you are saying is that a game finishes up as a C#-generated DLL which may have a large component of SIML in it. The C# entity ensures that you get a clear unique connection between a player and the game. i.e. However many players are playing the game, they each have their own ‘saved’ position and no two players are playing the same instance of the game. Can one player (i.e one text address) be playing multiple games?

I’m reading that from the point of view of game development, it would be handy to have an engine that translated Inform-like definitions of Rooms, Objects, Non-player characters, into SIML, and to have a library of SIML for the common Verbs, but that almost anything could be done by hand-crafting C# and SIML for a particular game.

I’ll look at the Wiki now in case my questions have been answered.

Later:
OK. It looks as if all my questions have been answered. By the Wiki, I mean.

A moral question:

Presumably this system could send a text to a selected telephone number, and start to immerse the unwitting recipient in the interchange.
I can see that power being useful to, say, pranksters, political lobbyists, stalkers etc.

So I have to suggest that the player always be the first to initiate an interchange, in the full knowledge that this is a game. Nevertheless, an unwitting person might be tricked into participating by suggesting on Twitter or Facebook etc. that they text a particular number (to receive a prize etc.) unless there is always a WARNING message at the front of the game.

While everyone with a phone is able to play these games, they may be unaware that they can, unlike people who download a text adventure app.

What’s your strategy for dealing with people who telephone the apparent number in an attempt to speak to their correspondent?

Perfect timing on that post…

The system is inherently call/response. The user starts a cycle in the strict sense. There is a slight question of what a cycle is. For instance things always start with the human messaging the game, then the game generates a response which is typically sent directly back to the player - rinse/repeat - by which I mean the game then persists state and literally doesn’t consider that player again until it receives another message.

There is a bit of an exception though. The response can be a compound and/or delayed response. The generated response is text. I have code that splits that response (on ‘|’ chars) into multiple pieces. Each piece can be either text or a command. The commands I have at the moment are DELAY and UNTIL. Both of these are scheduling commands which will delay some amount of time, or wait until a specified time of day (both have ways of specifying a range like delay for 1-2 hours randomly chosen within the range, and they can be combine to delay after a specific time, or wait for a specific time after a delay which can force date roll overs). This allows the generation of a message that goes out to the user now and then at some later time/date triggers a delayed message.

There is an additional twist. Delayed messages are not sent to the user, they are queued and sent back into the system at the appropriate time. This allows for the system to make decisions about how to process the delayed trigger. For example, you may want to announce the result of an action to the player in the morning, but maybe some intervening event will effect that result. This allows you to simply parrot back a message or consider what that message should be for blindly sending something back. This does allow for creating problematic games, but why do that. If I wanted to just spam phones I could do that now, without needing to go to the bother of developing a game.

The initial signup/trigger/whatever that gets the ball rolling would cover my ethical concerns. Spamming is a different (non-game related) problem.

Currently I’m using an email address to handle the comms, so there is no actual phone number. With some other gateway I’m sure calls would just be ignored.

So what about the “perfect timing”… Just yesterday I created the initial “Text blah blah blah to blah blah in order to start playing the game,” code. It performs both user setup (just enough to play a game, no preferences yet), game selection (you must know the name of the game you want to play), and game state reset.

Thanks,
Rich.

Excellent answers. Great minds think alike.

Probably a viable game, by the way, might be built with the user only replying Yes, No, Maybe, key words associated with the stage (and synonyms) plus a default reply corresponding to Tell Me More if the game doesn’t recognise the response, making the parsing at the server end rather more simple. At each stage of the game, the server end has specific reply texts and next stage pointers. This implies that stages are equated to the rooms of a conventional interactive fiction story.

On that basis, devising a creation language and writing a game engine to translate into your SIML code might be reasonably straightforward in the first place. As the spec of the creation language became more elaborate, the translation engine could follow. I’ll look around for an existing creation language, probably much simpler than Inform 7, as a starting point.

Gil,
I’m not up on pm’s on this forum. I sent you one prior to your last post which shows a sent time, but is still in my outbox. I’m assuming that simply means that you haven’t read it yet. If you don’t have it let me know and I’ll investigate.

I pm’d you a “demo link” for CoD. If that works I’ll pm you a more open ended test I have.

Rich.