Dev Blog #3:
WebGL, Physics, and Multiplayer Chaos
The Great WebGL Migration
We did a massive upgrade to the engine! Using Three.js, we built a brand new InstancedMesh architecture.
This is just a fancy way of saying we tell the graphics card to draw the exact same 32-unit voxel block thousands of times all at once.
Because of this and our new dynamic memory texture atlas, the game runs incredibly fast. We're easily hitting over 144 FPS even when looking at huge maps!
Organic Grid Breakers
A big flat field of just grass gets super boring to look at. We wanted the landscape to feel gritty and natural.
To fix this, we updated the engine to automatically generate patches of dirt breaking through the grass. This breaks up the blocky visual repetition perfectly, and it doesn't cost us any performance at all!
Shapes and Colors!
Your building tools are super handy. You use cubes for your main walls and floors. Slabs are half-height for small details. Stairs help your character run up levels. Slopes give you smooth angles so things don't look like boxes.
Instead of loading hundreds of different colored blocks and lagging the game, the engine lets you take a base texture and tint it to whatever color you need. This is exactly how you handle things like colored water and custom materials.
Fluids, Friction, and Hazards
Walking around shouldn't always feel exactly the same. We added totally distinct block physics! Now, when you run across ice you will slip and slide. If you walk into mud, you'll trudge slowly.
We also got fluids working so you can swim through water, acid, and lava. But watch out! Acid and lava apply environmental damage to you. To make it clear you are getting hurt, we added it to the damage indicators so that pops numbers right over your head!
Paper Airplane Combat!
What's a game without a little ranged combat? We started working on our projectile system, and there are plenty of quirks to keep it interesting.
You can now throw crumpled up balls of paper, or fold up some neat paper airplanes! It is super satisfying watching them track and fly all across the 3D space to hit their targets.
Our new projectile spritesheets!
Fun Upgrade Idea:
Since throwing normal paper is so much fun, we considered an awesome upgrade. We want to add heavier, colorful construction paper airplanes soon!
Multiplayer Chaos & The Blooper
Testing multiplayer is fun, but it can get out of hand quickly. During one of our tests, our friend Iridian found a huge flaw in our early network code.
Because the code wasn't secure yet, he was able to change his local files and set his attack cooldown to exactly zero. He fired a massive, screen-filling wave of paper airplanes that completely obliterated me!
It was absolutely hilarious, but it taught us a very important technical lesson. We are now heavily fortifying our Node.js backend to be authoritative.
This means the server is the boss, and it checks all the math so players can no longer execute hacked code on their clients to cheat!
Stay tuned for more updates as we keep adding life, physics, and even more fine-tuned player controls!