Make games with EaselEasel
A game programming language designed for humans
Easel is a 2D game programming language designed to match how humans, not computers, think about game logic. Most game engines make you think in the frame-by-frame model to match how computers run games. Easel instead uses a hierarchical, event-driven and concurrent model designed to match how humans think about game logic. That's why experienced programmers find Easel refreshingly productive, but also why beginners find it approachable and fun!
Below is an example of a complete game that has not only ships, asteroids, lasers, but also a user interface, physics and multiplayer, all in 50 lines of code! In what other programming language can you express so much so quickly?
pub tangible category Category:Ship
pub tangible category Category:Projectile
pub prop owner.Score = 0
pub game fn World.Main(maxHumanPlayers=10) {
SpawnEachPlayer owner {
Subspawn ship {
use body=ship, radius=1, shape=Equilateral(numPoints=3), color=#00ffbb, layer=1
Body(pos=20*RandomVector)
PolygonCollider(category=Category:Ship)
PolygonSprite
on Pointer {
Heading = Angle(Pointer - Pos)
}
on ButtonDown(Click) {
behavior<thrust> on BeforePhysics {
Velocity += Heading.Direction * 0.5
Spark(color=#ff8800, bloom=5, shine=1, splatter=1, velocity=-25*Heading.Direction)
}
Spawn projectile {
use body=projectile, radius=0.25, shape=Circle
use color=#bb00ff, luminous=1, bloom=5, bloomAlpha=1, glare=1, layer=3
Body(pos=ship.Pos, velocity=50*ship.Heading.Direction, bullet=true)
PolygonCollider(category=Category:Projectile, parent=ship)
on Paint { Streak }
once BeforeCollide {
Score += 10
repeat 3 { Spark(splatter=1) }
Expire
}
once Tick(5s) { Expire }
}
}
on ButtonUp(Click) {
delete behavior<thrust>
}
await BeforeCollide
repeat 5 { Spark(splatter=1, speed=20, luminous=1, shine=1, bloom=5) }
Expire
}
TopContent {
with Score { H1 { %(Score) } }
}
}
on Tick(1s) {
Spawn asteroid {
use body=asteroid, radius=3, shape=Circle, color=#ff0000
Body(pos=RandomVector*50, velocity=-20*pos.Direction)
PolygonCollider(category=Category:Projectile)
on Paint { Spark(splatter=1, fade=#ff8800) }
once BeforeCollide, Tick(5s) { Expire }
}
}
}
Code multiplayer games without coding the multiplayer
Effortless multiplayer: Make games that are even more fun and meaningful by bringing people together. Code as if all your players are inside one shared game world, like a singleplayer game, and Easel will make your game multiplayer. Automatically.
Automatic multiplayer? How is that possible?Multiplayer is baked into the fabric of the Easel programming language itself. That is why anything you code in Easel is multiplayer without any special effort on your part. It's like magic!
Skip to the fun part: Multiplayer often takes years of programming experience to master, but not with Easel. No need to learn a thing about networking or synchronization. Don't know what a remote procedure call is? You never need to! Easel does all the multiplayer for you automatically so you can focus on actually making your game.
Beginner-friendly: No pitfalls or traps to avoid. No worrying about doing everything in a multiplayer-safe way. With Easel, it's impossible to make mistakes when it comes to multiplayer, even if you're a complete beginner. It just works.
Smooth and responsive: Easel's state-of-the-art incremental rollback netcode implementation will give your players a smooth and responsive multiplayer experience, even with players spread across the globe.
Learn to code, the fun way!
Make games you can play together: With Easel, making multiplayer games is so easy that you can even do it on your first day of coding. Learning to code is so much more engaging when you can actually play your game with your friends, family, teachers, classmates and anyone else online. You'll want to keep learning so you can make your games even better!
Powerful yet accessible: With its hierarchical and event-driven programming style, Easel has been designed to make coding intuitive, while maximizing the fun and creative possibilities. It is a great choice for your first programming language.
Get started right away: Code games in your web browser using our online editor, no download required. Even works on a Chromebook or iPad (with a keyboard), which makes it perfect for school students.
Learn by example: A great way to learn is by looking at the code for games you already know and love. That is why the source code to every Easel game is available to view and remix. Click the Remix button on any game page to see how it was made!
How does Easel compare to Scratch?Scratch is a great way to get started with programming, but it it is missing many important game features like cameras, physics, and multiplayer. That's why even some simple games can be difficult to make in Scratch. Easel is still beginner-friendly, but has all the features you need to make fun multiplayer games, right out of the box.
A safe, ad-free zone: Worried what your teenagers are being shown online? There are no ads on the Easel platform, so that is one less thing for you to worry about. Subscribe to Easel+ and support our safe ad-free zone where teenagers can make and play games.
Intrigued? Try our quickstart tutorial and see for yourself how easy it is to learn to code with Easel!
What is Easel?
Easel is a beginner-friendly programming language and online platform for 2D games. There are two things that make it really stand out:
- Easel can make your game multiplayer automatically.
- Easel has a unique programming model that is designed to match how humans, not computers, think about game logic.
Why is it so easy to make multiplayer games with Easel?
Even for experienced programmers, multiplayer is hard. When coding a multiplayer game, your entire codebase must be written in a "multiplayer safe" way. If even a single line of your entire codebase is not multiplayer safe, the entire game will desynchronize. It is easy to get wrong, especially for a beginner.
In Easel, multiplayer is baked in to the programming language itself. That is why, any code you write in Easel can be made multiplayer automatically, without any special effort on your part. Code as if all your players are in one shared world, like a singleplayer game, and Easel takes makes it multiplayer for you, taking care of all the networking and synchronization. It is completely automatic, and you can never get it wrong, even if it is literally your first day of coding. It just works.
Additionally, Easel is also the online platform that hosts all Easel games. Because all Easel games are made with the Easel programming language, they can efficiently share the same servers, making it cost-efficient enough that we can empower everyone of all ages to develop multiplayer games. Easel is democratizing multiplayer game development.
What does it mean, that Easel is designed to match how humans, not computers, think about game logic?
Most game engines require you to think in a frame-by-frame model to match how the computer is executing your code. Sometimes this requires converting your code into state machines, where the code flows in a non-linear fashion and so can be more difficult to follow.
Easel is a high level programming language/game engine. With its hierarchical, reactive, and asynchronous programming style, it goes even further than most to match how humans think about game logic. This makes Easel refreshingly productive for experienced programmers, and approachable and fun for beginners. Easel takes the barriers away so you can unleash your creativity.
What is reactive programming and why is it useful?
The way you code Easel is quite different to how you would code a game in another programming language because Easel is reactive. Below is a very short example which attempts to capture the essence of this idea. Imagine you want a health bar that transitions from green to red as the the hero loses health:
with Health {
PolygonSprite(color = (Health / MaxHealth).Mix(#ff0000, #00ff00))
}
Reactive programming is about declaring state (using a property like Health), then using a construct like a with block to declare how your game should use that state, not just initially, but also every time the state changes. In this case we displaying it by creating/replacing a PolygonSprite component. From that point on, we can forget about how the Health is displayed, we only need worry about changing the state (Health) and the game will respond accordingly by itself. This is how Easel lets you think at a higher level.
Easel does a lot behind the scenes to make those 3 lines work efficiently, only re-executing them when change occurs, and automatically removing the hook when it is no longer needed. See Why Easel? for a deeper dive into the details.
What is an asynchronous and concurrent programming language, and why is that useful?
Easel is an asynchronous programming language, which means you can simply use the await keyword to wait for something to happen, even if it takes a long time and crosses multiple frames. This allows your code to be written as a straightforward sequence of step-by-step instructions. The top-to-bottom layout matches the order they are executed. This makes your code more natural, intuitive and easier to understand.
loop {
await SpawnMonsters(99)
await AllMonstersDestroyed
}
Other game engines use a frame-by-frame model. That means if any actions take more than one frame, you need to split your code into a state machine so you can pickup the task again later. This means the flow of your code jumps around, which is not as intuitive.
For all of this to be possible, Easel is also a concurrent programming language. Easel games often consist of thousands of concurrently-executing behaviors. When a behavior is waiting for something to happen, it goes to sleep and does not take any resources, while other behaviors continue executing like normal.
In what way is Easel a hierarchical programming language, and how is that useful?
In Easel, you nest blocks inside of blocks inside of blocks:
Subspawn ship {
on ButtonDown(Click) {
Spawn projectile {
// ...
}
}
}
This is useful in two ways:
- Automatic cleanup: In Easel, lifespan is implied by the hierarchy. When a
shipdespawns, everything declared inside of it (like theon ButtonDown(Click)behavior), will automatically stop. This avoids an entire category of bugs with things outliving their intended lifespan and wreaking havoc. Structurally removing this worry is what enables concurrent programming in Easel, where games are often made of thousands of concurrently-executing behaviors. While that might be a nightmare to manage in another programming language, in Easel, nothing ever lives longer than it should. It's so worry-free beginners are constantly doing concurrent programming in Easel without realising it. - Reduce indirection: Some programming languages/game engines require you to declare a new function whenever you want to spawn an entity, attach an event handler, or create a particle system. When the effect is small and short-lived, the overhead of splitting off that code into another place, sometimes in another file altogether, makes your code hard to follow. Easel's hierarchical style lets you write the code within the context that it is relevant.
What is a game engine?
Imagine if, whenever an author wanted to write a novel, they first had to code their word processor (e.g. Google Docs or Microsoft Word). Only people who possessed both programming skills and creative writing skills would ever write books, and the world would miss out on many masterpieces. Your favorite book might never have been written.
When it comes to games, not everyone has the time or interest to program all the graphics pipelines, audio systems, physics, etc needed for a game. A game engine to games is like Microsoft Word is to books. It is a tool full of features that let you skip ahead and start actually making your game. Easel is one example of a game engine, but there are many.
What is the benefit of an integrated game engine/programming language?
A game engine needs to have a lot of features to be useful - graphics, audio, user interface systems, physics, multiplayer and more. Most game engines include a programming language of some form to coordinate everything, but because both making and learning a programming language are such a great challenge, most use an existing programming language like C# or Lua, and are unable to reshape the programming language to fit their needs.
Easel is unique in that it is both a game engine and a programming language, in one. Being able to reshape the programming language for the game engine enables certain features to be achieved that could not be achieved any other way:
- Most notably, the only reason multiplayer can be automatic in Easel is because it is baked into the programming language itself.
- The user interface system can only be so simple because some parts have been built into the Easel compiler.
- Behaviors are a key Easel feature that reshape how you do everything in Easel. Their reliable order-of-execution and controlled lifespans that make them worry-free are only possible because they have been built into the programming language itself.
I'm new to programming. Is Easel for me?
Yes! Easel is designed to be a great first programming language. Learning to code is like learning to swim or riding a bike - you cannot just read books about it or watch video tutorials. You have to actually do it. Easel makes this easy in a number of ways:
- No installation required, which is often the first hurdle. Get started instantly with the online editor and all game-making functionality built-in.
- Because Easel is designed for making games, it enables a quick iteration cycle between writing code and seeing its effects visually, allowing you to learn by doing.
- Easel has intentionally been designed to be intuitive with its hierarchical and event-driven programming style, which makes it easier to learn while having fun way and without getting discouraged.
- Learn by example. Lets say you want want to add a leaderboard to your game. The source code to every Easel game is available, which means you can find another Easel game with a leaderboard and learn how they did it!
- Play together! Easel games can be published online with just a few clicks and instantly shared with your friends, family, teachers, classmates or other people online. Sharing your learning-to-code journey with other people will make it more meaningful and help you stay motivated.
I've been programming for a long time. Is Easel for me?
If you've programmed before, you'll have a lot of fun making games with Easel. Its hierarchical approach and its event-driven concurrency model let you be refreshingly productive. Easel is both familiar but different from other programming languages and it will inspire you to think in new ways.
At the same time, Easel is first and foremost designed to be approachable to beginners, and there are numerous instances where we have intentionally chosen simplicity over power. Be warned - Easel is not Unity, Unreal or Godot and ambitious programmers may become frustrated by its limitations. We hope people love Easel in a similar way to Pico-8, another fantasy console engine that has been kept simple intentionally. The constraints breed creativity, and allow you to actually finish games instead of letting your dreams spiral out of reach.
Is Easel free?
Easel's generous free tier is enough to make a complete games and share them with your friends and classmates, so you can get started right now!
If you intend to make your game for the world (we are talking hundreds of players a month), you may need to subscribe to Easel+ to cover the bandwidth costs, and/or encourage your players to subscribe. By subscribing to Easel+, you'll be helping in our mission to bring the joy of coding to the next generation.