LWJGL Forum

Programming => General Java Game Development => Topic started by: Slickman on August 04, 2018, 13:32:08

Title: Player runs out of the window. How to render map?
Post by: Slickman on August 04, 2018, 13:32:08
Hy guys,

I am new here.

I have a question to you and i hope you can help me.

I write a 2D game with Slick2D in eclipse.

The game runs very well since yet, but now i have a big problem.
I made a map creator were I can create my own maps for the game.
I load these maps in my game with my own map loader. The map loader uses a 2 dimension array and a Graphics g object to draw every block in the slick window.
Everything works well, but now when i start the game i just see a piece of the map in my window and not the hole one.
When my player run to the left (or right) he runs out of the window and the map does not follow him so you cannot see where you are.
That means I have to render the map, but how can i do this?

I found some examples in the internet, but they do not draw there maps with a 2 dimension array.

How can i realize this in Slick2D?

BR
Title: Re: Player runs out of the window. How to render map?
Post by: Slickman on August 05, 2018, 13:32:20
Nobody here who can help me?