Skip to main content

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

The idea is that the horizontal speed is proportional to the vertical speed, so it moves diagonally... I like having prime factors when I do this so there's no obvious repeats.

The code you're proposing would just slow down the effect every frame (by ~60%) so it'd work a bit differently in practice, but it'd still WORK... if you want it to do that instead.