stationary objects when dynamically scrolling

BlitzPlus Forums/BlitzPlus Beginners Area/stationary objects when dynamically scrolling

I assume you are keeping a record like in a type for instance of what the properties of the object are such as:

type stuffinthegame

field worldx,worldy
field health
field class$ ; building, rock, player etc

end type

and then all you need to do is keep track of where the upper left corner pixel is in the world with a pair of variables 'cornerx, cornery' for instance and then when drawing all objects simply subtract the cornerx,cornery from the object's worldx,worldy - if the resulting value is within the boundaries of the screen then it can be drawn.