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.
I 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.
>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.
I 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.
Caring 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.
If you balance pay vs. skill and the rarity of such an incredible web game...things are quite the way they should be. Reality. No one is going to pay an average web developer to care that much because they themselves do not care enough to invest in the talent or the time involved.
Website payload is easily measurable (it is probably the most easily measurable factor), and optimizing it is attractive to developers. That doesn't mean it is the most important factor, much less the only important aspect of development.
Rather than "lazy" or "don't know", how about: - it's fast enough - have other priorities (security, stability, usability, functionality) - optimize developer time ...
This is true for the sites, however then it's the vendors who are then lazy and put out bloated packages, which is much worse since they have an outsized impact on all the sites they're included on.
Yes, 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.
And 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.
Am 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).
> 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
Comments (304) 119 threads
Show all comments
Showing thread 4 of 119
http://idlewords.com/talks/website_obesity.htm
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.
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.
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.
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.
Continue this thread — 4 replies
Continue this thread — 7 replies
Rather than "lazy" or "don't know", how about:
- it's fast enough
- have other priorities (security, stability, usability, functionality)
- optimize developer time
...
Continue this thread — 6 replies
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.
Continue this thread — 2 replies
Continue this thread — 2 replies
Continue this thread — 2 replies
> 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