Giter Site home page Giter Site logo

minstance's Introduction

Minstance

Minstance is a Godot plugin that enables running and debugging multiple instances. That makes it greate for developing multiplayer games.

Adding instance

After enabling plugin there should be minstance run icon near play icon. tut

Press right click on icon and then settings. In settings window, click on Add New Instance. image

Instance properties

instance-properties

Title

Title of instance. For example you could name it with name of player.

Arguments

Arguments can be retrieved by using get_minstance_value_from_args in MinstanceAutoload node. See example.

Color identification

Color that will represent everything that is related to instance. Inspected object in inspector will have title in that color, output in Minstance Outputs and window of instance.

Window

You can manually add values for position or you could drag window in monitor widget.

anim

Options

Debugger port

Every new instance will have that number plus sequence number of the instance for debugging.

Remember window position and size

If it's set on, instance will save position and size of window on exit.

Save breakpoints

Breakpoints will be preserved for scripts that are opened in editor.

Remove autoload on exit

When minstance is about to run it enables minstance autoload and on exit disables. That enabling and disabling triggers save project window on exiting editor. Sometimes it can be annoying.

Example using arguments

In scenario where you need to have two instances with different accounts to login. For first instance add "--test-player Andrej" in arguments on settings window and for second "--test-player John"

if has_node("/root/MinstanceAutoload"): # check if Minstance autoload is present
  var minstance = get_node("/root/MinstanceAutoload") # get Minstance autoload node
  var test_player = minstance.get_minstance_value_from_args("--test-player") # retrieve value from instance arguments

  match test_player:
    "Andrej":
      email = "[email protected]"
      password = "reallybigpassword123"

      print("Using test player account Andrej")

    "John":
      email = "[email protected]"
      password = "reallybigpassword123"

      print("Using test player account John")

Minstance Outputs

For every instance there is a output in Minstance Outputs that is located in bottom panel.

image

Debug panel

Debug panel is slightly modified. From left, there is a list of instances and their statuses. Clicking on instance sets the active instance for the debug panel. Next is live scene tree view for active instance and rest is similar like in normal debug panel except two added buttons in upper right corner. "Bring to front instances" button brings instances to front and the lock icon next to him locks instances so that they stay in front, handy when changing values in the inspector. If a break occurs, the lock will be unlocked.

image (1)

Setting breakpoints

In the code editor in the upper right corner there is an option button (list) of instances to choose which the breakpoints refer to. If you place in default, that breakpoint will be for normal run.

Animation

minstance's People

Contributors

eskandrej avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.