Adam's Lair Forum

game development and casual madness
It is currently 2019/03/19, 18:07

All times are UTC + 1 hour [ DST ]




Post new topic Reply to topic  [ 7 posts ] 
Author Message
PostPosted: 2019/01/03, 01:59 
Newbie
Newbie
User avatar

Joined: 2019/01/02, 13:27
Posts: 3
Role: Hobbyist
G'Day....

My name is A4L and I have recently been learning C# as a hobby. I have always been interested in Adventure Games. In fact I used to make reviews and game history videos for classic adventure games on uTube.

Anyway I have always wanted to make my own Adventure Game like Kings Quest / Sierra style.. but I have always loved the text input phrasing you see in Infocom games. So recently I thought I would learn C# and give it a whirl after I saw a uTube video showing a simple text adventure game being made in Unity.

Anyway, you can see my progress on a blog I started @GameDev.net (see signature)

My main goals at this time is to write a text adventure game in the console using C#, and then my next goal is to rebuild that game in a GFX engine, a 2D one. Using "splash screens". Think a text adventure but using images instead of "look-room" commands.

I was thinking Unity would be way over kill for this and thought to look for other 2D C# Engines. I saw this Engines name coming up a lot as a great 2D Engine I can use my C# Code in and that sound perfect for my needs.

Anyway, that is my introduction and why I am here.. so HI! How are you all and hope 2019 is a great year for y'all.

See Ya around!
--A4L

Question

As to my question. I saw in the Duality Docs - Input Handling there seems to be a method to collect text input from the user as a string.. Though the doc seems kinda vague... is there a API refecne or something that lists all the methods and everything for this engine?

I just wanted to ask if this engine would be usable (for a noob) to create a game loop that takes in a user input line and processes that text. Think of a classic infoCom text adventure.

Thanks for your time!
-A4L

_________________
My GameDev Blog @GameDev.net : Open Blog; Read Blog;
My uTube Chans : TragicTableTop : TragicDeskTop : AdventureReviews


Top
 Profile  
 
PostPosted: 2019/01/03, 16:20 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2070
Location: Germany
Role: Professional
Hey there!

Nice to see another soul around here ^^ I played point-and-click adventure games a lot way back then, and some text-based ones before that - none of the ones where you actually type keywords though! Your game idea sounds pretty neat for a first one, and manageable as a beginner too.

What I really like about the entering text approach is its potential to keep a player with an open mind. In the old point-and-click ones, after a while I tended to just combine every item with everything else, rather than staying with the puzzle and story and thinking about solutions. I imagine that's much less of an issue when you have an open space of text, rather than a closed space of predefined items and buttons. Looking forward to see what you come up with :)

Regarding your Duality questions:

A4L wrote:
I saw in the Duality Docs - Input Handling there seems to be a method to collect text input from the user as a string.. Though the doc seems kinda vague... is there a API refecne or something that lists all the methods and everything for this engine?
-A4L


There is an API reference, which is exposed through Visual Studio Intellisense for all the classes and their members. You should get a tooltip on mouseover and in autocomplete. If you want something to browse through, there is a DDoc.chm in the Duality folder that is also opened when you press F1 in the editor.

And then you've got the samples that you can install in the package manager, which come with source code to look into. The source code is also available online, so it's searchable across all samples too.

Here's how the InputHandling sample accumulates typed text up to a maximum of 10 characters, and the KeyboardInput that is queried is available through DualityApp.Keyboard.

A4L wrote:
I just wanted to ask if this engine would be usable (for a noob) to create a game loop that takes in a user input line and processes that text. Think of a classic infoCom text adventure.


Totally doable. I'd say get to know the engine a bit first and do the Getting Started tutorial, then see if you can set up a text output (via TextRenderer or custom ICmpRenderer Canvas) and input processing (via DualityApp.Keyboard.CharInput). Our docs are not as dense as they could be, so let us know if you need advice along the way.

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2019/01/04, 19:44 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
Thread hijacked for a shameless self-promotion of YAUI!
YAUI! Now available for Duality v3!

