Thoughts about games on the web

The last 40 years were crazy for the video game industry. So much changed about what games are, where we play them, how we play them and of course… How they’re made ! Let's talk about the state of game development and what it could be in the future.

I started programming in high school in 2019, during a Python class. As a gamer, of course my end-year project was a game ! Evergarden was a 2D rogue-like game, made with Python and the well-known Pygame. You can still find the game on itch.io.

EvergardenEvergardenEvergardenEvergarden

At that time, I wanted to create games for a living. But even though this was a fun experience (as I was learning and developing my skills), a few things didn’t feel right :

  • Releasing a game made using Python isn’t easy. Somehow, you’ll need to create a final package, containing your code, your assets and… Python of course. Not an easy step, specially as a beginner. How can the code be so easy to write, but the final packaging such a mess to create ?
  • Basic technical concepts didn’t work well. Displaying an image at (X, Y) position is easy. But handling collisions, scenes, interactions, or audio clearly isn’t when made from scratch. Not even talking about physics and gravity…

I think this is where I started to realize that games aren’t so easy to make.

I then discovered web development and felt in love with it, but we’ll keep that for another blog post ! Just keep in mind I did web development since then, and I’m now a full-time web developer.

Game Engines

Most of the problem I encountered are solved by using a professional game engine, like Unity or Unreal Engine :

  • Unity was used to make : Pokemon Go, Genshin Impact, Cuphead, Hearthstone, Outer Wilds, Fall Guys, ...
  • Unreal Engine was used to make : Fortnite, Kingdom Hearts, Valorant, Sea of Thieves, PUBG, It Takes Two, ...

You get they’re pretty much the only 2 professional game engines used widely across the industry. The only exceptions are -very- big companies using their own internal engine, such as Nintendo, Rockstar Games1 or Infinity Ward2.

Recently, there is also Godot that started to get a lot of attention, specially because of the Unity runtime fee drama3. Even Brackeys (probably the most influential game dev) came back to YouTube using Godot4 !

But in the end, they’re pretty much all the same kind of software :

Unity UIUnreal Engine UIGodot UI

The problem

Now what’s the problem ? No one seems to be really mad at these engines in a technical aspect.

Of course people are defending their preferred engine against the others, that is how the internet work. But it seems nobody really questioned the fact that this is how games are made.

Why ?

Well either :

  • This is the best way to make games, in every aspect.
  • Imagining any kind of "engine" for games is too long, complex, and expensive.

This is a very difficult question to answer, but I feel the second option is very probable. Game engines are some of the hardest kind of software to create, such that they struggle to profits from the open-source philosophy that galvanize the web industry for the last decades.

So let’s state a few things :

It should be easier

Unity and Unreal Engine aren’t easy to master. Creating very basic games is already not a fun task. Somehow, you'll need to learn about the engine itself, the language it uses, the way it handles assets, scenes, physics, collisions, events, audio, shaders, ... It’s a lot of things to learn, and it’s not even about making a game.

The same way web development is VERY easy to start with, game development should be too. Writing a bit of HTML and CSS is already enough to create decent websites, but dropping a few sprites in a game engine isn’t enough to create a decent game.

Web development is easy to learn, but hard to master (as all things).

Game development really is hard to learn, and even harder to master.

You should be independent

Almost all your activity depends on a single company, that could add weird fees at any time or not improve their product as the community wants to.

The recent Unity runtime fee drama is a perfect example of how a company can change the rules for everyone, at any time. This is not a good thing for the industry. Your game should be yours, and you should be able to do whatever you want with it.

Too long to get started

Why am I supposed to download -by hand- a specific version of Unity and launch a whole heavy software just to drag and drop a few models or sprites ?

Loading a model shouldn’t be much harder than :

const myModel = new Model("path_to_model")

How it relates to the web industry

"Games are already hard to create, please do not change my entire engine every week like this is a JavaScript framework"

I may be overdoing it a little, but the parallel with the state and evolution of the web industry is quite interesting.

Very far from game engines, web technologies are clearly 99% open-source libraries that are the best at what they do. It’s all thanks to the efforts of very talented developers all around the world, that tends to create tools that make web development faster and easier.

Many incredible FOSS5 such as Node, Vite, or esbuild affected the web industry in different but meaningful way. It’s pretty clear now that the industry is backed by folks empowering the entire planet with very powerful technologies, right from their bedroom.

Big tech companies, like Microsoft6 or Google7 now invests in FOSS, as they understand to what extent they are dependent on it. It is pretty amazing to see that open-source technologies are the best one in the web industry.

Recently, technologies such as Nuxt or Next along with services like Vercel or Coolify are pushing the web developer experience to its limits.

The web did't just kept evolving for the last decades, but it seems the evolution is still constantly accelerating. Of course, it has some "downsides" ; the JavaScript ecosystem is well known for moving so fast that a new framework comes out every week. But this is a worth trade, considering how much better it made our activity.

Meanwhile, game engines are basically 2 pieces of software backed by 2 companies. It only evolves at will of the author company having the time, money, and ideas to make it better. But they inevitably lake one of these at a given moment.

It could be better

The best opportunity we have to get out of this situation is a project like Godot. It’s free, open-source, well-made and community-oriented. This is clearly the game engine I would recommend to anyone that wants to learn game development and potentially make a living out of it. Use Godot !

But another vision couldn’t get out of my mind recently. What if the web and game industry "melted" together ?

"Any application that can be written in JavaScript, will eventually be written in JavaScript" - Jeff Atwood, 2007 8

