💾 Archived View for gemini.robrohan.com › 2018-05-12-mesh-game-engine.md captured on 2022-04-28 at 17:28:23. Gemini links have been rewritten to link to archived content
-=-=-=-=-=-=-
---
author: rob
date: 2018-05-11 08:00:00+11:00
slug: mesh-engine-status1
title: Mesh 3d Engine Progress
---
I've been obsessed for the past few days trying to get my little 3d game engine closer to useful. I've had some progress this weekend. It was frustrating, but also very fun.
Mesh, by the way, is a 3d game engine I am writing from scratch. From the vector and matrix classes, all the way up to the WebGL shaders. It's 100% in Typescript (well it was up until Saturday, now it's Typescript and EcmaScript).
The goal is to create an engine that can make a game that similar to Half-Life or Quake 2. Or, at the minimum, learn enough lessons to have the next one do that :)
This weekend I finished up the basic CI/CD pipeline. The code will auto deploy from master, which is nice because now I can let my [friends play with the demos](http://mesh.robrohan.com). Granted there isn't much, but here is some of the cool stuff I got working over the weekend:
I wrote the initial physics engine from scratch - it was terrible. I was using plain old axis aligned bounding boxes, a naive broad phase, and a brute force solver I just made up. It worked for some small demos, but it was clear it wasn't going to work long term.
I caved in. Instead I started adding a library called [Cannon.js](http://www.cannonjs.org/). I've fully replaced the _PhysicsSystem_ with a copy of Cannon, but I think I am going completely fork the project and port it to Typescript. Mesh went from 70kb to over 200kb, and I think most of that is duplicated bits that I (or webpack) can strip out.
Anyway, you can checkout the [basic physics demo here](http://mesh.robrohan.com/#cannon) (refresh for random positions).
![Cannon Boxes and Spheres](/wp-content/uploads/2018/05/cannon.png)
Or if you have a monster machine, and want to see garbage collection thrashing looks like, try the [attack of the boxes](http://mesh.robrohan.com/#physics):
![A lot of boxes](/wp-content/uploads/2018/05/boxes.png)
I've got the very, very basics of sound working. I put together a little ditty to go along with the mesh logo. Sadly Chrome wont auto play on initial load anymore, so you might have to refresh the page (or click 'Mesh' link on the upper left) - I think it's worth it. Moving around looking at the Mesh logo while [the music plays...](http://mesh.robrohan.com/#sound) nice.
![Mesh logo](/wp-content/uploads/2018/05/mesh.png)
Look out Valve I am coming to get you :)