Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

TIC-80

Fantasy computer for making, playing and sharing tiny games. · By Nesbox

How to make camera move

A topic by ShadowKnight64 created Oct 14, 2020 Views: 780 Replies: 2
Viewing posts 1 to 3

I'm trying to make a platfromer, but I can't get the camera to move.

Can anyone help?

You can use two variables, like cx and cy, for the camera offset and these two variables to everything you draw, like spr(0, x+cx, y+cy). You can move the camera by changing these variables.

Create a scrollX and a scrollY variable, and use those for the map location. Then just increment those by 1/8 per 1 x/y change.