Question about VISIONAIRE

  • #1, by Adventurer4LifeWednesday, 05. November 2014, 05:08 6 years ago
    Hi there...

    I'm a hobbyist game maker and I want to make a Adventure Game for my next hobby project. I have been looking at a bunch of engines and this one looks like it could be really cool. The thing is that I wish to have a old school text interface, where the player types commands instead of using mouse clicks .. say Space Quest 1 or Kings Quest 1 are pretty famous examples.

    Now I understand that this engine might not have a text phraser, I have already created one that serves me when I was making a pure text adventure that just ran in the console. I was just wondering if this engine has the ability to take text commands.

    Is there any precedence in this engine design to accommodate text input to send commands?

    Thanks in advance
    --A4L

    Newbie

    9 Posts


  • #2, by afrlmeWednesday, 05. November 2014, 06:52 6 years ago
    I guess it might be possible with the keyEvent handler that was added to the engine recently. The only problem is that you will have to script the entire command system using Lua script.

    I've actually been working on a text input system for a technical demo example for the wiki using the new keyEvent handler, unfortunately I've been occupied with other things recently & haven't gotten round to finishing it.

    I have already created an example using the editor key input actions with snippets of lua, which can be found @ http://www.visionaire-studio.net/forum/thread/key-input-tech...

    It was a lot of work to make it work using this method.

    Ideally pure lua script method - which wasn't possible when I created this - would have been more ideal with the actions linked inside of multiple tables that link to scenes/specific objects etc. & if command is incorrect you have it display an "command doesn't exist..." message or something.

    All in all, it's pretty complicated. Although if you have any programming/scripting knowledge at all & have used other game engines before then it might not be too hard to figure out. It's all down to logic, when it comes to Visionaire Studio.

    Imperator

    6815 Posts

  • #3, by afrlmeWednesday, 05. November 2014, 07:03 6 years ago
    P.S: just had a mini light-bulb flash thingy....

    If you were to create some commands in the interface, you could set them via lua easily, like so...
    -- definition script
    function setCommand(cmd)
    game.ActiveCommand = Buttons[cmd]
    end

    -- usage example
    setCommand("use")
    1
    2
    3
    4
    5
    6
    7
    8


    Question: does the character have to be near something to be able to input command for it? or if a command is entered then can it automatically move character to that position?

    In my head I know how to do what you are asking for.

    Imperator

    6815 Posts

  • #4, by Adventurer4LifeWednesday, 05. November 2014, 08:50 6 years ago
    Yeah, the phraser I tested just in c++ console basically took sentences and stripped them down into actions and objects... "pick up the fat car" would be stripped to "pick up cat" and equate to "get cat" .. stuff like that. These final outputs I basically assumed woudl function exactly like a mouse click. So it would be commands to the engine to do things.. just like mouse use dose.

    Newbie

    9 Posts

  • #5, by afrlmeWednesday, 05. November 2014, 12:21 6 years ago
    Yeah I don't see why you couldn't do this - providing that you don't mind a bit of hard work. It's possible to manipulate string content with lua also.

    What you need to do is write a function which adds inputted characters into a value, variable or table which when you press enter strips the string & then sends a query to a table or action.

    Biggest problem is that you might have certain things on each scene that might require same or similar commands & also you would need to create conditions & values etc to query against to make sure the action hasn't already been performed on something already that only requires the action to be performed once or might require you to do something else before hand.

    Imperator

    6815 Posts

  • #6, by Adventurer4LifeWednesday, 05. November 2014, 21:08 6 years ago
    So the scripts need to attach to each object? They can not run globally in the scene?

    I was thinking you could just have a variable function that spits out bool something like activated(chair); to see if the chair has already been moved or stepped on or w/e.

    I'm also planing to link commands. So like if you say .. "push ladder to bookshelf" "climb ladder" "get shinny object" You could just type 1 command instead of three.. "get shinny object" and it will check to see if the ladder is moved and stat the action chain from there. This idea is to stop tedious mincro commands. Though I am playing with the idea that for a command like that to work you have to have noticed the ladder already in some way.

    Newbie

    9 Posts

  • #7, by Adventurer4LifeWednesday, 05. November 2014, 21:10 6 years ago
    What you need to do is write a function which adds inputted characters into a value, variable or table which when you press enter strips the string & then sends a query to a table or action.


    This input ability is already in the engine though some kind of get key function is it?

    Newbie

    9 Posts

  • #8, by afrlmeWednesday, 05. November 2014, 21:20 6 years ago
    hmm...

    Ok quick run through of theoretical approach to this.

    1. create the keyEvent handler code.
    2. on keyEvent key (release) add character to a variable or value.
    3. when press enter (return), strip string & query if action exists for scene.
    3b. if exists then start action linked to current scene (inside of this you will add your if queries & actions etc) action will be a called by other action action.
    3c. if action doesn't exist or queries inside of action are not met then display an error message.
    4. clear current text on enter or after x time if error message was just displayed.

    Still a lot of work though! wink

    Also quick note: on press enter, you should also query if string is empty or contains certain commands not related to normal commands. !help for instance.

    Imperator

    6815 Posts

  • #9, by Adventurer4LifeWednesday, 05. November 2014, 21:41 6 years ago
    This all sounds very promising..

    Newbie

    9 Posts

  • #10, by Adventurer4LifeWednesday, 05. November 2014, 21:42 6 years ago
    I just need to try and see if I can implement my c++ phraser now... . . . This engine uses the use of scripting and ULA right? So I would need to recode it all in a language I know nothing about?

    Newbie

    9 Posts

  • #11, by SCUD24Wednesday, 05. November 2014, 22:46 6 years ago
    Short of doing all this work for your own enjoyment, is there any market for a game that uses a parser engine?

    Newbie

    28 Posts

Write post