See how easy it is to create a website ? Handling inputs, requests, displaying data and charts, managing content or communications, connecting to external services or databases,... Doesn’t matter what you want to do, there is probably a library that will just let you npm install the-thing-you-want-to-do with almost 0 configuration.

What if it was exactly the same for video games ? That is a very exciting vision I want to bring out to the world, through some kind of web game engine.

Today’s web DX9 applied to creating games.

Why games belong on the web

Another thing to consider when creating a game is people playing it.

Your game engine being a web technology inevitably implies your game is played on the web. And I believe this is a great form factor for most game projects.

I’d like to highlight the video that I took inspiration of for this post and the project behind it. This video made by TheGreatReview covers the story around r/place.

In this clip, he actually demonstrates how r/place is an amazing game mostly thanks to its accessibility.

Playing on r/place is just about going to the website, quickly login in and start playing with millions of people around the world.

This is what made r/place a successful game, even though its "gameplay" is one of the most basic possible. You can really just color a pixel every 5 minutes.

But if accessibility made such a simple game remarkable, imagine what could be made if accessibility was brought to more advanced experiences. Imagine if games like World of Warcraft or GTA were just a click away from you.

Video games are becoming more and more popular, and I feel like the average player mostly want to play games easily with his friends. If the web is the best place to communicate with your friends, it’s not so far from being the best to play with them too.

Even Discord started to implement games right inside the app10. These are really basic games. But they’re very accessible as people do not even need to create an account. You’re already logged into Discord with your friends, just hit play !

That’s why I think we need a web game engine.

There is nothing easier than clicking on a link, either sent from a friend or found in a tweet.

I’m clearly not an expert on that side of the subject. But from my understanding of the whole publishing game activity, it seems the web is a way easier and fair place to publish game.

No platform fee11, no weird financial policy, just publish your game on GitHub Pages or so.

You’re done releasing a working game to the entire world. 🚀

Creating UIs

Let's face it, creating UIs in game engines sucks. Game developers are generally mad at game engines for their UI system, and I can understand why. Here's a very good example of people complaining about Unity UI system : r/gamedev/i_hate_making_ui.

But guess what ? The entire JavaScript ecosystem spent the last 10 years fighting to make the best UI libraries, so you can create beautiful, complex and reactive UIs in a few lines of code. And it’s all open-source !

Checkmate, game engines.

Caching and loading

The last thing I want to talk about is caching and loading.

Even if your game is a 100 GB monster, if you're configuring your game correctly to load assets on demand, any part of your game can be loaded in a few seconds. As far as I know, such a thing only exists for World of Warcraft, which lets you play the game while it’s still downloading (and it’s a very cool feature).

If you add caching to the mix, you can get a very fast and smooth experience for your players.

This is something that is very hard to achieve with a classic game engine, but the browser is already pretty good at it.

The idea

Cool ! We got a new side project added to the list ! Now what ? How ?

We first need a few libraries as a basement for our game engine, as I clearly won’t start writing C++ code or anything like that. I’m a web developer, not a real programmer !

Here are the 3 important technologies we’ll use :

  • Pixi.js to handle 2D rendering
  • Three.js to handle 3D rendering
  • Rapier to handle physics, collision, and gravity

How do we name the engine ? Fibbo. I think it sound great !

Where ? Right here on GitHub !

What are we aiming ? Well we have 2 objectives :

  • Improving the DX of game developers (easier development, collaboration, and deployment)
  • Making video games way more accessible to people

This will require working on :

  • Well made packages and ecosystem
  • Top-tier documentation and guides
  • At least acceptable performances

We have a ton of work to do, on 2D rendering, 3D rendering, physics, collisions, rigging, lightning, events, shaders, audio, devtools… All made simple by a single API.

Now what ?

The adventure already started ! Feel free to star the project on GitHub and follow me on social medias if you want updates on the engine !

I did my best to explain what I felt. This could be all wrong, specially considering I do not have much experience.

But I’m sure this is at least a cool idea to dig !

Even if this engine is not the one to make it, another similar technology might do it in the next years. And I’ll be happy to say that I took part in this effort to make the web a better and fun place !

Thanks for reading.


Le futur des jeux vidéo, c'est leur accessibilité.


Footnotes

  1. https://en.wikipedia.org/wiki/Rockstar_Advanced_Game_Engine
  2. https://en.wikipedia.org/wiki/IW_(game_engine)
  3. https://blog.unity.com/news/open-letter-on-runtime-fee
  4. Brackeys - The Future of Game Development
  5. Free and Open Source Software : https://en.wikipedia.org/wiki/Free_and_open-source_software
  6. https://www.codit.eu/blog/microsoft-loves-open-source-giving-back-to-open-source/?country_sel=frhttps://foundation.rust-lang.org/news/1m-microsoft-donation-to-fund-key-rust-foundation-project-priorities/https://opencollective.com/microsoft-corporation
  7. https://linuxiac.com/google-fuels-rust-foundation-with-1m-donation/https://opencollective.com/chrome/projects/2021-frameworks-fund?language=fr&slug=2021-frameworks-fundhttps://opencollective.com/google
  8. https://blog.codinghorror.com/the-principle-of-least-power/https://blog.codinghorror.com/all-programming-is-web-programming/
  9. https://github.blog/2023-06-08-developer-experience-what-is-it-and-why-should-you-care/
  10. https://support.discord.com/hc/en-us/articles/4422142836759-Activities-on-Discord
  11. Steam : https://store.steampowered.com/sub/163632 App Store : https://developer.apple.com/support/enrollment/#:~:text=The%20Apple%20Developer%20Program%20annual,in%20local%20currency%20where%20available. Play Store : https://support.google.com/googleplay/android-developer/answer/112622?hl=en