Search Unity

  1. Megacity Metro Demo now available. Download now.
    Dismiss Notice
  2. Unity support for visionOS is now available. Learn more in our blog post.
    Dismiss Notice

Robot programming game implementation

Discussion in 'Game Design' started by terrakota, Oct 31, 2018.

  1. terrakota

    terrakota

    Joined:
    Sep 6, 2017
    Posts:
    2
    Hello,
    whats the right path to implement a game where the player must program robots behivor to fight each other using maybe a visual scripting tool included at runtime. Any ideas,links, etc how implement a game like this in unity?
    I just need the theory behind it.
    Thanks in advance and please excuse my poor english
     
  2. YBtheS

    YBtheS

    Joined:
    Feb 22, 2016
    Posts:
    239
  3. JoeStrout

    JoeStrout

    Joined:
    Jan 14, 2011
    Posts:
    9,859
    The most critical part of such a game is the programming system. I don't have a visual one for you, but if you're willing to either let players type code, or layer a visual editor on top, then you might find MiniScript useful.
     
  4. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    Another options is to make bot logic a minigame itself, sort of like minecraft and redstone, but maybe a bit more high level.

    Imagine you can place down logic blocks (e.g. if raycast forward hits something), connect them to other logic blocks (if enemy) or function blocks (e.g. Shoot Laser) using wires, and then the bot reads this at runtime.

    It would be tricky to code.. but a heap of fun. I guess in a way that is visual scripting, but you could make it super high level with basic functions like "Fire Weapon", "Move Forward", "Rotate To Enemy" etc.
     
  5. Red-Owl-Games

    Red-Owl-Games

    Joined:
    Feb 4, 2015
    Posts:
    28
    It might be nice to think about how to give feedback to the player about where a robot currently is in its behaviour sequence. Two reasons for this: it can be satisfying to see the system you programmed in action (the complete system, not just the visible behavioural layer) and it also allows the player to understand what went wrong when a robot is displaying behaviour that was not expected.

    Also, for inspiration what forms a (visual) programming language can take, please take a look at zachtronics industries' work. They create a new programming language for the player to use in nearly every game they make.
     
    Socrates, JoeStrout and TonyLi like this.
  6. terrakota

    terrakota

    Joined:
    Sep 6, 2017
    Posts:
    2
    thanks a lot to all for the great info
     
    Red-Owl-Games likes this.
  7. YBtheS

    YBtheS

    Joined:
    Feb 22, 2016
    Posts:
    239
    Like Scrap Mechanic?
     
    Serinx likes this.
  8. Serinx

    Serinx

    Joined:
    Mar 31, 2014
    Posts:
    788
    @YBtheS haha yeah pretty much, I haven't seen that game before :p
     
    YBtheS likes this.
  9. Deleted User

    Deleted User

    Guest

    Hmm... I would try to make my bot logic modular and just assign the logic objects to bots with the desired logic via a UI.

    Its really simple if you can wrap your head about how that would work.