13 ms·
I opened this game in an incognito tab. And started dev tools. The entire game is only 2.8 MB. It loads fast. Such graphics, much small. A lesson for modern we
by pvsukale3 9y ago
I opened this game in an incognito tab. And started dev tools.
The entire game is only 2.8 MB. It loads fast. Such graphics, much small. A lesson for modern web developers about website obesity and performance.
- subcosmos 9y agoAs an obesity geneticist, I fully approve of your invention of this term! LOL
- pvsukale3 9y agoHaha. This term is quite old actually. http://idlewords.com/talks/website_obesity.htm http://idlewords.com/talks/website_obesity.htm
- chickenfries 9y agoI mean this is nice but it's really not a lesson for web developers. The fact that this is 2.8mb doesn't really teach a web developer any lessons, unless you think that large website payloads exist because developers are literally too lazy or don't know how asset optimization works. Instead, having worked in web development, I know that website payload size is often driven by having to include vendored javascript for business reasons (analytics and social are big culprits) or because your boss doesn't give you the time to focus on performance because for the business, it is good enough and they want to use their limited web development resources to do something other than shrinking javascript payloads. Another thing, you're impressed by the graphics and how the developer was able to include them while keeping the payload small. It seems to be made using vectors and particle effects. Both of these techniques are not heavy in terms of payload. Shaders and particle effects are generally very small amounts of code. Think about how this is different for a website that heavily relies on all sorts of user-generated content: jpgs, mp4, gif, png, etc. Much larger assets than a few shaders and svg.
- fkld 9y agoOh please STFU
- sctb 9y agoCommenting like this will get your account banned, so please don't. https://news.ycombinator.com/newsguidelines.html https://news.ycombinator.com/newsguidelines.html
- rev_bird 9y ago>unless you think that large website payloads exist because developers are literally too lazy or don't know how asset optimization works. For what it's worth, I do think this. It's easy to just drag another JS library into your code without thinking of how long it's going to take to load.
- chickenfries 9y agoI don't know what to tell you if you're convinced that's the problem. I know and work with many web developers who do care about performance. I follow the blogs of many web developers who write about performance. I don't doubt that there are junior web developers who don't know much better. But I don't really meet anyone who says that they just don't care about performance.
- debaserab2 9y agoCaring about performance means weighing the decision carefully when choosing vendor libraries that fill up your payload. You can consciously care about performance but still be negligent to the things that affect it. I see competent devs reach for libraries all the time when a simple solution already exists within the language. It's easy to feel like you're doing the right thing by not reinventing the wheel. Areas I see this happening a lot in are anything dealing with file systems, HTTP request/responses, database connections, DOM/string manipulation/parsing/validation. The common theme among all these things is usually a lack of understanding of what the library/package does well enough to implement the specific use case needed.
- WhitneyLand 9y agoYes, also the immediacy of experience. No signup, no prompts or forms, no friction. Just one click and you’re immersed in the action. When companies clutter first experience with legal disclaimers, signup offers, and every other thing, I wonder if they are always carefully balancing the competing interests of business and product design as a big picture weighing everything together. To the extent they do that’s great, but it seems sometimes its a lawyer trying to do and think only of their job, a marketing person only thinking of their job, sales only thinking about revenue, rather than globally optimized decision.
- rictic 9y agoAnd developers only thinking about the development experience. In my next project I'm going to monitor the gzipped size of my deployed site as part of continuous integration.
- potench 9y agonpm bundlesize might help you: https://github.com/siddharthkp/bundlesize https://github.com/siddharthkp/bundlesize
- grondilu 9y agoThis is the kind of gaming experience I'm hoping webassembly will bring. No installation, just visit a website and play.
- iainmerrick 9y agoWhy do you need webassembly for that, since this game already works great right now?
- grondilu 9y agoFor more CPU demanding games, that is. Like AAA games.
- TeMPOraL 9y agoSo that you can write in something saner than JavaScript, for starters.
- iainmerrick 9y agoYou can already compile C/C++ (and I think Rust) to JavaScript via Emscripten.
- steveklabnik 9y agoYes, you can use Emscripten with Rust.
- thaumasiotes 9y agoIsn't that the gaming experience Flash already brought?
- jhasse 9y agoYou had to install Flash though.
- 9y ago
- 0xcde4c3db 9y agoAm I horribly out of touch to think that 2.8 MB seems big for this level of complexity? I'm not saying every web game needs to be a js1k, but that's roughly the size of a well-above-average SNES or Genesis game (e.g. Super Metroid or Phantasy Star IV).
- ivm 9y agoYes, but that's what the world without Flash games looks like. :)
- posterboy 9y ago> 2.8MB > small > website obesity Phis is not a website, but my throttled phone connection disagrees either way. Please have a look at js1k. Or go directly to size coding, e.g. .kkrieger, which is a FSP game techdemo in 96kb, see https://news.ycombinator.com/item?id=14409210 https://news.ycombinator.com/item?id=14409210