Jump to content
  • Advertisement
Sign in to follow this  
KenWill

Making a camera

This topic is 936 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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?

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Edited by UAas

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!