Best way to draw thousands of graphic objects on the screen

Hello everybody, I'm wanting to develop a game where at times thousands of graphic objects are displayed on-screen. What better way to do this in terms of performance and speed?
I have some options below. Do not know if the best way is included in these options.
1 - Each graphical object is displayed on a MovieClip or Sprite.
2 - There is a Bitmap that represents the game screen. All graphical objects that are displayed on screen have your images stored in BitmapData. Then the Bitmap that represents the game screen copies for themselves the BitmapData of graphical objects to be screened, using for this bitmapData.copyPixels (...) or BitmapData.draw  (...). The Bitmap that represents the screen is added to the stage via addChild (...).
3 - The graphical objects that are displayed on screen will have their images drawn directly on stage or in a MovieClip/Sprite added to this stage by addChild (...). These objects are drawn using the methods of the Graphics class, as beginBitmapFill and beginFill.
Recalling that the best way probably is not one of these 3 above.
I really need this information to proceed with the creation of my game.
Please do not be bothered with my English because I'm using Google translator.
Thank you in advance any help.

Thanks for the information kglad. =)
Yes, my game will have many objects similar in appearance.
Some other objects will use the same image stored, just in time to render these objects is that some effects (such as changing the colors) will be applied in different ways. But the picture for them all is the same.
Using the second option, ie, BitmapDatas, which of these two methods would be more efficient? copyPixels or draw?
Thank you in advance any help. =D

