Giter Club home page Giter Club logo

haiku's Introduction

logo

Drag Racing Drag Racing

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.

General features

  • ๐Ÿ‘พ 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

Getting started

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

How to integrate your 3D models ?

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

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!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b new_feature)
  3. Commit your Changes (git commit -m 'Add new feature')
  4. Push to the Branch (git push origin new_feature)
  5. Open a Pull Request

Some parts taken for this work

  • 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

Platform

Chrome Canary: 113+
Edge Canary: 113+

As WebGPU is not released, please enable chrome://flags/#enable-unsafe-webgpu or edge://flags/#enable-unsafe-webgpu

First todo-list

  • 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

Second todo-list

  • Transform a-star in a generic way (2D & 3D)
  • Add triple-triad demo (Work: In Progress, Delay: 1 month)

License

Haiku engine is released under the MIT license.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.