HipHopHuman

u/HipHopHuman


We as devs typically all have the same system driving our games, a nominal game loop that resembles this one:

let lastTime = 0;
let id;

function loop(time) {
  id = requestAnimationFrame(loop);
  updateGame(time - lastTime);
  lastTime = time;
}

function stop() {
  cancelAnimationFrame(id);
}

Maybe yours differs from this and uses setTimeout or setInterval or something more sophisticated involving web workers, the idea in this post still applies to you.

And we all know the "disable browser occlusion" trick that we inform our players of so that our games can still make progress when they're in the background ([which apparently Chrome ha

171

r/ModdedValheim•

I've been going a bit mod crazy lately and I've found that once you've unlocked a bunch of recipes for all the items that are added to the game, scrolling down the list of available things to craft in the Workbench is rather tedious because there are so many items.

I've looked at Nexus and ThunderStore but I can't seem to find any mod that makes navigating this any easier.

It would be wonderful to have any (not necessarily all) of the following functionality:

  • A search bar so I can search for recipes
  • An expandable accordion style category system for things like Armor / Weapons / Tools / etc
  • Pagination
  • Filtering options
  • A toggle checkbox that shows only what you can craft with y
34

Introduction

Another comment regarding game performance has inspired me to write more words than I can realistically fit into a comment, so I am writing another post. Consider this a follow-up sequel to my previous performance post, but this time focusing specifically on dropped frames and how to handle them.

A word about the Game Loop

It is very difficult to talk about dropped frames without mentioning t

12918

Introduction

This post originally started out as a comment to this thread, but the content ended up being too large to post as a comment, so I decided to post it as it's own thread.

This post details all of the performance tips I've been exposed to over my years as a software developer working primarily in JavaScript and on the web.

I'll just get straight into it...

Cache your DOM selectors

This is a very low-hanging fruit with a low impact. It doesn't do much when you have just a few elements, but it makes a noticeable difference when there are 1000s of elements on the page.

Don't do this:

doc
17121


r/valheim•
  • Before launching the game, right-click "Valheim" in your Steam library and select "Properties"
  • Under "Launch Options", add "-console" to the textbox
  • Close the "Properties" window and launch the game
  • Once in game, press F5 to open the game console.
  • Type "devcommands" and hit Enter to activate Developer Mode.
  • Type "freefly" to activate the free fly camera perspective (it'll activate once you hit "Enter"). You can type "freefly" again to disable the camera.
  • Open the game console again and type "ffsmooth 1" to turn camera smoothing on. You can turn it off again with "ffsmooth 0". Typing "ffsmooth 2" will increase the amount of smoothing.
  • Press CTRL+F3 to hide/show the game's HUD.
3610


r/botania•

Multiple Suggestions for new Content:

Foreword

I want to just disclaim that I have read Stuff you won't see in Botania, and mention that I understand that there is a section on a FAQ somewhere mentioning that Botania is considered feature-complete. Despite this, I asked where the best place to post suggestions for Botania is on Vazkii's Discord prior to making this thread and I was pointed here by one of Botania's maintainers. Botania has also received many new features since that FAQ was posted, so I assumed that it was fine to post a list of suggestions. Even if these suggestions do not ever find their way into Botania itself, I figured the

3124