Search Unity

Games [DOS prompt] Choose adventure game

Discussion in 'Works In Progress - Archive' started by unit_dev123, Feb 17, 2020.

  1. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Dear friends I making game with help from Joe strout using miniscript in unity (interpreter) to make dos prompt game, no n-ary trees, but try with map or list 1st.

    [Story]
    Tale of Amber Caulson. Every choice will be option a,b,c,d. On choice will decide next question. Very much like 2d rpg except with DOS prompt.

    Interface will look like this, if I can make with unity. I try to keep u updated.

    2b63fc11f5dc0733b5d35e7ec875310d.png



    [Input]
    Keyboard, trying with desktop first then mobile, so keyboard input on iphone and samsung.
     
    Last edited: Mar 12, 2020
    JoeStrout likes this.
  2. khos

    khos

    Joined:
    May 10, 2016
    Posts:
    1,490
    Interesting! Could you do this via just a large .bat script (or multiple)?
     
    Last edited: Feb 18, 2020
  3. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Is possible but not sure.
     
  4. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    @JoeStrout

    1. I add miniscript folder to unity asset folder
    2. I add cube and attach script test.cs

    Code (CSharp):
    1. using Miniscript;
    2. using System.Collections;
    3. using System.Collections.Generic;
    4. using UnityEngine;
    5.  
    6.  
    7.  
    8. public class test : MonoBehaviour
    9. {
    10.  
    11.     public Interpreter interpreter;
    12.  
    13.     // Start is called before the first frame update
    14.     void Start()
    15.     {
    16.         interpreter = new Interpreter();
    17.         interpreter.Reset("print 2+2");
    18.         interpreter.Compile();
    19.         interpreter.Stop();
    20.     }
    21.  
    22.     // Update is called once per frame
    23.     void Update()
    24.     {
    25.         //Debug.Log("halp me!"); //<- this work
    26.         try {
    27.              interpreter.RunUntilDone(0.01);
    28.          }
    29.          catch (MiniscriptException err)
    30.          {
    31.              Debug.Log("Script error: " + err.Description());
    32.          }
    33.     }
    34. }
    35.  
    I press play and compiles without errors but sadly nothing shows in console window.

    I expect to see result 4?

    Can u explain what I do wrong? I fallowing this https://miniscript.org/files/MiniScript-Integration-Guide.pdf
    but there is no simple or full example :(
     
  5. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Full examples come with the plugin. But to see this output you would need to assign something to the three output callbacks, or at least to interpreter.standardOutput, as shown on p. 5 of the Integration Guide.
     
  6. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Thank u sir, I'm not entirely sure what I'm doing here, can you kindly give full example for me to copy and paste, I'm brand new to scripting.

    The example uses snippet from robot reindeer class which i not know of, but ideally i just want to test simple, I check github repo and no full example exist.

    Code (Boo):
    1. print 2+2
    for brevity
     
    Last edited: Feb 23, 2020
  7. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    u mean if i purchase from asset store? i really like so far, if need to purchase i can do so. thanks in advance :)
     
  8. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    Yes, the asset (from the Asset Store) gives you the full Robo Reindeer example and several others, as well as an in-game code editor if you happen to need that.

    But no, I can't give you a complete example, because I don't understand what you're trying to do. While of course I'm pleased that you're trying to use MiniScript, I don't see how it helps you to create this game in Unity. If you want to write your game in MiniScript, you should just use Mini Micro, which already has a DOS-like text display (and is free).
     
  9. unit_dev123

    unit_dev123

    Joined:
    Feb 10, 2020
    Posts:
    989
    Thank you for the reply sir, instead I will try to learn to do same with cprogramming. Not what I wished for but it makes sense to not be limited to unity full potential like compile to ios and android or other platforms if needed, make my own custom gui, multiplayer support ect, with more learning resource as well at my fingertips.

    Sorry but miniscript was just not for me. It was much too difficult to get working inside unity.


    Mini micro as stand alone is fine to understand and i understands why u push me in that direction, but as of late too limited in feature set to use for production. My other serious option is perhaps godot engine, the sintax is closer to miniscript and i think will be easier to dev inside, which i may investigate but shall see. Maybe unity will consider using boo like script in future but very very unlikely.

    Thank you so much for help so far and good luck with project! You have been very kind.
     
    Last edited: Feb 23, 2020