Similar Messages

  • What is the best way to implement a cluster-wide object ID generator?

    What is the best way to implement a cluster-wide object ID generator?

    What is the best way to implement a cluster-wide
    object ID generator?Always use 3 because it is prime.
    Alternatively more information about the system and the needs of the system might prompt alternative ideas some of which are likely to be better than others for your particular implementation and system constraints.

  • I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this?

    I am moving from Southern California to Maui, Hawaii and I need to figure out the best way to get my 24 inch iMac across the ocean. Does anyone know the best way to do this? I have found GearGrip's LCD harness so that I can do carry-on onto the plane...  Or maybe use a Pelican Case to do it as a "checked bag"? Or any other suggestions??! Please help!
    Thanks so much!!

    I don't recommend you send the iMac in a checked bag. Might get damaged.
    Check the airlines website for carry on guidelines.
    Or, if you have the original box that the iMac came in, if you have someone who can pick up the iMac for you, send it ahead Fed Ex and insure the package.
    Just make sure the display is covered to protect it. A blanket perhaps.
    Aloha ...

  • Is there a way to draw a dash line that follows the curve in Photoshop?

    Hello,
    Is there a way to draw a dash line that follows the curve in Photoshop (See image)?
    I know how to make a dotted line, but not a dash line, in photoshop.
    Thanks.

    Use a vector shape and a dashed stroke in Photoshop CC.

  • My iPad screen is not responding, whats the best way to clean it and what could be the problem, its 2 days old

    my iPad screen is not responding, whats the best way to clean it and what could be the problem, its 2 days old

    Braunzoes wrote:
    my iPad screen is not responding, ...
    Try a Reset... Try again...
    Reset  ( No Data will be Lost )
    Press and hold the Sleep/Wake button and the Home button at the same time for at least ten seconds, until the Apple logo appears. Release the Buttons.
    http://support.apple.com/kb/ht1430
    Braunzoes wrote:
    ... whats the best way to clean it ...
    How to Clean Apple Products
    http://support.apple.com/kb/HT3226
    Braunzoes wrote:
    ... its 2 days old
    iPad User Guide iOS 6

  • I have iphone 5, after upgrading it to iOS7, front is working find unfortunately rear camera became blurred, what is the best way to fix this? Looking forward to the best solution of this problem.

    I have iphone 5, after upgrading it to iOS7, front is working find unfortunately rear camera became blurred, what is the best way to fix this? Looking forward to the best solution of this problem.

    WORKAROUND FOUND ! Download and install "Awesome Camera" app and take a picture with that app. After 1-2 seconds of standby, it will work. Then you can go back to default Camera app which would work again.Please let me know

  • How to center a JFrame object on the screen?

    Does somebody know how to center a JFrame object on the screen. Please write an example because I'm new with java.
    Thank you.

    //this will set the size of the frame
    frame.setSize(frameWidth,frameHeigth);
    //get screen size
    Toolkit kit=Toolkit.getDefaultToolkit();
    //calculate location for frame
    int x=(kit.getScreenSize().width/2)-(frameWidth/2);
    int y=(kit.getScreenSize().height/2)-(frameHeigth/2);
    //set location of frame at center of screen
    frame.setLocation(x,y);

  • In past versions of FireFox there was a view option that allowed a change in size of fonts and objects on the screen temporarily on the fly. This seems to be missing from version 6.

    In past versions of FireFox there was a view option that allowed a change in size of fonts and objects on the screen temporarily on the fly. This seems to be missing from version 6. It was very useful and needs to be added to version 6.

    You can use "Ctrl +" and "Ctrl -" to zoom pages quickly and "Ctr 0" (zero) to reset the page zoom.
    *http://kb.mozillazine.org/Zoom_text_of_web_pages
    There are also page zoom buttons in the toolbar palette in the Customize window that you can drag on a toolbar.
    Open the Customize window via "View > Toolbars > Customize" or via "Firefox > Options > Toolbar Layout"
    *http://kb.mozillazine.org/Toolbar_customization
    *https://support.mozilla.com/kb/Back+and+forward+or+other+toolbar+items+are+missing

  • [OKP1]Change the sequence of CO objects on the screen

    Dear everyone,
    Could anyone tell me how to change the sequence of CO objects on the screen in OKP1?
    Or it is just another mission impossible?
    Pls offer me some tips, I appreciate your help in advance.
    Regards,
    SCW

    Hi...
    how about a custom screen (have your abap developer involved) that will have the OKP1 transactions in the order you like and a custom SAVE button that when pressed will make a batch input to associated OKP1 transactions?
    cheers
    pan

  • Hi I've reset my 2nd generation ipod touch. However,the connect to itunes graphic appears on the screen but when I attach to my powerbook it doesn, show up either in itune or finder.

    Hi, I've reset my 2nd generation ipod touch. However,the connect to itunes graphic appears on the screen but when I attach to my powerbook it doesn't show up either in itunes or finder. I can't be the first to have experienced this problem. please could someone advise me.

    What iOS do you have on the iPod?
    Did it every connect to your computer with that iOS?
    The latest iOD for the 2G is 4.2.1 and that required a Mac with 10.5.8 or later.
    Have you tried:
    - another USB port and cable
    - iPhone, iPad, iPod touch: Device not recognized in iTunes for Mac OS X

  • Best way to draw a triangle for the web

    I want to draw a triangle using Java for the web and was wondering what would be the best and simplest way to do this. Any guidance and links would be much appreciated.

    The drawLine method of the Graphics class.Or the drawPolygon() method.

  • Best way to implement application level persistant objects?

    I'm designing a J2EE application and want to create some objects that represent lookup tables in the database. I would like these to be static objects that get created either at application startup or the first time they are called and remain in application scope globally for all users/sessions. These are objects that contain lists used for drop-downs/listboxes. I don't necessarilly want to take up unecessary memory
    and take a performance hit for each session by creating them new for each session. The question is what is the recommended design for this scenario? Should these be implemented as static Stateless Session beans with an application scope? Are there any examples on the best way to do this in J2EE?
    Thanks.

    You can simply (and properly) implement the Singleton pattern. Then multiple threads can all query the cached reference table values in the Singleton. Now, I know, that Singletons and J2EE are supposedly no-no's, but sometimes the easiest and simplest solution really is the best one. Perform the database query at startup in a static initializer. Then ensure that you do not have mutator methods (e.g., removeXXX(), setXXX(), addXXX(), etc.) Only provide accessor/getter methods. If you want to be able to refresh the cache without restarting the server, you will have to think about race conditions. But if you are implementing a vanilla cache, I would go with a Singleton.
    - Saish
    "My karma ran over your dogma." - Anon

  • Best Way to Draw A Simple Isoceles Triangle, and Fill it.

    Hi,
    What I assume is a relativly simple problem, ive got the coordinates of the bottom two points of an isoceles triangle, and the height, and need to draw it in Java2D. It's base will always be parrellel to the bottom of the screen.
    I also need to be able to fill or not fill it very simple, what would be the best way to do this?
    Thanks for your time,
    atreides7887

    Create your triangle as an instance of [java.awt.Polygon|http://java.sun.com/javase/6/docs/api/java/awt/Polygon.html] and call [java.awt.Graphics2D.fill(Shape s)|http://java.sun.com/javase/6/docs/api/java/awt/Graphics2D.html#fill(java.awt.Shape)] to paint the triangle to a BufferedImage or in a paintComponent override.
    Read the other methods of Graphics2D for the rest of your answer.
    db

  • Best way to call methods on similar objects without an interface

    Hi,
    I have two objects that i need to iterate, they both have the same method i need to call during iteration, but those two objects are from different libraries and i cannot change them to add them as implement interface...
       for (Iterator it = documents.iterator(); it.hasNext();) {
               Document1 document = (Document1) it.next();
               document.getName();
    But I can also get a documents's collection where the object is Document2 and not Document1 that also has getName(), what's the best way to implement this? I mean i know i can just add if conditions to say if (instanceof) do this or that.. but I don't think this is good as everytime there's a new type of doc i'd have to add one more...
    Any suggestions?
    Thanks,

    I have two objects that i need to iterate, they both have the same method i need to call during iteration, but those two objects are from different libraries and i cannot change them to add them as implement interface...
    You already know what you need to do. You just don't want to do it.
    You can't treat two (or more) instances the same if they aren't the same. Here are three methods:
    1. Add code (like you propose) to determine which type you have
    2. Create your own classes that extend those classes and have your own class implement your own interface that has the 'getName' method. When you create instances of your own class the constructor can have code that determines which type you have and then use the appropriate 'getName' method. Your app code would use your own classes instead of the ones from the libraries
    3. Use reflection to call the 'getName' method.

  • Best Way to store references to other objects

    Hi there,
    I want to design a class, that has several references to other instances. What is the best way to store such references within the class? As a vector? As a Hash-Table?
    What I need are:
    -get a certain element in this data-structure fast (let's say the fifth)
    -be able to list all elements referenced
    -delete a certain element (e.g. 5th one out of 10)
    What I do not necissarily need is:
    -to be able to search if a certain object is referenced by this one
    What do you propose?
    Any ideas?
    Thx
    Karlheinz Toni

    Any thoughts on hashtables etc?
    I used them in an application where i needed to get
    objects quickly. It allowed me to get the objects
    based on a criteria instead of by the object itself.
    It was really useful for me.Use HashMap instead of Hashtable. HashMap would also work but you can't get element 5 unless you use the element number as a key. If you do use the element number as the key, it's kind of like using a List except it won't renumber itself, which you may or may not want. For example, if you remove element 5 from a List element 6 (if it exists) becomes element 5. If you remove key 5 from the HashMap you just don't have an element 5 anymore i.e. the map will return null for get(new Integer(5));

Maybe you are looking for

  • Select text based on format (free form style text)

    As suggested by Apple, I'm trying to create my first ePub using Pages as opposed to inDesign. I only have a PDF as a source file and don't want to re-type all the text. When I copy the text from the PDF and paste to Pages, the text comes in with the

  • The backup was not performed because an error occurred while copying files

    One Time Capsule, Two MacBook's, OS10.6.6 One MacBook can backup no problem, The other cannot backup says: the backup was not performed because an error occurred while copying files to the backup disk. Using a Time Machine Buddy widget gives: Startin

  • PhotoShop CS6 .psd file currpt/not open :( my lots hard work

    Hi Friends, Today Accidentally my photoshop has closed at that time i am working on my demo template work from last 2 months, so again i open my .psd file thier is error prompt "could not complete your request because the file is not compatible with

  • IMG Glitch: History Fades to Black

    Scenario: After deleting a recording on the DVR, I drop down to the History list and press the right arrow to enter. Then the menu portion of the screen goes black, leaving only the small LiveTV screen visible. Left arrow does not back out. Pressing

  • Seeking advice on new iMac config

    I want to purchase a new 27" iMac.  I want an SSD drive, but I do not want to purchase it (or a fusion drive) from Apple.  Here is the thinking: 1- I purchase a new iMac with 3TB (non-fusion) drive.  Separately, I buy a USB3 PCIe SSD from OWC. 2- I a