C# Linting support + More Complete API Across All Languages

This update brings a whole host of new features and improvements including C# Linting support as well as a lot of additions in the playground API for all languages.

Let's start with C# Linting support. While it was technically already working I had failed to get working with Monaco properly. That is now fixed and you should now get proper inline compile errors in Monaco rather than trying to decipher the compile errors in the console.

As for the playground API improvements you can read below for a full list of what has been added.

Playground improvements

  • Get C# linting whenever you run code (only updates on run, there is currently a bug preventing on demand linting)
  • Added the ability to fullscreen your game
  • Reloading the page will now warn you if you have unsaved changes
  • Added pause button
  • Moved the play, pause, and fullscreen buttons to the game view

C# API Additions View docs

  • Added Canvas.Reset()
  • Added Canvas.Push()
  • Added Canvas.Pop()
  • Added Canvas.Stroke(r, g, b, a = 1.0)
  • Added Canvas.LineWidth(double width)
  • Added Canvas.LineJoin("round" | "bevel" | "miter")
  • Added Canvas.LineMiterLimit(double limit)
  • Added Canvas.LineCap("butt" | "round" | "square")
  • Added Canvas.Line(x1, y1, x2, y2)
  • Added Canvas.Scale(x, y)
  • Added Canvas.Rotate(radians)
  • Added Canvas.Translate(x, y)
  • Added Canvas.ResetTransform()
  • Added Canvas.BeginPath()
  • Added Canvas.MoveTo(x, y)
  • Added Canvas.LineTo(x, y)
  • Added Canvas.BezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
  • Added Canvas.QuadraticCurveTo(cpx, cpy, x, y)
  • Added Canvas.ClosePath()
  • Added Canvas.FillPath()
  • Added Canvas.StrokePath()
  • Added Input.IsKeyDown(string key) → bool (if the key is being held down)

AssemblyScript API Additions View docs

  • Added isKeyDown(key: string): bool
  • Added canvas.reset()
  • Added canvas.push()
  • Added canvas.pop()
  • Added canvas.stroke(r, g, b, a = 1.0)
  • Added canvas.lineWidth(width: number)
  • Added canvas.lineJoin("round" | "bevel" | "miter")
  • Added canvas.lineMiterLimit(limit: number)
  • Added canvas.lineCap("butt" | "round" | "square")
  • Added canvas.line(x1, y1, x2, y2)
  • Added canvas.scale(x, y)
  • Added canvas.rotate(radians)
  • Added canvas.translate(x, y)
  • Added canvas.resetTransform()
  • Added canvas.beginPath()
  • Added canvas.moveTo(x, y)
  • Added canvas.lineTo(x, y)
  • Added canvas.bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
  • Added canvas.quadraticCurveTo(cpx, cpy, x, y)
  • Added canvas.closePath()
  • Added canvas.fillPath()
  • Added canvas.strokePath()

Lua API Additions View docs

Lua uses a globals only based API so you can directly access the entire API without needing to import anything.

  • Added isKeyDown(key: string): bool
  • Added isMouseDown(button: number): bool
  • Added function onKeyUp(key: string)
  • Added function onKeyDown(key: string)
  • Added reset()
  • Added push()
  • Added pop()
  • Added stroke(r, g, b, a = 1.0)
  • Added lineWidth(width: number)
  • Added lineJoin("round" | "bevel" | "miter")
  • Added lineMiterLimit(limit: number)
  • Added lineCap("butt" | "round" | "square")
  • Added line(x1, y1, x2, y2)
  • Added scale(x, y)
  • Added rotate(radians)
  • Added translate(x, y)
  • Added resetTransform()
  • Added beginPath()
  • Added moveTo(x, y)
  • Added lineTo(x, y)
  • Added bezierCurveTo(cp1x, cp1y, cp2x, cp2y, x, y)
  • Added quadraticCurveTo(cpx, cpy, x, y)
  • Added closePath()
  • Added fillPath()
  • Added strokePath()

That's all for today! I hope you enjoy it, and I'll see you in the next one!