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

Posted on 2005-05-13
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
    LVL 86

    Accepted Solution

    Probably quicker to cache the flipped ones, but i would test which is quicker yourself to be sure
    LVL 25

    Author Comment


    Thank you :-)
    LVL 86

    Expert Comment


    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    IT, Stop Being Called Into Every Meeting

    Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

    Suggested Solutions

    Title # Comments Views Activity
    seriesUp challenge 7 81
    maven java path setting 5 31
    mapBully challenge 6 53
    Running Jira on Raspberry PI 2? 3 44
    This was posted to the Netbeans forum a Feb, 2010 and I also sent it to Verisign. Who didn't help much in my struggles to get my application signed. ------------------------- Start The idea here is to target your cell phones with the correct…
    Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
    This tutorial covers a step-by-step guide to install VisualVM launcher in eclipse.
    Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

    737 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

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now