Haiku is video game engine based on WebGPU written in Typescript.
We provide a simple, pragmatic and lightweight development kit to build web games with high performance.
Our priority is to eliminate black boxes and giving a maximum control to the user.
Important note: This engine comes with a dozen of diverse and varied examples here.
- ๐พ 2D - Sprite, tilemap with animations
- ๐ง 3D - Debug shapes, mesh, sprite, billboard, skybox, walkmesh, multiple-camera, ray, nav-mesh, mover, particules
- ๐ฅ VFX - Phong, displacement-map, normal-map, env-map, specularity-map, texture scrolling
- ๐ Light - Directional light, multiple point lights, vertex lighting
- ๐ฎ Input - Action mapper for keyboard and gamepad
- ๐ Pathfinder - A* for 2D & 3D
- ๐บ Screen - Handle different screens of your game
- ๐ Scripts - Write game behaviors
- ๐ Sound - Sound manager built on the Web Audio API
- ๐ณ Tree - Binary Space Partition for 2D & 3D
- ๐จ UI - Component architecture to keep project clean and scalable
- ๐ DNA - Development normalized architecture
You need to install nodejs. Once installation is done, let's build our first project.
// create your haiku project
# npx create-haiku your_project_name
// now, you can start with
# npm run dev
The Haiku Blender Exporter allows you to export your models in compatible formats! Important note: The Blender coordinate system and the engine don't match, this is the rule to translate:
blender = engine
----------------
x = -x
y = +z
z = +y
Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!
- Fork the Project
- Create your Feature Branch (git checkout -b new_feature)
- Commit your Changes (git commit -m 'Add new feature')
- Push to the Branch (git push origin new_feature)
- Open a Pull Request
- Use DOM for UI elements
- Use human readable custom format for all graphics stuff
- No physics engine, we assume if you need one there is many pretty lib for that like ammo.js or canon.js
- No multi-pass rendering
Chrome Canary: 113+
Edge Canary: 113+
As WebGPU is not released, please enable
chrome://flags/#enable-unsafe-webgpu
oredge://flags/#enable-unsafe-webgpu
- Lens flare renderer
- Sun renderer
- Quaternion
- Fog
- Vertex Color Multiplier (Owner: me, Delay: N/A)
- Add converter bsp -> grid for pathfinding (Owner: thetinyspark, Delay: 1 Mounth)
- Add jumps in fps sample
- Transform a-star in a generic way (2D & 3D)
- Add triple-triad demo (Work: In Progress, Delay: 1 month)
Haiku engine is released under the MIT license.