Making a camera

Started by
4 comments, last by Tangletail 8 years, 1 month ago

Hi. I want to implement a camera in my game...but i have no idea how to do it. The only way i could think of is moving the actual background of the game and not the player itself and only move the player and not the background when its not too close to the edge. Is this how is done?

How else can one simulate a camera that moves the view without moving the background?

Advertisement

In order to answer this, it would help to know how you're making your game. Is this in Unity or some other engine? Are you using a framework like Monogame or Libgdx? Are you handling the graphics through an API like OpenGL or DirectX?

I can say that a moving background texture is often used in games like Raiden to simulate movement when actual movement isn't necessary.

Inspiration from my tea:

"Never wish life were easier. Wish that you were better" -Jim Rohn

soundcloud.com/herwrathmustbedragons

In order to answer this, it would help to know how you're making your game. Is this in Unity or some other engine? Are you using a framework like Monogame or Libgdx? Are you handling the graphics through an API like OpenGL or DirectX?

I can say that a moving background texture is often used in games like Raiden to simulate movement when actual movement isn't necessary.

AS3 without any library.

I'm not entirely sure why you want to reinvent the wheel. But here is this link just in case you want to use something that's already set up well enough with helpful guides.

http://acbstudios.com/blog/flash-v-cam

Though honestly, the simplest solution would probably be to shove everything into a movie clip, and move the entire scene. Though his is likely going to be a performance killer. Especially when AS3 has been known for being notoriously slow.

I'm not entirely sure why you want to reinvent the wheel. But here is this link just in case you want to use something that's already set up well enough with helpful guides.

http://acbstudios.com/blog/flash-v-cam

Though honestly, the simplest solution would probably be to shove everything into a movie clip, and move the entire scene. Though his is likely going to be a performance killer. Especially when AS3 has been known for being notoriously slow.

When i said i want to move the background, that's what i meant. Make the map as a movieclip and then move it around when i have to and all the other stationary objects or otherwise to position themselves relative to the map.

I wouldn't. As the scenes complexity rises performance suffers

This topic is closed to new replies.

Advertisement