Jokes aside, maybe it will help with collecting text inputs.

Also hi, and welcome :mrgreen:

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2019/01/06, 01:17 
Newbie
Newbie
User avatar

Joined: 2019/01/02, 13:27
Posts: 3
Role: Hobbyist
Thanks guys. Great to be here. The thing is I am still working on my "console project" to learn c#.. and also test ideas about input phrasing and other stuff. So it will be a while before I really make anything in Duality.

Adam wrote:
What I really like about the entering text approach is its potential to keep a player with an open mind. In the old point-and-click ones, after a while I tended to just combine every item with everything else, rather than staying with the puzzle and story and thinking about solutions. I imagine that's much less of an issue when you have an open space of text, rather than a closed space of predefined items and buttons. Looking forward to see what you come up with :)


The problem of picking up everything not nailed down and randomly rubbing it on everything else is a real issue in Adventure Games in general. I believe text input fields do a few things... besides limit the deployment platform... and one of those things is that the player has to have an idea before trying it. You need to use objects together like in a traditional way, but the way the interface works seems to remove a lot of the random guess work. Typing "Use the metal plate on the chair" is not the same as selecting the metal plate and clicking on every single object in the room.

The thing I really hope to get running.. maybe not in this iteration as I learn, but the long term goals is to integrate language processing. I was using google voice activation on my phone yesterday and was really blown away how I can speak to google in a perfectly natural voice, speaking in a way I would speak to a human and have the app understand me. We also live in a world a bots that are getting better and better at generating text responses, rather than selecting from a list of responses.

My super long term goals is to integrate natural language processing into an adventure game, where you control the player, either in text or voice2text through normal speech.

So get rid of stuff like "get towel" "use towel on milk" and stuff and have commands like this. "Take the towel off the rack and use it to mop up the milk" or w/e.

The short term goals for the console project is to build a command phraser that can take multiple commands in a single sentence like that and use a comprehensive synonym system to boil down down 50 different words into the command "look" or w/e. "Gaze, examine, gander, ogle" etc etc.

NLP is a super complex topic I would imagine. I did some googling about how their search engine works and it is all machine learning craziness building "models" that predict patterns in human language. For a game I think this is probably not needed. The actual restrictions of the player location and the thins at that location reduces the totality of language into manageable chunks. Like if I put a chair in the room, it needs to understand chair.. if not.. then chair and all its synonyms and stuff do not need to exist. I'm no sure if I am explaining this well, but what I basically mean that unless an object is physically in the scene, it dosn't exist... so any input for a non-valid choice can return a default fail text or w/e and I only need to extract data for words the scene understands.

Yeah, my explanation kinda sucks.. but if I ever finis my console app with luck I can either get it working or will understand the problem much better.


SirePi wrote:
Thread hijacked for a shameless self-promotion of YAUI!
YAUI! Now available for Duality v3!


Not 100% sure what that thread is talking about.. but I liked that it has a "textbox".

_________________
My GameDev Blog @GameDev.net : Open Blog; Read Blog;
My uTube Chans : TragicTableTop : TragicDeskTop : AdventureReviews


Top
 Profile  
 
PostPosted: 2019/01/06, 15:16 
Site Admin
Site Admin
User avatar

Joined: 2013/05/11, 22:30
Posts: 2070
Location: Germany
Role: Professional
I wasn't going to post this, since you're still in the very beginning and I didn't want to throw you off with big ideas, but your long term goal on introducing NLP techniques into the mix is exactly where I see a lot of potential too - guess we're in a somewhat similar frame of mind there :D I'd really advise to actually start with the super simple non-NLP games like you planned though, maybe finish one or two smaller ones and slowly progress from there. This really is a huge topic.

That out of the way, when you do get to the NLP stuff, besides the traditional techniques, you could also look into word vectorization:

