TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: I built a multiplayer voxel browser game engine

236 pointsby Vekzabout 2 years ago

23 comments

EarthLaunchabout 2 years ago
This is amazing! I read everything. I completely agree about the state of the &#x27;big three&#x27; engines.<p>&gt; My focus is still on browser multiplayer experiences.<p>Here&#x27;s mine: earth.suncapped.com (<a href="https:&#x2F;&#x2F;github.com&#x2F;Suncapped&#x2F;babs">https:&#x2F;&#x2F;github.com&#x2F;Suncapped&#x2F;babs</a>)<p>It&#x27;s been ongoing for 12 years, with several burnouts and rewrites, hah.<p>If you want, I would love to talk offline (email in profile) about player-freedom, MMO projects, and browser games. I feel like some of us have a shared history going back to older MMOs [0] and Flash browser games [1].<p>On my project, I sneaked past the hard networking problems by settling on tile-based movement. It worked for Ultima Online and I still believe in it. It scales really well. Networking zones measure 1000 x 1000, and tiles are 4 units, so X and Z can each be stored in 1 byte. This also helps with storing and transmitting tons of objects. See the page load time.<p>Actually, I sneaked past a lot of difficult things, which is what strikes me about your work - you solved hard stuff directly. I haven&#x27;t tried to integrate skeletal animations into my Blender pipeline yet. Yikes. I barely know how to write cameras, whereas you made a cross-platform one and blogged about it.<p>&gt; shared client &amp; server game code<p>How did this one go? I ended up literally doing a `ln` for shared frontend&#x2F;backend files.<p>&gt; React+Redux setup was too much performance overhead for the real-time gameplay section.<p>This is such an interesting aspect of web games: HTML-based UIs. I went with Svelte because I was curious about it. It is SO much easier than doing a game UI yes. But the &quot;line&quot; between web UI and game UI keeps being a problem. For example, when a player drags an object into a UI backpack: That object&#x27;s graphic needs to change from 3D mesh -&gt; mouse cursor -&gt; png icon. Craziness. I might scupper the whole thing.<p>A bit of a ramble, but in conclusion, wow!! Thanks for sharing this.<p>0: UO, Lineage, you said Exteel which I&#x27;d like to learn about.<p>1: (First Earth had a Flash version lol. Also a Babylonjs version.)
评论 #35709006 未加载
评论 #35708768 未加载
SeanAndersonabout 2 years ago
I&#x27;m still reading this, but I just wanted to say this bit of your analysis was SO cathartic for me to read:<p>&gt; React+Redux setup was too much performance overhead for the real-time gameplay section. The state updates through the Redux action reducer pipeline, and the minimal React render updates were enough to cause noticeable hiccups in the gameplay frame rate. Performance in the browser environment is susceptible to garbage collector management. To minimize garbage collector hits, you need to use object pooling. Object pooling is a mutable state management pattern in which you pre-allocate a pool of objects. The collection of allocated objects gets mutated and reused during the program&#x27;s life to minimize runtime memory allocations. This object pooling pattern conflicts with the immutable update patterns of React and Redux. Hitting these performance issues was a significant roadblock and essentially became a &#x27;rewrite&#x27; in which I had to rewrite the game state management to be performance optimized. This rewrite was costly and took a lot of time.<p>This is 100% the conclusion I came to when trying to build a web-first game from a React&#x2F;JS background and it&#x27;s wildly reassuring to read someone else coming to similar conclusions.
评论 #35709771 未加载
Xeoncrossabout 2 years ago
&gt; I&#x27;m writing this post to put closure on the project before moving on to new work and in the hopes that this experience may be helpful to any others interested in this space.<p>Thank you, as someone that has struggled trying things in new spaces I&#x27;m sure I&#x27;ve missed out on learning from others who came before me, hit a wall, and then walked away taking their knowledge with them.<p>I appreciate you sharing your story and work for others.
fenomasabout 2 years ago
Wow, as someone who&#x27;s been maintaining a JS voxel engine (&quot;noa&quot;) for some years now it&#x27;s surprising to find a bunch of influences here I hadn&#x27;t seen before. I also got started from the algorithms on Mikola Lysenko&#x27;s blog, but I&#x27;d never come across VoxLords at all. Great stuff OP!
评论 #35709647 未加载
pavlovabout 2 years ago
<i>&gt; &quot;When I started progressing with Stackgl, I took a year off and worked on it full-time throughout 2017. I lived off some savings and unemployment checks until late 2018&quot;</i><p>Impressive dedication, congratulations!<p>I did something similar when I was 23. (Now two decades ago - wow...) That project wasn&#x27;t a runaway success on its own, but it was a fundamental learning experience. Those years spent building a software project of my own, yet one meant for other people to use and extend, completely changed how I think about my career and life and its external dependencies.
steve_adams_86about 2 years ago
Not sure if they still are, but the folks over at DotBigBang were looking for a graphics engineer recently. I don&#x27;t know how much experience overlap you have with that role, but given your interest here, they might want to hear from you. They&#x27;re great people :)
评论 #35708286 未加载
iercanabout 2 years ago
Cool project, when you add multiplayer to a simple game without any game engine and want to actually do it right (CSP, interpolation, lag compensation) it gets technical really fast<p>I spent months trying to make a CS like in Three.js, then I was wondering myself if it was actually worth it<p>I could just have used a random game engine that can export to WebGL with wasm even if the first loading was bigger, people wouldn&#x27;t even notice nowadays<p>WebGPU is coming out if I&#x27;m correct, I wonder how good will web games run now
评论 #35708238 未加载
hmmokidkabout 2 years ago
Super cool! I love all multiplayer browser game efforts.<p>Ahh I want to share my browser 3d (tiny) mmo project!<p>It doesn’t work on mobile:<p><a href="http:&#x2F;&#x2F;rotb.io" rel="nofollow">http:&#x2F;&#x2F;rotb.io</a><p>I totally agree with the issue with browser build sizes. It is not nice with bigger engines! I was even hesitant to use React because I wanted to keep things minimal but it is too nice. Lol
评论 #35708985 未加载
TheRoqueabout 2 years ago
I also tried to make a browser game with WebRTC. This is a bit annoying to do IMO, but I am surprised that no really famous game leverages it (to my knowledge ? I mean I know that some games like openarena.live exists, but it&#x27;s niche), even though it&#x27;s essentially UDP in the browser, so it offers a lot more networking options than the games we see currently.
评论 #35709080 未加载
nergalabout 2 years ago
Very nice!<p>I&#x27;m the author of VoxLords, one of my early Voxel engines written for the web. Super fun to see&#x2F;read about other projects like this!<p>My last webgl voxel-engine was this one: <a href="https:&#x2F;&#x2F;github.com&#x2F;Lallassu&#x2F;voxelengine3">https:&#x2F;&#x2F;github.com&#x2F;Lallassu&#x2F;voxelengine3</a> (a bit more optimized than the VoxLords one) :)
preommrabout 2 years ago
&gt; The game dev UI complaint is because game engines use geriatric 2-way mutable state management UI code that is error-prone and brittle. Web developers have solved these UI complaints and built tools like React that make creating UIs easy<p>Borderline satire.
评论 #35708507 未加载
评论 #35710460 未加载
bee_riderabout 2 years ago
It was an interesting read. I don’t really have anything to add, but wanted to kick off a pedantry argument here.<p>&gt; I wanted to recreate a canceled MMO called Exteel in an .io style.<p>I think it should be “a .io style,” since the next letter pronounced is d.
评论 #35707652 未加载
评论 #35707740 未加载
terrycodyabout 2 years ago
What a great journey man! Open sourced your hard work will definitely save a ton of times for later curious developers, kudos!
mysterydipabout 2 years ago
Of my browser games, I&#x27;ve only ever finished 2D stuff. I&#x27;ve tried 3D a handful of times, different engines (or rolling my own) and backends. The javascript ecosystem and entropy as you said is a big stumbling block. It just moves too fast for the levels of dependencies needed when you make progress at the speed of a hobbyist.
nonethewiserabout 2 years ago
This write up is great. Frankly I’m impressed that you were motivated to develop this over such a long period of time. Where did the motivation come from?<p>Also, I’m impressed that you can remember the obstacles you overcame several years ago. Landon entropy, m1 conversion, etc.
评论 #35709105 未加载
RiadEtmabout 2 years ago
Impressive! Having already tried the simpler experience (development of a 2D web-browser game with multiplayer), things can get complicated very quickly and the way the project was carried out shows the quality of the work.
DoItToMe81about 2 years ago
What an awesome project. How well does it perform in the browser, though? I&#x27;ve never worked with them but I&#x27;ve always heard of voxels as kind of being a nightmare.
wetmoreabout 2 years ago
Enjoyed reading this, I came across your game engine when I found react-regl so I was psyched to see a retrospective.
aanariabout 2 years ago
Awesome work!
评论 #35707826 未加载
asadmabout 2 years ago
this looks great! I am also building one (<a href="https:&#x2F;&#x2F;joinplayroom.com" rel="nofollow">https:&#x2F;&#x2F;joinplayroom.com</a>) for casual 2d&#x2F;party games. It&#x27;s still a WIP but there is overlap.
throwawayjsabout 2 years ago
This is awesome! I too would like to one day build a 3D game myself.
pmayrgundterabout 2 years ago
works for me with node 16 on osx brave&#x2F;chrome
babuloseoabout 2 years ago
thanks for this :D I am interested in game engines.