Which is faster and more efficient? (Flip or import)

Posted on 2005-05-13
Medium Priority
Last Modified: 2010-03-31

I am developing a 2D game at the moment (Street Fighter! :-) ).

I have a "game sprite", which I have manually cropped into over 100 frames (but for the sake of this question, we'll just round it to 100).

The thing is: All of these frames are facing to the right (whereas I need both right *and* left). Now, my question is: Which one of the following 2 options would be quickest?:

   (1)  Read in 100 images, and then flip each image (and assign the flipped versions to a new Image instance); or
   (2)  Read in 200 images (as I would have flipped all of the images previously).

Question by:InteractiveMind
  • 2
LVL 86

Accepted Solution

CEHJ earned 2000 total points
ID: 13994974
Probably quicker to cache the flipped ones, but i would test which is quicker yourself to be sure
LVL 25

Author Comment

ID: 13994999

Thank you :-)
LVL 86

Expert Comment

ID: 13995022

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
In this post we will learn different types of Android Layout and some basics of an Android App.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.
Suggested Courses
Course of the Month15 days, 1 hour left to enroll

840 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question