Generative AI for HTML5 Game Art: Is It There Yet?

Yandex Games
Yandex Games for Developers
5 min readFeb 16, 2023

Getting into browser and mobile game development has never been easier: with the emergence of HTML5, small developers have a vast arsenal of easy-to-learn tools to bring their ideas to life.

However, technology isn’t the only thing behind games: creativity is arguably even more important. Making a pretty game with a distinct style can be highly prohibitive for small developers. And what if you’re a lone wolf? Let’s talk about generative AI, which is not only one of the hottest trends in tech but an effective way to lower the barrier to game-making even more.

Making Art for Games as a Small Dev

Up until very recently, smaller devs had only three options, each riddled with caveats:

  • Make art themselves. Understandably, this approach can be incredibly time-consuming, especially if you have a certain look for your game in mind.
  • Outsource the work. Hiring a third-party standalone artist or a design studio is a logical choice. The obvious limitation is the price, which can be unfeasible if your budget is limited.
  • Purchase stock assets (or download royalty-free art). This works wonders for very simple games, but with more stylistically complex projects, you’ll inevitably run into problems. Ready-made images may vary in quality, and style consistency can be an issue. This is especially true for royalty-free assets, which are limited in quantity and a tad too variable in quality.

How Game Artists Can Use AI to Their Advantage

Not too long ago, generating coherent images with a neural network sounded like something straight out of a sci-fi book. Today, it’s become reality.

Many models are available to play around with and implement into your workflow. That being said, we recommend you start with MidJourney. It’s faster than other models, such as DALL-E and Stable Diffusion, and significantly easier to begin working with.

Let’s explore some ways in which an artificial touch could help you speed up the development of your next game.

In-game items, sprites, textures, and UI elements. This is where AI truly shines: algorithms can generate countless variations of the same object, such as a tree sprite. Here are a few examples generated by MidJourney in only a few seconds.

Level backgrounds and loading screens. Many games, such as 2D platformers, visual novellas, and most puzzles, use static backgrounds. In these cases, AI can be an absolute lifesaver.

Logos and app store icons. While you shouldn’t judge a book by its cover, game icons in stores (App Store, Google Play) and platforms such as Yandex Games can make or break your game. In essence, the icon is the face of the game, so it’s crucial to follow best practices when designing one. Generative AI has the advantage of being extremely good at following standards and can help you generate just the right icon to make your game stand out.

Icons for a game about aliens, generated by MidJourney

Dialog portraits. Currently, AI isn’t very good at capturing angles and emotions correctly, but it can certainly help artists set up the foundation. Generate several images, pick the ones you like, and refine them to fit your creative vision.

An endless source of inspiration. Sometimes, it’s hard to come up with something different from everything you’ve done before. Luckily, AI is more than capable of creating truly otherworldly images. Generative art is great for ideation and getting something on a canvas that a human artist can take over.

Struggling with conceptualizing a boss for your game? MidJourney comes to the rescue!

Image upscaling is the way to go if you’re remaking an older project or seeking to improve a free asset you found online. Neural networks have gotten remarkably good at this, potentially saving you heaps of time and breathing new life into old games.

Naturally, there are many other possible applications of AI in game development; the above are just some of the more obvious examples.

Far From Perfect, With Endless Potential

Getting the AI to generate an image that matches your idea can be extremely hard. It’s even harder to keep the style consistent: prompts must be extremely specific and descriptive, phrased in a certain way.

Perhaps soon, a new profession will arise in game dev: AI artist. Someone who can guide the AI with precisely crafted prompts and tell which AI is best suited for each task. While a “generalist” AI would be amazing to have, none of the tools we have today are universal. Some are better at drawing faces, others are good at image upscaling, and some are great at generating finished artwork from squiggly sketches.

Larger game studios could build teams of data scientists who would train open-source models in specific styles. Nevertheless, human artists aren’t going anywhere: everything AI-generated needs some human touch. And occasionally, it’s easier to draw something from scratch than ponder on a prompt. What’s next for generative AI in game dev? Here are some exciting new things we look forward to:

  • In-painting. AIs with this feature can “complete” an uploaded image by filling out the canvas or tweaking it. For example, you can ask the neural network to remove an object or replace it with something entirely different.
  • Customization. Some of the AIs we have right now can already be trained to generate works in a particular style, but the technology is still quite young. This has massive potential to reduce the initial workload for artists.
  • 3D object and environment generation. There are a few intriguing projects that you can play around with today, but none of them can generate convincing 3D models that could be used in conventional games…for now.
  • Video generation. Just imagine: you could save on cutscenes, or even use this feature to generate video ads to promote your game!

So, could you use AI for game art? Yes. Should you? Depends on the extent you want to rely on it. Realistically, current AI isn’t quite advanced enough to fully replace professional artists. That being said, it can be an amazing tool, much like photo bashing and other digital techniques. Just try to find the right balance, as overdependence on AI can lead to a game with clashing styles that don’t look appealing together.

Regardless of whether you use AIs as an aid, we at Yandex Games are excited to help kickstart your game dev career. You’re probably already familiar with how our platform works, but in a nutshell: you can monetize your games, access in-depth analytics, and interact with your audience. To top it all off, we’ll advertise your games completely free of charge, with no strings attached! Explore our Developer’s Guide for more info.

--

--

Yandex Games
Yandex Games for Developers

We’re a browser games platform hosting over 20K+ games and reaching 30M+ players worldwide.