Building Excalibur.js
Open Source TypeScript Game Engine
Erik Onarheim // IGDATC July 2024
Fellow Maintainers, Contributors, and Partners in Crime
Jae Edeen - https://www.edeen.dev/
Kamran Ayub - https://kamranicus.com/
Matt Jennings - https://mattjennin.gs/
Justin Young - https://mookie4242.itch.io/
Chad Elstad - https://www.smartmarbles.com/
Chris K - https://www.chrisk-7777.com/
Drew Conley - https://drewconley.dev/
Alan Grgic - @spellgrgicright
About Me
@ErikOnarheim
erikonarheim.com
excaliburjs.com
🏢 Full Stack Dev
🕹️ Game Dev
👶 New Dad
😻 Cat Lover
🏃♂️ Distance Runner
🚀 Math/Physics Nerd
Agenda
Why?
Releases
Excalibur Philosophy
❤️ Friendly Everywhere
🛠️ Low Effort to Use
🧠 Intuitive APIs
⚡ Performance Balanced with Usability
Features
📖 Lots of documentation at excaliburjs.com
🎥 API based on a theater metaphor of Scenes and Actors
📦 OOP TypeScript first API similar to Unity/Godot
🏃 SpriteSheet, Sprites, and Animations
💥 Built in collisions with Arcade or Realistic physics
🧩 2D and Isometric TileMaps
🎨 Custom shader support
🖼️ Auto draw batching
🎁 Entity Component System!
Plugins
🗺️ Tiled maps
🧩 LDtk levels
🎯 Sprite Fusion levels
🖌️ Aseprite image files
🎶 JSFXR audio
↗️ A* Pathfinding
Templates
Vanilla
Vite
Parcel
Webpack
Rollup
Capacitor.js
Electron
Tauri
Browser Extension
Samples
Sweepstacks: Most Popular Game
Lessons learned
Sum Monsters:
2nd Most Popular
Let’s build a game!
“The dirty secret to building games (or software) is tricking you users into thinking it’s working”
- Erik Onarheim
Backup Video
Tiny Tactics
How does Excalibur work?
Architecture:
Engine Mainloop
🚂
Architecture:�Scene
Excalibur ECS
💎Purity is not the goal
🧠Users need not know it exists
⚡Purely to increase performance
💼Code Organization
ECS Design
World
Architecture: Actor/Entity
Architecture: Actor/Entity
Graphics
Context Abstraction
WebGL2 based
Pixel Art Presets
MSAA
Renderer Plugins
Shaders
Post Processing
Automatically batched draw calls
Architecture:
Graphics
Graphics
Graphics Context:
Mimics 2D Canvas API
Custom Shaders
Post
Processing
Sound
Collisions
Detection
Resolution Arcade & Realistic
Collision Resolution: Arcade
How does it work
Collision Resolution: Realistic
Particles
Currently CPU
GPU Particles Coming Soon
TileMaps &
Isometric Maps
Coroutines
JavaScript Optimizations
Measure, optimize, repeat
Efficient Data Structures “Do Less Work”
C-style loops
Avoid recursion
Reduce/remove allocation in hot loops
Object pooling
Caching
The FUTURE
The Future: Accessibility
Accessibility
The Future: Headless
Multiplayer servers
Node/Bun/QuickJS capabilities
Faster tests
The Future: WebGPU
The Future: Continuous Collision
Erin Catto, GDC 2013
The Future: Excalibur Studio
The Future: Consoles
Excalibur JS Runtime
The Future: Publishing
Sum Monsters - Steam
Sweepstacks - Mobile
Shameless Plugs
Newsletter! - news.excaliburjs.com
Excaliburjs.tv - excaliburjs.tv
Blogs - excaliburjs.com/blog
YouTube - https://www.youtube.com/@ErikOnarheim
2D Con in August
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
Arcade Style Platformer
https://github.com/excaliburjs/sample-platformer/tree/presentation
Samples & Templates
Examples
Examples
Docs
Advice for building games
Sweepstacks: Most Popular Game
Lessons learned
Running an Open-Source Project: More than Code
Documentation is the most important thing
Community is like a garden
Contributions are never over
Automate all the things
The Code™
Avoid spending money (unless you should)
Sustainable Open Source
Celebrate your successes!
What’s next for Excalibur?
The Roadmap
Accessibility Updates
More Plugins for popular tools (Aseprite, Tiled, Pyxel, etc)
Performance Improvements
Resource Management
Web Workers
WebGPU
WASM Optimization using AssemblyScript
More info
Contributing to OSS: https://www.pluralsight.com/courses/contributing-open-source-project-github
Blog: https://erikonarheim.com
YouTube: https://www.youtube.com/c/ErikOnarheim
Twitch: https://www.twitch.tv/eonarheim
Podcast: Script & Style with David Walsh and Todd Gardner
Q&A