Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines
(1 edit) (+1)

I have a template with a bunch of systems and subsystems I usually reuse, built around my own code architecture and custom methods, like:

  • Event bus
  • Material preloading
  • Input manager (the one that tells the navigation hints which button icons to show)
  • Save system
  • Menus
  • Etc.

I've been building and improving it with every jam I participate in. A lot of things tend to repeat, so that let me focus in the game.

There's also another template on the Wild Jam page where I found some interesting ideas, like input mapping.

But getting to the point!

For web builds, shader compilation and resource loading can cause some nasty stutters, especially since threading is more limited in the browser.

What I do is keep a list of all the objects, materials, resources, and particles I need. During the loading screen, I instantiate them in front of a camera on a layer that isn't visible to the player, but is still rendered internally. This forces the renderer to prepare the materials and shaders ahead of time.

That way, when those objects actually appear in the game, most of the expensive work has already been done, and they're ready to go!

On desktop, you have more flexibility to load resources on the fly, but on the web, I prefer to prepare everything before gameplay starts to avoid stuttering.

GPU particles are still a bit tricky, though. I haven't fully figured out how to prewarm those reliably yet!

But feel free to ask me anything :D

(+1)

Oh that seems like it should be such an obvious solution but it's very clever! Dang, I'll have to keep that in mind next time! Thanks for sharing. I still need to rebuild my event bus system in gdscript; I have some of those systems built for myself in C# but I've been using gdscript for jams to have functional web builds. Anyway, I really appreciate the info!