Welcome to Codetoy 👋
Codetoy is a zero-boilerplate coding playground for learning, experimenting, and creating fun interactive experiences directly in your browser.
There’s nothing to install, no project setup, and no engine overhead — just code, a canvas, and instant visual feedback.
At its core, Codetoy is built around CanvasRenderingContext2D, so if you’ve ever drawn something on an HTML canvas, you already understand the fundamentals. Everything you write ultimately maps to 2D drawing concepts like shapes, paths, colors, transforms, and text.
Codetoy exists to be:
- A thinking tool for ideas
- A learning tool for programming and math
- A prototyping tool for mechanics and visuals
- A sharing tool for runnable code snippets and experiments
Supported Languages
All languages target the same canvas runtime and API.
AssemblyScript
Typed · WebAssembly · Fast
AssemblyScript is a strictly typed subset of TypeScript that compiles to WebAssembly.
- Familiar syntax for web developers
- Predictable performance
- Operator overloading
- Ideal for graphics, math, and experimentation
C#
.NET 10 · C# 14 · Unity-friendly
The C# playground runs modern .NET directly in the browser.
- Full C# 14 language features
- Familiar to Unity and .NET developers
- Excellent for math-heavy or game-style logic
Lua
Simple · Lightweight · Game-proven
Lua is a popular scripting language used in many games.
- Easy to learn
- Fast iteration
- Great for experimentation and scripting
Not Sure Where to Start?
Here’s a quick guide based on your background 👇
New to Programming?
If you’re completely new to coding, Codetoy will make more sense after learning the basics.
We strongly recommend starting with:
- Khan Academy – Computer Science
https://www.khanacademy.org/cs
Once you understand variables, loops, and functions, Codetoy is a great place to experiment.
Web Developer?
If you come from JavaScript or TypeScript:
- AssemblyScript typed subset of TypeScript that compiles to WebAssembly
- Better suited to game development with features like operator overloading and value types
- The best recommended choice for Codetoy projects
- Full LSP and Intellisense support!
Roblox Developer?
If you’re familiar with Roblox or Luau:
- Lua 5.4 is provided out of the box
- Luau support is underway (Join the discord to get notified when this drops)
- Luau intellisense and LSP support is also underway
Unity Developer?
If you use Unity and C# some concepts still apply:
Update()≈Screen.OnUpdate()Time.deltaTime≈Screen.DeltaTimeInput.GetMouseDown()≈Input.IsMouseDown(int button)- LSP support for .NET 10 and C# 14 is underway (Join the discord to get notified when this drops)
Coordinate System & Rendering
Codetoy uses a 2D canvas coordinate system:
- Origin
(0, 0)is top-left - X increases to the right
- Y increases downward (like Unity UI)
Next Steps
- Pick a language that feels familiar
- Skim the docs for that environment
- Draw something simple
- Experiment freely
Codetoy is all about curiosity and experimentation first.