It works by training a neural net to guess the middle word in a series of words based on its surroundings / "embedding". After it learned enough to succeed with the task, you basically throw away the net, but extract the neural weights it learned per-word to end up with an N-dimensional vector (as in: series of floating point numbers) representing that word. The amazing thing is that you can now use vector math on words: Calculate their distance to see how semantically similar the words are, or calculate word relations as in "woman relates to man similarly as queen relates to king".

With a mathematically usable, but semantically meaningful representation of words, you can evaluate text input in a "fuzzy" way, so you don't have to hit exactly the right word, but a synonym will do fine. I imagine it would be possible to extend this concept to get a fuzzy evaluation of a sentence part, or command. That's still a long way from understanding language like any of the big players do, and maybe it's not viable for a game of this type at all - but I'm still a bit intrigued by the idea.

I briefly tested the concept at a local game jam where my goal was to start with a classic RPG / adventure game dialog tree, but hide the dialog tree from the player by requiring them to enter free form text when talking to the character. This makes no sense with strict text matching, but what I wondered was whether it could work when the matching was fuzzy enough to hit a positive on the rough meaning of a sentence. Honestly, it didn't really work that well - but it didn't completely not work either xD And there's a lot of space to still be explored here.

This is it in action:
Image

It's using this internal dialog tree, and as you can see it sometimes manages to find a good match despite input differences, but also sometimes fails doing so even though it was reasonably close.

And here are some word similarities based on the word vectors where I marked the ones with highest similarity scores:
Image

If you're interested to look into this later on, all the source code is online here, though it's not set up in a user-friendly, documented way, and you first need to download 10GB of pre-trained (not mine!) word vectors. Let me know if you need help setting it up at some point.

Quote:
The actual restrictions of the player location and the things at that location reduces the totality of language into manageable chunks.


Definitely true, so read all of the above with a grain of salt - NLP happens to be a topic that I occasionally explore a bit, but not always with a real use case in mind. If you want to make a game, be careful to not accidentally end up in research instead :D

_________________
Blog | GitHub | Twitter (@Adams_Lair)


Top
 Profile  
 
PostPosted: 2019/01/06, 16:00 
Forum Addict
Forum Addict
User avatar

Joined: 2013/09/19, 14:31
Posts: 883
Location: Italy
Role: Hobbyist
A4L wrote:
Not 100% sure what that thread is talking about.. but I liked that it has a "textbox".

:( it's.. it's a UI library, in case you need to have some controls on screen (textboxes, buttons, etc) to make your game interface.

Feel free to use it if you think it can help xD (or ask for help / improvements if needed)

_________________
Come on Duality's Discord channel. We have cookies! :mrgreen:


Top
 Profile  
 
PostPosted: 2019/01/07, 02:45 
Newbie
Newbie
User avatar

Joined: 2019/01/02, 13:27
Posts: 3
Role: Hobbyist
Adam wrote:
I wasn't going to post this, since you're still in the very beginning and I didn't want to throw you off with big ideas, but your long term goal on introducing NLP techniques into the mix is exactly where I see a lot of potential too - guess we're in a somewhat similar frame of mind there :D I'd really advise to actually start with the super simple non-NLP games like you planned though, maybe finish one or two smaller ones and slowly progress from there. This really is a huge topic.

<snip>

If you're interested to look into this later on, all the source code is online here, though it's not set up in a user-friendly, documented way, and you first need to download 10GB of pre-trained (not mine!) word vectors. Let me know if you need help setting it up at some point.


Veyr interesting, and that NPC chat.. kinda like a chat bot.. is very close to what I was talking about beyond just command interpreting.

Quote:
If you want to make a game, be careful to not accidentally end up in research instead :D


haha

SirePi wrote:
it's a UI library <snip> Feel free to use it if you think it can help


Thanks. I defiantly will look into it when I am ready. For now I want to produce the console version of the application and just see it in action as well as test some of the ideas I have.

_________________
My GameDev Blog @GameDev.net : Open Blog; Read Blog;
My uTube Chans : TragicTableTop : TragicDeskTop : AdventureReviews


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC + 1 hour [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group