Show HN: My multiplayer custom-engine game that loads in less than a second
vnav.io
vnav.io
It pings a random server in each region to find the nearest region, which is found by finding the server that replies first, since nearer servers are closer. Then it pings all servers in a region to find the number of players. It randomly picks from the server with the two least number of players. Then the JavaScript transparently pre-loads game resources (mockups.json and skillmap.json) by appending a <link rel="preload"> to the <body>. That way, once the game starts, "fetch" will find preloaded resources.
80% of players said it was very fun.
Also congrats on the fast load time! Slow JS is my biggest peeve about the modern web. My "daily drivers" are all under-powered hardware -- I have not spent more than ~$250 on a computer in like a decade -- which 1) forces me to develop lightweight & quick frontends, and 2) reveals just how awful so many websites are for anyone who isn't using the maxed-out MacBook Pro that the original developer used.
And sure there are exceptions, some programs just need a beefy machine, but many times there are mundane things like fi. a dozen unnecessary redraws of a list that go unnoticed on the latest threadripper with RAID-0 NVMe disks, but make the UI jump and twitch in an irritating way on slower hardware.
We've ended up collectively trading availability of applications for performance I'd say because of things like electron.
And yes it is a tradeoff.
KDE and Linux however is still blazing fast so there's still some[1] speed advantage.
[1]: and sometimes, like with git, command line applications and compiling - a whole lot.
> 80% of players said it was very fun.
Curious how you got this statistic, do you ask this in-game or did you do a case study with some friends?
Btw I just played and found the FPS to be quite low (there was a lot of things firing on me). This was Firefox on Windows. (Edit: tried Chrome and there is a visible difference, so you seem to have a bottleneck on FF)
I suggest making that script async, so it loads after defer scripts, which you should add to your main game scripts.
> Curious how you got this statistic, do you ask this in-game or did you do a case study with some friends?
With friends and based on online feedback.
This accurate statement is correct.
(And if you can't do that, please share my game on social media!)
I kept working on this with almost all my free time even after making zero technical progress (on making it high-performance and smooth) for four months.
My second word of advice: Never make a logo or name before your MVP, unless you need to convince investors. (I don't have investors so I can't speak on the relevance of a good logo and name.)
- If you're making something good, people will make logos for you. My logo was made by a community member for free.
- My team started choosing our name an hour before we launched. Once you know your market well and your product well, choosing a name is easy.
Is there anything inherently useful in running a domain like .io?
You’ll see why barely anyone in Puerto Rico uses them
Instead we use examplepr.con
plenty of other options without baggage out there nowadays.
I connected to a geographically far away server (US West, from Europe) and there's a bit of a delay between keypresses and movement, and the movement of other units is somewhat choppy, I imagine due to network latency.
Have you thought of implementing client-side prediction and entity interpolation? Your game seems uniquely well-suited for these techniques, and if you made them part of the core engine, you might find yourself with an extremely popular product, since it's a complex feature to implement that everyone wants.
I've written at length about the topic here: https://gabrielgambetta.com/client-server-game-architecture.... If you go for it and you have questions or get stuck, I'll be happy to help :)
I think the end-result is really good, almost no client-side input delay.
https://diep.io - original, abandoned
https://arras.io - fan made sequel
http://woomy-arras.io - sequel of sequel
(None of these load as fast)
<link rel=preload href=FOO.js as=script>
<script async src=FOO.js></script>
That is, a preload, followed immediately by using it (rather than using it much later in the document, as was the original intent of preload links).(On this submission, servers.json receives this treatment. While talking of servers.json, two things are odd about it: although served as JSON, it’s actually JavaScript, and a random cache busting parameter is added to its query string, rather than the server just instructing the client not to cache it.)
I cannot imagine any way in which this makes sense: the preload line should be 100% superfluous (and thus mildly counterproductive). Is there some utterly bizarre reason why this does actually help things, or is it just simple cargo culting of a corrupted idea as I presume?
I THINK If the resource is async, it will still scan the document to find all resources before the downloads begin. Adding preload basically just tells the browser that the resource is important and should begin the download immediately.
Found this, kind of explains it https://speedcurve.com/blog/preload-scripts/
Every single time I’ve seen it done, it’s been used for all scripts. I’ll have to check at some point whether what you think is correct or not. I can easily imagine it going either way.
(Edit: actually, on reflection, sometimes there may be analytics-type scripts that don’t get this treatment, so yeah, if that’s the case it would make sense.)
> than the server just instructing the client not to cache it
Easier said than done, especially when it's served from a CDN you don't control the headers of.
Using a <script> tag and a callback is known as JSONP– this technique is used to bypass Cross-Origin Resource Sharing (CORS) for data fetching.
Edit: New game servers are up. If your game is lagging, refresh the page.
Some instructions might help or even a highlight on the points allocations at the bottom left.
or did I miss these? probably :D
(To add to the fun, there are also community colleges, state colleges, and private colleges, all of which provide a college education but on a smaller campus than a university. Universities are generally quite large.)
(Edit: for fellow US-ians, I'm vaguely aware that in some non-US places, "college" refers to something we'd either call highschool or in-between highschool and college)
College is (generally) divided into two categories, undergraduate, and graduate education. Undergrad constitutes broad and shallow education with an emphasis on a particular subject. Graduate education is much more in-depth and more selective of potential students.
I believe it's technically possibly to skip the undergrad phase and skip to getting a master's or doctorate degree, but almost never happens in practice. The hierarchy, both for higher education and the job market, expects you to have all of your "lower level" degrees, in spite of your actual abilities.
Even if you drop out of highschool and have a college degree, some jobs will still require you to get a highschool diploma substitute.
I'd love a way to change the keybinds; using Dvorak means this is wholy unplayable for me (also a mech keyboard that doesn't have up-down-left-right in a traditional/usable access as you'd expect on most keybs.
Anyway, it definitely looks fun, and man did that load fast!
I died a few times before figuring this out (and killed a few players who were obviously flying without upgrades).
Honestly the game really needs more balancing as I took a while to find a build which can defeat Necromancer.
License: GPLv2+. Note the GPL doesn't apply to your server code or any art you use. The only thing this asks you to do is publish your client source code.
FullStory, Google Analytics, and Sentry for monitoring and analytics.
If you ever decide to replace some of those analytics platforms with a more private solution you can have a look over my project: https://usertrack.net/
We don't have ads yet because of the Google monopoly that leads to them not partnering with games with fewer than 1 million MAU. We plan to add ads. However, I want to migrate our business off the ad market. Ideas include merchandising. Please feel free to send me suggestions for migrating off, ideally without making the game toxic or addictive.
Fun game though! Just needs a little more balancing.
I think the biggest thing is discoverability, both of the ship types and of the fact that you have resource points to put into the ship at the start. I embarrassingly didn't find that until probably my 20th death, and, on the turn I found it I cruised to the top of the leaderboard and never want back, leading me to think that no one else was finding it either.