Page 1 of 1

Sidescrollers? (And if not then major feature request)

Posted: Mon Nov 17, 2008 8:24 am
by MHD
I am thinking of making quite a large side scroller. But I have no idea how to do it...

I can't seem to find any information about moving a world around in the documentation, and if that is not possible the this game would be a PAIN to make.

So. How do you do sidescrollers?

Also, It would be very nice to have an eviroment larger than the screen:
In config:

Code: Select all

EnviromentX = 5000
EnviromentY = 5000
And in main:

Code: Select all

love.graphics.setScreen(X,Y)
Body:isOnScreen()
Shape:isOnScreen()
Then being able to set the screen position inside a fixed enviroment, instead of relating to screen pixels you could relate to a global enviroment.

Re: Sidescrollers? (And if not then major feature request)

Posted: Mon Nov 17, 2008 9:47 am
by u9_
as far as i know you define the size of the world when you create it, and you are free to relate world coordinates to screen coordinates as you see fit. (I assume you are talking about the physics engine.)

Sidescrollers usually use a tile map to render the world, so each section of the world is stored as a number, which represents a certain tile. You then render the screen depending on where your "camera" is looking. This is done to save memory, because you cannot store a very large map pre-rendered before you run out of memory.