Dummyscript Docs

Full examples, modules, UI components, and networking in `.dspt` format.

Getting Started

Install Dummyscript by including the `.dspt` loader in your project:

pkg("my-first-game.dsp")

Create a new package:

pkg({
  title: "Starter Package",
  version: "1.0",
  add: "no internet",
  onLoad: function() {
    console.log("Package loaded!");
  }
})

Example Scripts

1. Auto Disconnect

pkg({
  title: "--non-online-player-loader",
  extra: "disconnects players from other networks",
  add: "no internet",
  if: function(player){
    if(player.connectedToOtherNetwork) return disconnect(player);
  }
})

2. Simple GUI

pkg({
  title: "Simple GUI",
  version: "1.0",
  add: "starter UI",
  onLoad: function(){
    GUI.create("MainFrame", {width: 400, height: 300});
    GUI.addLabel("MainFrame", "Welcome to Dummyscript!");
  }
})

3. Networking Example

pkg({
  title: "Realtime Chat",
  add: "networking module",
  onLoad: function(){
    Network.listen("message", (data)=>{
      console.log("Received:", data);
    });
    Network.send("message", {text:"Hello world!"});
  }
})

Reference

  • pkg(title, options) — Create a package.
  • GUI.create(frameName, options) — Create GUI frame.
  • GUI.addLabel(frameName, text) — Add a label to a frame.
  • Network.listen(event, callback) — Listen for network events.
  • Network.send(event, data) — Send network events.