Text Based Adventure - Any out there from GS? Templates? How to?

fmakawafmakawa Member Posts: 565

I am wondering, has anyone ever managed to successfully make a text based adventure game like Zork or Adventure via GS? Unlikely, but any templates out there? I'm trying to wrap my head around the command structure and struggling a bit. Using nested rules is iffy considering the many possible commands and I dont think tables would work here. I already have the story plotted out, the custom keyboard in place etc but the command rules are proving beyond me. Any ideas?

Ps -I'm aware that other tools rather than GS can do this easier. I've already built this on python and javascript as practise but the process of wrapping it into an actual app plus a few other features is still beyond me really and I figured GS if possible would allow me to make a quick full feature prototype in a short space of time.

So any ideas, regarding the command interface and interpreting of commands?

Comments

  • JapsterJapster Member Posts: 672

    @fmakawa said:
    I am wondering, has anyone ever managed to successfully make a text based adventure game like Zork or Adventure via GS? Unlikely, but any templates out there? I'm trying to wrap my head around the command structure and struggling a bit. Using nested rules is iffy considering the many possible commands and I dont think tables would work here. I already have the story plotted out, the custom keyboard in place etc but the command rules are proving beyond me. Any ideas?

    Ps -I'm aware that other tools rather than GS can do this easier. I've already built this on python and javascript as practise but the process of wrapping it into an actual app plus a few other features is still beyond me really and I figured GS if possible would allow me to make a quick full feature prototype in a short space of time.

    So any ideas, regarding the command interface and interpreting of commands?

    This is great! - ironic, it's something I've been pondering on doing in GS - I think a lot of the logic can be made simpler by using tables, as that's the route I was taking, with a certain size matrix using for locations, objects, and other stuff - I figured most of the work could be done via the table builds and relationships, and simple universal logic can check most of the conditions (including a table of flags to specify if eg. the player is currently carrying a weapon, light source etc, for otherwise insta-kill situations.

    I'm finding the whole prep work really interesting tbh! - happy to help throw ideas in, and bounce stuff back and forth... :)

    As regards the parser, I think it might carry more appeal to perhaps use a spot of predictive for the commands, and objects available, etc. - dead easy to program that in, and should take away the long-windedness of people trying lots of things unsuccessfully!

  • JapsterJapster Member Posts: 672
    edited May 2017

    @fmakawa If you ping me your email address, I'll give you access to a rough Google Sheet I was working on, to lay the groundwork - it's a WIP, and in the early stages, but I think you'll get the idea...

    I was hoping to remove the need for masses of conditions, by using table data, and the bonus is that it should be an easy-to-use template system for creating MANY adventures just by changing/creating table data (at least, mostly!)... ;)

    The logic in place should just compare table entries, with separate tables for objects, locations, permissable actions (based on object properties, again, just table data) and resultant outcomes, even all descriptions and location info/allowable navigation directions, etc. Also included cells which dictate item swaps etc (ie. "light lamp with the match" would swap out the unlit lamp (and match!) to a storage location, and swap in a lit lamp, possibly a dead match - again, all controlled by simple cell data - ie. if the cell in question is blank, the item cannot be lit, pulled, attacked, etc, along with the repercussions/effect (if any) - think hitting a sleeping dragon with a stick, as opposed to a sharp broadsword - net effect, dragon wakes, kills player, etc, etc...)

    Certain cells in location array/grid would dictate a 'kill/death' location if no light, no weapon etc, simply moving to the specified end screen, which also has a cell marking it as a death/game over screen.

    As you can see, most of the logic is purely references contained within the tables, and just needs entries setting up in the game.

    The cell data can also include valid 'templated' actions - ie. VERB (OPTIONAL ADJECTIVE) NOUN (OPTIONAL SENTENCE AID) (OPTIONAL ADJECTIVE) NOUN - ie. clean (rusty) lamp with (oily) cloth. If the item is in the player's possession, and no duplicated/matching (master) item types are in the inventory, you can repeat what was entered, and add them, to seem more intelligent - ie. "clean lamp with rag" - gives - "you polish the rusty lamp with the oily cloth. It is now gleaming!" - again, lists of similar noun names are included in a separate table, so the game knows that cloth, rag, etc are the same, and will substitute any matches with the master noun.

    Of course, in ambigious scenarios where the player is carrying 2 or more of the same type of object (keys, lamps, etc), you can then ask the player, "Which lamp, the RUSTY lamp, or the BROKEN lamp? -then fill the missing adjective entry in the command. If still ambigious, you can repeat the filling in process, ie. "Which rag, the OILY rag, or the DRY rag?"... etc...

    Once you hit a match, the game can find the appropriate action set in the right table.

    Pretty much covering all actions - Once you've figured out what format sentence / command the user has tried (VERB NOUN / VERB ADJ NOUN AID NOUN, etc, it can be stripped/formatted/matched in the allowable actions table.

    Hope this is making sense, and of some help!

    Den

  • JapsterJapster Member Posts: 672
    edited May 2017

    Just a (very) rough play with an example... (gaudy, but just so I could differentiate between areas etc..) :smile:

    Of course, it'll still let you type in commands eventually (possibly with optional predictive), in addition to possibly picking the lazy/none-pure option... :wink:

  • JapsterJapster Member Posts: 672
    edited May 2017

    Well, this thread's full of life eh @fmakawa ?.... Ah well, here's some command formation rule logic I figured would help, taken from the sheet I mentioned - obviously, the logic to ascertain if a word / command portion is a VERB, ADJECTIVE, etc, is simply to find any given portion/word in the command (in it's entirety) within the relevant sheet, working out which allowable command structure formats it is starting to match/falling into, as it resolves the word types (verbs, objects, aid/links, etc)...

    Of course, as regards ambiguous verbs/nouns, the positioning and command format will also allow conventionally problematic combinations (ie. NOUN 'switch' ie- "press switch", VERB 'switch' ie- "switch drinks") - this leads to a far greater choice of keywords in commands, eg:- alternative verb choices for the same actions, or alternative names for objects, to catch what the players are trying to do to solve a puzzle!

    Any feedback, sheets link requests, etc, from I dunno, anyone, might be good? - I know the forums are dying, but the question was asked, subject raised, and instead of just being secretive with my work so far, I figured this might help other devs too, I know fmakawa's query is probably not a usual direction for people to take GS in, but just feels like I'm in my own little room here... :wink:

  • pHghostpHghost London, UKMember Posts: 2,342

    Making a game similar to these old-school text games was the original reason I started looking into game engines like GameMaker etc., which ultimately led me to GameSalad.

    Ultimately it became clear that GS simply isn't well equipped for this type of game (those were times before tables arrived on the scene). And even with tables, GS-style managing of text input, rendering and similar means I wouldn't want to use it for a text-based game. But I fell in love with GS's simplicity and still am here, years down the line.

  • JapsterJapster Member Posts: 672
    edited May 2017

    @pHghost said:
    Making a game similar to these old-school text games was the original reason I started looking into game engines like GameMaker etc., which ultimately led me to GameSalad.

    Ultimately it became clear that GS simply isn't well equipped for this type of game (those were times before tables arrived on the scene). And even with tables, GS-style managing of text input, rendering and similar means I wouldn't want to use it for a text-based game. But I fell in love with GS's simplicity and still am here, years down the line.

    Thanks for the response @pHghost ! - yeah, maybe I'm just being too ambitious in my expectations / design (well, the rest of it that's in my head at present, trying to put it all down in a readable form at present!), but I really feel that using tables and cross-references for actions etc, would remove the need to delve into huge nested behaviours (which I REALLY wouldn't want to do!), but I also feel that playing to the strengths of the GS system (icons, touch-screen, GUI behaviour, auto-map, and of course, a bit of the old (WORKING) predictive, might make a great spiritual successor to the classic IF genre?

    As for the tables, they're really powerful when used in the way I've chosen, and make editing location info/directions/properties, and object relationships, actions available a breeze - simply filling in the tables with none-blank data object_ID's and Action_ID's dictates what happens in any given action/scenario... (Of course, it helps that I am able to use Google's great colour-coded Sheets for great legibility! - instantly noticeable if I'm editing a location's destinations (NORTH field for a location = "DARK_PIT", etc), or just the description or whether it needs light, is a KILL room, etc) Same for objects - can it be pulled, hit, etc - all cells to dictate if so, and if not, a suitable response.

    Coupled with the simple allowed actions / commands match-up table, that's pretty much got all permutations of anything you want the player to be able to do (or NOT, but at least respond to it), covered...

    The only things stopping me from actually seriously having a long go at it, at this point in time is that:-
    (a) I'm currently juggling 2 more LARGE main-stream projects, and....

    (b) I feel that it is really only going to appeal to old-skool or die-hard IF fans, without modernising it all somewhat... More a labour of love, rather than a bills-payer... :frowning:

    But yeah, in comparison to the command logic and in-depth world/object/actions structure, I'm (naively, possibly!) guessing working around GS's text flow and other limitations shouldn't be too hard!

  • fmakawafmakawa Member Posts: 565

    @Japster haha, Sorry, been out of range this week. Got some signal for a little but back properly Sunday! Would love to exchange ideas etc. I'll PM you too but need to read all this first! Give me a sec :#

  • fmakawafmakawa Member Posts: 565

    @pHghost said:
    Making a game similar to these old-school text games was the original reason I started looking into game engines like GameMaker etc., which ultimately led me to GameSalad.

    Ultimately it became clear that GS simply isn't well equipped for this type of game (those were times before tables arrived on the scene). And even with tables, GS-style managing of text input, rendering and similar means I wouldn't want to use it for a text-based game. But I fell in love with GS's simplicity and still am here, years down the line.

    I kinda figured that too and it was quite easy to make python and javascript versions but packaging is a nightmare for me there so I figured a port might be possible in GS. I'll look through what @Japster has tried and maybe throwing a few ideas together we might come up with workable solutions.

  • pHghostpHghost London, UKMember Posts: 2,342

    @Japster said:
    Thanks for the response @pHghost ! - yeah, maybe I'm just being too ambitious in my expectations / design (well, the rest of it that's in my head at present, trying to put it all down in a readable form at present!), but I really feel that using tables and cross-references for actions etc, would remove the need to delve into huge nested behaviours (which I REALLY wouldn't want to do!)

    This I agree with 100%. The vast majority of my logic runs heavily on tables, with absolutely minimal use of game. attributes if possible. This is sometimes a pain on the Mac expression editor, since it doesn't expand in size intelligently and if you have multiple nested tableCellValues (usually the row or column is defined by another tableCellValue) that becomes frustrating. But still several factors better than nested behaviours!

    @Japster said:
    But yeah, in comparison to the command logic and in-depth world/object/actions structure, I'm (naively, possibly!) guessing working around GS's text flow and other limitations shouldn't be too hard!

    This is really where my issue with GS lies in regards to text-based games. In that first screenshot of yours for example, but in general, how do you deal with generated text that shows over multiple lines? That is my biggest issue.

  • imjustmikeimjustmike Member Posts: 450

    Probably not meant to do this, but Twine + PhoneGap is perfect for what you're looking for.

    I've messed around with text adventure games before and the the thought of trying to do that logic in GS makes my brain hurt. Twine is specifically built to create text adventure games, and exports directly to HTML so you can easily style with CSS. I managed to have a working prototype styled up and ready to share in a matter of hours. And because it exports to html you can pretty much put it anywhere, from native apps (using a wrapper like PhoneGap) to the Steam store. Or just have it as an online game - because it's HTML you can make it responsive so it'll work on any device :)

    Worth looking into if you haven't already.

    Also, there is a text adventure template made by the GS team (I believe) available for 5 bucks - might be worth a look: http://gshelper.com/product/multilinear-story/

  • ToqueToque Member Posts: 1,187

    @imjustmike said:
    Probably not meant to do this, but Twine + PhoneGap is perfect for what you're looking for.

    I've messed around with text adventure games before and the the thought of trying to do that logic in GS makes my brain hurt. Twine is specifically built to create text adventure games, and exports directly to HTML so you can easily style with CSS. I managed to have a working prototype styled up and ready to share in a matter of hours. And because it exports to html you can pretty much put it anywhere, from native apps (using a wrapper like PhoneGap) to the Steam store. Or just have it as an online game - because it's HTML you can make it responsive so it'll work on any device :)

    Worth looking into if you haven't already.

    Also, there is a text adventure template made by the GS team (I believe) available for 5 bucks - might be worth a look: http://gshelper.com/product/multilinear-story/

    Twine looks perfect for it.

  • JapsterJapster Member Posts: 672
    edited May 2017

    @imjustmike said:
    Probably not meant to do this, but Twine + PhoneGap is perfect for what you're looking for.

    I've messed around with text adventure games before and the the thought of trying to do that logic in GS makes my brain hurt. Twine is specifically built to create text adventure games, and exports directly to HTML so you can easily style with CSS. I managed to have a working prototype styled up and ready to share in a matter of hours. And because it exports to html you can pretty much put it anywhere, from native apps (using a wrapper like PhoneGap) to the Steam store. Or just have it as an online game - because it's HTML you can make it responsive so it'll work on any device :)

    Worth looking into if you haven't already.

    Also, there is a text adventure template made by the GS team (I believe) available for 5 bucks - might be worth a look: http://gshelper.com/product/multilinear-story/

    @imjustmike - I did take a look at Twine, and after looking at the template on the GSHelper store, I can see that they both seem more suited to 'choose your own adventure' type games, compared to fully-fledged text adventures with classic verb noun (and extended) type puzzles?

    @fmakawa - Also, as regards location and object properties, I think I've made a slightly different approach to just columns of values, which yep, made it harder to plan out relationships between locations, flagged properties, etc... My locations are simply stored as a (eg) 5x5 grid (could easily be larger, and overall memory space taken per location is still tiny!), with certain cells within that grid, if containing none-blank entries, dictating WHERE or WHAT will happen - eg - centre cell is the location ID (CAVE_ENTRANCE, etc), other contain the description, and eg - the very top-left cell within grid will store location to move to if travelling NW from that location, and other cells specifying where to move to if not carrying a lit light source or weapon (ie. to insta-death rooms - DEATH_BY_PIT_FALL, DEATH_BY_DRAGON, etc) - these are just used to flag the end game description and properties, etc...) - another cell within the location/object info could even point to a graphics file to further embellish - think old-skool text adventures with gfx.

    Again, simply ONE (and really, just one table check, pointed towards a cell) re-usable check for none-blank cells will cover ALL scenarios/locations/object actions, based purely on table contents, so I really think this will prove flexible and easy to build multiple adventures with. :smiley:

    @pHghost - As regards the text, I know GS is a pain for not giving control over the text breaks within a display behaviour (and even if using monospaced fonts, it can be off, given dpi/device font sizes, etc), but I seem to recall someone on here made a very clever routine to split paragraphs/text across multiple lines, cleanly, at word breaks/spaces? - I'm assuming that some logic can be used, even if it errs on the side of caution a little (ie. cuts lines a little short even, in some cases), to ensure that text NEVER gets cut off on the right, and that words are carried across to the next line. Personally, I'm assuming it might be easier to again use tables, parsing the entire 'location description/objects seen/characters in location' text and dropping those words into a table at the current 'new' on-screen row, until we hit a certain character limit, and incrementing the row count. The table would always be the source for the display routine, so we'd also avoid the issue where the display text moves up/down because of different numbers of lines - ie. even if blank, the lines would display, keeping everything in the same location. Would also allow easy apparent scrolling up of content simply by adjusting the start/row pointer (ie. current on-screen row being created > visible start row plus max rows on-screen), possibly even backtrackable to review it...

    I'm probably not explaining too well, but hopefully this makes sense!

    Here's an example of the WIP locations sheet (Top-Left is just a reminder/key for what cell dictates what... :smile: ) PITCH_BLACK_ROOM as you can see, can be anywhere, even though it's physically to the left of a room, it's not referenced by any of them - so at present is an inaccessible room, despite looking like it's to the left of one. Same goes for the dedicated LIMBO/STORAGE room (note - no, that one's not shown in the screenshot! :smile: ), which simply gets used to swap out items - ie. CLOSED_CHEST, once opened, gets swapped with OPEN_CHEST, which also happens to contain other items (also moved, if they have, say, 'OPEN_CHEST' in their 'CONTAINED_IN' column identifier):-

  • JapsterJapster Member Posts: 672

    Here's a link to what I've been working on so far @fmakawa (and anyone else who wants to take a look, it's a shareable link) - it's definitely a WIP, and I can make it a LOT easier/less cluttered, but it's evolving as I'm working on it - once the format/design is nailed down, the rest really is straightforward.... :smiley:

    There are several sheets contained within the workbook, so take a look through each, and you'll see what I'm trying to achieve as regards table-based relationships compared to rules... Some sheets aren't really required for my example at the moment, they're more an alternative method I'm also mulling over (ie. Valid Action Combo's sheet)... :smiley:

    https://docs.google.com/spreadsheets/d/1Fwho7tmJqqs6fWojx2w_QIhoj3yU0ChTVt-nYgOqc1E/edit?usp=sharing

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    I'm impressed with how much thought you've put into this. It looks like a ton of work to get this going!

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JapsterJapster Member Posts: 672
    edited May 2017

    @tatiang said:
    I'm impressed with how much thought you've put into this. It looks like a ton of work to get this going!

    Thanks @tatiang ! - Yep, I figured if I made a usable one-time 'engine' so to speak, it would make it easy to create LOTS of text adventures, should the fancy take me, or perhaps even sell on the template, but like I say, at the moment, I've got waaaay too many things on the go! :frowning:

    Kind of like my Retro Snippets Challenge game I created - it's easy for me to change it to be movie/music/etc based challenge apps, just with a new spreadsheet and logo's!...

    Probably way too much effort expended in my quest to make it an engine as opposed to a one-off adventure title, and I always tend to write complicated solutions, but I hate being limited, and hard-coding behaviours to say, simple input, then finding it looks a bit amateur or is frustrating to play because it's only simple conditions instead of an intelligent:-

    'hmm... what did the player mean by that?'

    (then resolving either by cross-ref'ing alternative words, names, verbs, etc, or by checking if we can be ambiguous...

    ie. they're only carrying one lamp, and there isn't another (at least known at this point) in this location, and the lamp can be lit as they have an unused match in their inventory, so it's obviously the lamp they mean, and they intended to light it with the match, so:-

    "light lamp"

    could be translated as:-

    "Light [the rusty lamp] [with] [the unused match]"

    ...and the game can 'intelligently' respond:-

    "you light [the rusty] lamp [with the unused match]."

    ...etc.. :smile: , so having a really basic parser when I can definitely write a superb one, really isn't something my OCD will allow... :wink:

    i.e. I remember the old text adventures being fun AND frustrating in their stubborn simplicity, not recognising a large vocabulary, not recognising objects that have been described in the scene etc (ie. examples like this:- "I'm in a cave. The walls are cold and damp" - so you "examine walls", or "examine cave", then get an "I can't see that here!", grrr! - So I can include immovable objects solely for fleshing out the experience, simply by having a flag in the table, that says that the object is here, immovable, and doesn't get added to the "I can also see..." bit!...), or having to spell out the obvious to a painful degree, so to remove all that (after all, only caused by programmer laziness and/or memory/ability limitations back in the day), would I think, make some very playable modern alternatives!

  • JapsterJapster Member Posts: 672
    edited May 2017

    To those who haven't yet looked at the sheet, here's a couple of examples of the kind of logic I was including for say, actions, and objects themselves, along with an idea of what happens, when say, you examine something, or open a chest, etc:-

    Example Lever Pull:-

    Example Chest Open:-

    (The last line regarding pushing the button, is just there to show items moving in and out of the limbo room (ie. closed orb is moved OUT, open orb moved in, and of course the now used/inactive button might as well be swapped with one that does nothing when pressed - the description is the exact same, but the press/push action on the USED button simply does nothing, as the orb is open - it's a very easy way of avoiding more comparison logic for the same objects, by simply making a similar one in a table row, matching in all but ID and minus the ability to push it and initiate the original action :wink: ), but would in this case of course be further along in the row, under the similar PUSH/PRESS action actions, just dropped the logic here as it wouldn't also fit on-screen... :wink: )

    Example Lamp Actions:-

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    @Japster said:

    @tatiang said:

    i.e. I remember the old text adventures being fun AND frustrating in their stubborn simplicity, not recognising a large vocabulary, not recognising objects that have been described in the scene etc (ie. examples like this:- "I'm in a cave. The walls are cold and damp" - so you "examine walls", or "examine cave", then get an "I can't see that here!", grrr! - So I can include immovable objects solely for fleshing out the experience, simply by having a flag in the table, that says that the object is here, immovable, and doesn't get added to the "I can also see..." bit!...), or having to spell out the obvious to a painful degree, so to remove all that (after all, only caused by programmer laziness and/or memory/ability limitations back in the day), would I think, make some very playable modern alternatives!

    Yep, I grew up with Zork. :)

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • JapsterJapster Member Posts: 672

    @tatiang said:

    @Japster said:

    @tatiang said:

    i.e. I remember the old text adventures being fun AND frustrating in their stubborn simplicity, not recognising a large vocabulary, not recognising objects that have been described in the scene etc (ie. examples like this:- "I'm in a cave. The walls are cold and damp" - so you "examine walls", or "examine cave", then get an "I can't see that here!", grrr! - So I can include immovable objects solely for fleshing out the experience, simply by having a flag in the table, that says that the object is here, immovable, and doesn't get added to the "I can also see..." bit!...), or having to spell out the obvious to a painful degree, so to remove all that (after all, only caused by programmer laziness and/or memory/ability limitations back in the day), would I think, make some very playable modern alternatives!

    Yep, I grew up with Zork. :)

    Ha ha! - exactly.... and that was one of the better, less limited parsers... :smiley:

  • imjustmikeimjustmike Member Posts: 450

    @Japster said:
    @imjustmike - I did take a look at Twine, and after looking at the template on the GSHelper store, I can see that they both seem more suited to 'choose your own adventure' type games, compared to fully-fledged text adventures with classic verb noun (and extended) type puzzles?

    IIRC correctly Twine does allow text input and storing of variables. Sure, it is more designed to do choose your own adventures, but I don't think it would be too hard to use it for a more classic text adventure.

  • JapsterJapster Member Posts: 672
    edited May 2017

    @imjustmike said:

    @Japster said:
    @imjustmike - I did take a look at Twine, and after looking at the template on the GSHelper store, I can see that they both seem more suited to 'choose your own adventure' type games, compared to fully-fledged text adventures with classic verb noun (and extended) type puzzles?

    IIRC correctly Twine does allow text input and storing of variables. Sure, it is more designed to do choose your own adventures, but I don't think it would be too hard to use it for a more classic text adventure.

    Ahh... sounds a bit more like I'm expecting then - I did actually download it, and have a brief play, but nothing to do with objects, attributes, etc seemed to be available - I'm guessing that they're there, just not openly viewable/addable/editable without getting the project to a certain point...

    But yeah, to be honest, I actually quite LIKE the idea/thought of producing the engine, once I have time - it's kind of therapeutic to figure this stuff out and prove I can do it from scratch, part of the appeal... :smiley:

  • fmakawafmakawa Member Posts: 565

    @Japster It took me a while but I'm finally back and all caught up. The last 10 days have been a doozy. I've looked through all your stuff and I am like wow! This is brilliant stuff!

    I'm finding the whole prep work really interesting tbh! - happy to help throw ideas in, and bounce stuff back and forth... :)

    Keen to mix em up! The prep is the real doozy. I'm loving the detail of your graph work! Its immense. I didn't do it that way but your method makes it incredibly easy to make new games. The dialogue and relationships is all that changes.

    As regards the parser, I think it might carry more appeal to perhaps use a spot of predictive for the commands, and objects available, etc. - dead easy to program that in, and should take away the long-windedness of people trying lots of things unsuccessfully!

    Yeah, I agree with you here. I was thinking in 3 parts for this --> 1. The verbs, the actual commands. 2. The inventory the player currently has. 3. The nouns present in the description of the room. Which means a lot of dialogue since all the nouns would have to have responses to all the possible commands. A lot of repetitive dialogue will take care of a significant chunk of this.

    @Japster said:
    @fmakawa If you ping me your email address, I'll give you access to a rough Google Sheet I was working on, to lay the groundwork - it's a WIP, and in the early stages, but I think you'll get the idea...

    Sent

    I was hoping to remove the need for masses of conditions, by using table data, and the bonus is that it should be an easy-to-use template system for creating MANY adventures just by changing/creating table data (at least, mostly!)... ;)

    The logic in place should just compare table entries, with separate tables for objects, locations, permissable actions (based on object properties, again, just table data) and resultant outcomes, even all descriptions and location info/allowable navigation directions, etc. Also included cells which dictate item swaps etc (ie. "light lamp with the match" would swap out the unlit lamp (and match!) to a storage location, and swap in a lit lamp, possibly a dead match - again, all controlled by simple cell data - ie. if the cell in question is blank, the item cannot be lit, pulled, attacked, etc, along with the repercussions/effect (if any) - think hitting a sleeping dragon with a stick, as opposed to a sharp broadsword - net effect, dragon wakes, kills player, etc, etc...)

    I figured too because rules would become cumbersome considering the amount of relationship abound. I'm struggling here a little with the multiple cross references of the tables. We would need to make the relationships formulaic to make the cross referencing simple enough that nothing gets missed or gives an undesired result.

    Certain cells in location array/grid would dictate a 'kill/death' location if no light, no weapon etc, simply moving to the specified end screen, which also has a cell marking it as a death/game over screen.

    As you can see, most of the logic is purely references contained within the tables, and just needs entries setting up in the game.

    The cell data can also include valid 'templated' actions - ie. VERB (OPTIONAL ADJECTIVE) NOUN (OPTIONAL SENTENCE AID) (OPTIONAL ADJECTIVE) NOUN - ie. clean (rusty) lamp with (oily) cloth. If the item is in the player's possession, and no duplicated/matching (master) item types are in the inventory, you can repeat what was entered, and add them, to seem more intelligent - ie. "clean lamp with rag" - gives - "you polish the rusty lamp with the oily cloth. It is now gleaming!" - again, lists of similar noun names are included in a separate table, so the game knows that cloth, rag, etc are the same, and will substitute any matches with the master noun.

    I wasn't going to allow them to type anything to prevent having to deal with additional words and true parsing. By offering only the nouns and verbs I would drastically shorten the options. At a push I would add a secondary noun and aid ie. kill dragon with sword. I figure the simpler the better here.

    Of course, in ambigious scenarios where the player is carrying 2 or more of the same type of object (keys, lamps, etc), you can then ask the player, "Which lamp, the RUSTY lamp, or the BROKEN lamp? -then fill the missing adjective entry in the command. If still ambigious, you can repeat the filling in process, ie. "Which rag, the OILY rag, or the DRY rag?"... etc...

    I would make these kind of objects into compound nouns to remove the need for adjectives in the parser???

    Any feedback, sheets link requests, etc, from I dunno, anyone, might be good? - I know the forums are dying, but the question was asked, subject raised, and instead of just being secretive with my work so far, I figured this might help other devs too, I know fmakawa's query is probably not a usual direction for people to take GS in, but just feels like I'm in my own little room here... :wink:

    You're certainly not alone. People are around just not as conspicuous. Nonetheless, here we still are!

    Example Lever Pull:-

    I figure Inventory management is going to be the tricky bit plus change of state for objects after some actions. I'm thinking a fusion of tables and nested rules to properly deal with this. Simply using table references seems too much.

  • JapsterJapster Member Posts: 672

    @fmakawa No worries mate, I've been also meaning to respond to your reply, but been busy working on Parcel Monkey all weekend for a change! :smiley:

    Yeah, I got a lot further with playing with the engine proto, and now it pulls items, descriptions, etc from the tables, and checks the inventory/populates that from a table too, and added the beginnings of the intelligent parser. It now knows if the first word is a verb, etc, then what to expect next (Nothing - as in SAVE, WAIT, etc), direction (if followed by N,W, etc), or adjective/noun etc)... as the command is built up, you can even highlight if the verbs, etc, are not recognised...

    The tables cross-referencing isn't so bad, honestly - when I've built the basic logic for catch-all situations, it literally will be a case of populating an intelligent, colour-coded/identifiable columns spreadsheet (google sheets, excel, etc) that may also self-highlight to a certain extent, if it's not found valid noun names, location names, etc inside itself, or bad references)

    Suffice to say, I'm pretty pleased with the prep work so far, and like I say, don't think too much on the entire workbook! - I've worked out a couple of different ways of carrying out actions, so one or more of the sample sheets might not even be needed - was literally there in case I went with one method - work out valid commands based on input, or work out commands simply by acting on noun properties/columns dictating what's possible etc... :smiley:

    Also, no flags are required for actions / disallowable actions, other than the criteria for a given action either yielding the result (means it can be done), or blank, meaning it falls into your catch-all (or specifically entered for particular combinations if you desire!) 'I can't do that' scenarios (ie. ActionID="Standard_I_Cant_Do", "Nothing_Happens" action responses, with no action/effect attached... :smile:

    It'll make more sense once it's all (kind of!) mocked up and happily cross-referencing more aspects/stuff... :smiley:

Sign In or Register to comment.