Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Ectara

Member Since 27 Feb 2009
Offline Last Active Mar 07 2015 12:32 AM

Posts I've Made

In Topic: I'd think twice about eating those ramen noodles if I were you...

01 January 2015 - 10:55 PM

For a moment, I thought we were discussing Japanese cuisine.


In Topic: Slick2D Camera movement

27 December 2014 - 05:54 PM

It isn't quite moving the map. You are moving the world. This includes the player, and every other actor in the scene. Handle all of your collision logic and other such events as if the world is all there is, and don't think about the camera. Then, when all is said and done, draw the world offset by the camera's position. The drawing of the world and the logic of the entities within should and must be separate.


In Topic: Slick2D Camera movement

26 December 2014 - 11:07 PM

 


If there is multiplayer, you have to decide what is important to you, and how many viewports you want.

This one

 

Different games have different priorities for what's shown on screen. For some games, it makes sense to have the "camera" focused on the first player only, for others, maybe the center of the line segment between the two players, and for others, still, the map would be scaled to fit the screen so that all players are visible at all times.

Alternatively, if you decide to have two viewports instead of one (splitscreen), you can draw the map twice, and each half of the screen is centered on each respective player.

 

It all depends on your game.


In Topic: Slick2D Camera movement

26 December 2014 - 10:41 PM

Which part are you having trouble understanding?


In Topic: Slick2D Camera movement

26 December 2014 - 10:12 PM

The concept of a "camera" is an illusion; it's essentially moving the world in the opposite direction, to give the illusion that the "camera" is moving.

If there is multiplayer, you have to decide what is important to you, and how many viewports you want.


PARTNERS