Jump to content
  • Advertisement
Sign in to follow this  
Mr. Moon

preloaded Images vs. rotated Images

This topic is 1409 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

Hello everyone,

 

I'm programming a 2D zombieshooter with a perspective like GTA or Hotline Miami and I'm thinking about how to manage rotating the sprites. I don't know if it's better to create an image for every direction and preload them or rotating the images at runtime and have a more complicated collision detection. But in the first case maybe I have an overflow of RAM if the game has many moving objects.

 

Can you help me?

 

Cheers,

 

Mr. Moon

Edited by Mr. Moon

Share this post


Link to post
Share on other sites
Advertisement

I don't think RAM is going to be an issue. Let's say you have 5 different zombie sprites, and you put up 100 zombies on the screen, 20 of each type. There's only 5 copies of the sprite in memory with 20 references to each.

 

Performance won't be an issue either since computers are so darn fast. Rotating a sprite with a matrix operation vs. having different direction sprites will be negligible. You'll be better off making this decision based on other factors such as: look and feel, art resource complexity, etc.

 

- Eck

Share this post


Link to post
Share on other sites

I don't think RAM is going to be an issue. Let's say you have 5 different zombie sprites, and you put up 100 zombies on the screen, 20 of each type. There's only 5 copies of the sprite in memory with 20 references to each.

 

Performance won't be an issue either since computers are so darn fast. Rotating a sprite with a matrix operation vs. having different direction sprites will be negligible. You'll be better off making this decision based on other factors such as: look and feel, art resource complexity, etc.

 

- Eck

 

^^^^ This.  Programmers are really bad at guessing where the problems are going to be in our software.  Do the simple thing and test the FPS.  

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!