Skip to main content

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

> Use a delay loop in combination with more speed.

It seems doing this you could guarantee no flicker... I just glanced at the source and the DT/ST (delay/sound) special registers are decremented right after the browser does a redraw (which is with a 60 FPS setTimeout)... so if you say you have a traditional update/render loop and just put off the render until immediately after DT hits 0 then as long as you're done drawing in 16ms you shouldn't see any flicker at all.   IE for 60fps:  render, set delay 1, process input, etc... when delay is 0, render... rinse repeat.  That's my understanding from just a quick look.

To be clear I'm more interested in the VM on modern hardware... so if you're targeting say a HP-48 this might be much harder in practice.

(1 edit) (+1)

Yep. If your interpreter is fast enough, and your rendering will never exceed the available time, doing what you describe will work. You could also initialize the delay timer before starting a render, so you're timing render+update and then burning off any excess in the sync loop.

How much speed a game requires is mostly up to the developer. Some very interesting ideas are possible with brute force. Games that have more modest requirements will be playable on a wider range of devices. Working within the performance envelope of old hardware can be a fun creative constraint, but you're welcome to ignore it if it isn't for you.