Subpixel draw slow sprites

Hello.
I worked on a game of iOS with Flash for a while. Now I'm stuck with a display problem.

My game objects move very slowly and steadily and I noticed jittering/stuttering pretty bad. It's GPU Air 2.7 mode, mode CPU is too slow. The cause of the variation, it seems that the Air moving my sprites (from the PNGs) in the proceedings full and half-pixel, cacheAsBitmap/matrix are only enabled or not. What is an optimization by Adobe or can I get rid of it somehow? It's really annoying.

Thank you!

This gave a new index:

«Just cacheAsBitmap looks a lot worse because it produces full-pixel work.»

What is the quality of your step on? Try:

internship. Quality = "high";

Tags: Adobe AIR

Similar Questions

  • Wait for the sprite press / clicked

    Hi, I am trying to display graphics when the user touches the sprite first which I reproduce, then another graphic when the user releases the sprite (raises their finger). I don't know how to go on this subject! Please help me!

    Thanks in advance

    On the Sprite that you draw in, add an event listener for mouse down and mouse upwards.  This will work only on drawn graphs and not areas of the sprite which pulled anything in.

    private var sprite: Sprite = new Sprite();

    //...

    addChild (sprite);

    make the drawing

    sprite.addEventListener (MouseEvent.MOUSE_DOWN, MouseDown);

    //...

    private function MouseDown (event: MouseEvent): void

    {

    this.sprite.addEventListener (MouseEvent.MOUSE_UP, MouseUp);

    do something

    }

    private void MouseUp (event: MouseEvent): void

    {

    this.sprite.removeEventListener (MouseEvent.MOUSE_UP, MouseUp);

    do something

    }

  • Sprite class problem

    Gives an error.
    See the code provided herewith.
    JST want to draw this sprite and animate.
    Thank you very much

    You need to add it to the displayList and do that she should be wrapped in a UIComponent:

  • support for the improvement of a dc7800 sff with a QC 8400

    Hello

    I bought my HP DC7800 desktop from a broker who got a point on HP desktop computers get a bankruptcy in 09. Now I got a copy of Vista Business x 64 and 4 GB of ram DDR2 of Z OC-)

    Hello AnthonyK, I did a little more research and found this interesting information.

    It seems the E6750, the E8300 and E8400 CPU both have a thermal basis of 65 watts TDP.

    In other words, that they are built on the same core process, with speeds just different.

    Intel seems to have been able to reduce the thermal power of these processors with the 45nm.

    Your current E6750 has a current draw slowed 123 watts total system power consumption and a current draw stressed 163 Watts.

    The E8300 has a current slowed to 128 watts system appeal total current consumption and a current stressed 158 Watts.

    The E8400 has a current appeal slowed 131 watts total system power consumption and a current draw stressed 158 Watts.

    What are the limits of your current processor.

    I don't think that an improved power would be necessary. These processors, since they will perform at higher speeds, can create a little more heat, but if you clean the system completely when you change the CPU, you should be fine.

    Sometimes a BIOS update is required when the processor is upgraded. Here is the link where the BIOS can be found if your system requires a. You can first check the BIOS and see if there is a newer version available.

    Just some thoughts.

  • I have advice on a problem

    Hi all

    I need some advice on a problem, I'm going to. In my application, I'm working, I want to use b.filters = [new DropShadowFilter ()] filter to give the effect of a sprite being picked up and moved. I use this code to move the sprite:

    cardSprites[card].addEventListener(MouseEvent.MOUSE_DOWN, onDown);
    cardSprites[card].addEventListener(MouseEvent.MOUSE_UP, onUp);
    addChild(cardSprites[card]);
    
    private function onDown(e:MouseEvent):void
    {
        b = Sprite(e.currentTarget);
    
        ...
    
        b.filters = [ new DropShadowFilter() ];
        addChild(b);
    
        b.startDrag(false, new Rectangle(0, 0, 1024 - CARD_WIDTH, 594 + CARD_HEIGHT));
    }
    
    private function onUp(e:MouseEvent):void
    {
        b.stopDrag();
    
        ...
    }
    

    The problem is sometimes the event MouseEvent.MOUSE_UP does not draw the sprite is not stop moving. This doesn't happen very often. Maybe 1 out of 100 times or more. I think that the problem is related to the speed of the Simulator because it is not all the time. I hope that it does on a real device. I noticed that when I remove the filter to DropShadowFilter () I don't have the problem. I like the shadow effect. I was thinking of doing a second series of images with a drop shadow, but that would mean I would have twice as many images and I have a lot. I want RIM to send me my PlayBook so I can test this on a real device.

    Do you think I should present my application for approval or rework my application and add all the images?

    Hey PBDev,

    try changing your code as follows:

    cardSprites[card].addEventListener(MouseEvent.MOUSE_DOWN, onDown);
    
    addChild(cardSprites[card]);
    
    private function onDown(e:MouseEvent):void{  b = Sprite(e.currentTarget);
    
        ...
    
     b.filters = [ new DropShadowFilter() ];   addChild(b);
    
        b.startDrag(false, new Rectangle(0, 0, 1024 - CARD_WIDTH, 594 + CARD_HEIGHT));
    
      stage.addEventListener(MouseEvent.MOUSE_UP, onStageMouseUp);
    
    }
    
    private function onStageMouseUp(e:MouseEvent):void{  b.stopDrag();
    
       stage.removeEventListner(MouseEvent.MOUSE_UP, onStageMouseUp);
    
     ...}
    

    Basically instead of make a mouse event on the object itself, do on the stage. It doesn't matter where the user makes mouseup, he's always going to be picked up. the best way to go without compromise. hope that helps. Good luck!

  • scale9Grid and images

    I'm scale9grid an image.  I use the following code.

               [Embed(source="assets/images/frame.png",
                    scaleGridTop="5", scaleGridBottom="10",
                    scaleGridLeft="5", scaleGridRight="10")]
                var paneFrame:Class;
    
                var frame:Image;
                /*  Add the border */
                frame = new Image();
                frame.setImage(new paneFrame);
                frame.height = 300;
                frame.width = 300;
                addChild(frame);
    

    When I do that, I get a blank screen.  The image in question measures 15 x 50 pixels.

    Note When I just remove the embed code scale settings, the image appears (of course all pixelated)

           [Embed(source="assets/images/frame.png")]
                var paneFrame:Class;
    
                var frame:Image;
                /*  Add the border */
                frame = new Image();
                frame.setImage(new paneFrame);
                frame.height = 300;
                frame.width = 300;
                addChild(frame);
    

    Anyone used scale9grid on an image successfully?

    Hey EraserX.

    try using the following code:

               [Embed(source="assets/images/frame.png",
                    scaleGridTop="5", scaleGridBottom="10",
                    scaleGridLeft="5", scaleGridRight="10")]
                var paneFrame:Class;
    
                var myContainer:Sprite = new Sprite();
                var frame:Sprite = new paneFrame();
                myContainer.addChild(frame);
                frame.width = 300;
                frame.height = 300;
    
                var myBitmapData:BitmapData = new BitmapData(300,300);
                myBitmapData.draw(myContainer);
                addChild(new Bitmap(myBitmapData))
    

    I looked around one apparently you need to add your image to a sprite first and then draw this sprite as a source. something to do with no convertible sources. and I used the Bitmap class instead of the image. im not a fan of the QNX image class yet but im warm-up that he

    Here is the link for a good part of the info related to scale9grid:

    http://www.dreaminginflash.com/2007/12/03/9-slice-and-bitmap/

    hope that helps. Good luck!

  • Auditors question...

    If I have a dynamic application that draws a sprite that contains a lot of shades of colors and each sample has a set of listeners. If I remove the sprite and set the value to null will be all the listeners of the children removed from the memory?

    That is to say

    var swatch_holder:Sprite = new Sprit();

    addChild (swatch_holder);

    Add nuances to the swatch holder...

    swatch_holder. AddChild (this_swatch);

    During the withdrawal...

    removeChild (swatch_holder);

    swatch_holder = null;

    What would be the best and fastest way to remove all listeners that I'll add to each individual sample?

    Thank you!

    Yes, if a parent is ready for the gc, you need not prepare children for gc.

  • How to convert a shape to a button by programming in actionscript 3?

    Hello

    I passed all the information I need to draw a shape in FlashVars. After that I designed the form, how can I convert this shape to a button using actionscript? Thanks in advance for your help.

    Kind regards

    Nilang

    You can directly draw a sprite or add the Shpe as child of a Sprite, like this

    var shape: Shape = new Shape();
    shape.graphics.beginFill (0xff3345);
    shape.graphics.drawRect (0,0,100,30);

    var btn:Sprite = new Sprite();
    btn.buttonMode = true;

    btn.addChild (shape)
    addChild (btn)

  • Scaling of the proportions

    I'm making a movie that has to scale to any proportion, not only a zoom scene, but in a horizontal or vertical format as well. And various imported media in proportion to exercise on the fly in the correct proportions on the monitors of various shape.

    Seems that scaling of the sprites must be done for the source of the task force Director stage rect. Scaling a sprite to the scene or draw rect sprite scales incorrectly. But the proportions need to look correct on the step/draw Rect. So I need to scale a weird (to the source rect) proportion account for the step of the scale for the new draw rect in the projector.

    I was wondering if anyone has done this before or has any advice.

    For example:
    If I do the one Director movie 320 x 240 and scale of execution to a monitor of 768 x 1360, since Director sprite scaling a sprite in the manner of rect (stage) of the size actually is changing compared to the Rect. small source
    I need to understand the distorted proportion to be applied to the source rect that will scale correctly when it is applied to the estimated proportion.


    Frank

    Managed to find a solution that seems to work.

    Do the calculation to scale the video to the draw or stage rect, figure the percentage of the height and width compared to this full rect, then fits the actual sprite for the source Rect p.

    The source rect doesn't seem to be a little mysterious. The only way to change that seems to be the size of the film, close the Director movie, and then reopen it so the rect good source gets implemented.

    Frank

  • Sprite small large bitmap drawing

    Hello

    I have a circSprite spirte I draw on a large drawingBitmapbitmap.

    drawingBitmapData = new BitmapData (800, 600, true, 0);

    drawingBitmap = new Bitmap (drawingBitmapData);

    stage.addChild (drawingBitmap);

    var circSprite:Sprite = new Sprite();

    circSprite.graphics.beginFill(0xFF0000,0);

    circSprite.graphics.drawRect (0,0,160,160);

    circSprite.graphics.endFill ();

    circSprite.graphics.beginFill(0xFF00FF,1);

    circSprite.graphics.drawCircle (40,40,40);

    circSprite.graphics.endFill ();

    mat: matrix var new matrix());

    drawingBitmapData.drawWithQuality (circSprite, Matt, null, null, null, true, StageQuality.MEDIUM);

    I would like to move the circSpirte to another post (100 100) - how can I do this?

    Thank you!

    Rolf

    update of the matrix:

    var rect:Rectangle = new Rectangle (0,0,800,600);

    var bgColor:uint = 0xffffff;  //<- use="" your="" stage="">

    mast. TX += 3;

    drawingBitmapData.fillRect (rect, bgColor);  //<- to="" make="" it="" look="" like="" the="" previously="" drawn="" object(s)="" were="">

    drawingBitmapData.drawWithQuality (circSprite, Matt, null, null, null, true, StageQuality.MEDIUM);

  • Drawing with ActionScript3.0 (Sprite) in Flash CS4

    Hello

    I wanted to make a scene, like a small game.

    I have included:

    A character with an Instance name 'character_mc '.

    A box1 with an Instance name 'hp_mc' (hp for health points)

    And a second box2 with an Instance name "dmg_mc" (dmg for damage)

    Now, I used this code to draw a bar of health for me:

         var hp:Number = 100 //note this is not the complete code just the piece I want to focus on
    this.addEventListener(Event.ENTER_FRAME, hpBar);
    function hpBar(event:Event):void{
         if(character_mc.hitTestObject(hp_mc)){
              hp+=1
         }else if(character_mc.hitTestObject(dmg_mc)){
              hp-=1
         }
         var bar:Sprite = new Sprite(); 
         bar.graphics.beginFill(0x33ff00); 
         bar.graphics.drawRect(50, 50, hp, 15)
         bar.graphics.endFill(); 
         addChild(bar);
    };
    
    

    He pulls me health 100 pixels, and when the character moves on box1 (hp_mc)

    I can see the increase health (more pixels are drawn)

    The problem starts here.

    When I move my character on the box2 (dmg_mc). He does subtract and eventually draw in the negative, but it does not erase what was collected before.

    How do I can code this to have the same function but erases the previous drawing?

    The suggestions are wellcome.

    ~ Thank you for the help and advice ~

    I think that you are looking for the clear() function.  Note, I also moved the variable outside the function declaration bar so that you don't reset it unnecessarily, as well as the addChild add you only the bar to the stage once.

    var hp:Number = 100 //note this is not the complete code just the piece I want to focus on
    
    var bar:Sprite = new Sprite();addChild(bar);
    
    this.addEventListener(Event.ENTER_FRAME, hpBar);
    function hpBar(event:Event):void{
         if(character_mc.hitTestObject(hp_mc)){
              hp+=1
         }else if(character_mc.hitTestObject(dmg_mc)){
              hp-=1
         }
    
         bar.graphics.clear();//
    
         bar.graphics.beginFill(0x33ff00);
         bar.graphics.drawRect(50, 50, hp, 15)
         bar.graphics.endFill();
    };
    
  • Cropped drawing in a Sprite

    I am trying to create a sense of drawing on a moving paper. The book is currently being implemented as a Sprite and the drawing happens via calls to lineTo() on the graphics property. But since the Sprite object grows with its content, I can't understand how to force the 'inner' drawing paper.

    Anyone has a suggestion for me to solve this problem. Currently I use a black pencil and a black background around the investigation, but this strategy will clearly break as soon as I want to allow different colours of the pen.

    I considered to implement my own lineto() but I would like to defer this work until I've exhausted my other options.

    Here's a SWF with paper and pen in action: Doodulum. (Drag the pendulum weight, eventually narrowing or their culture and then click on 'Start').

    It seems that the clipContent on canvas setting has to do with what is rendered. I've always touch outside the study, just not show it. This is not what I want. I want to have something as a drawing master.

    Since I am only using lineTo() draw I solved by controlling only the current position of the pen and the next are both in my limits. If they are I call lineTo() or moveTo() call. That and increasing the accuracy of my simulation gives me what I want.

  • Drawing with the sprites in a framework of

    Hello
    I use Sprites to draw quite large graphs. For me to do this interactively, I joined the nodes/edges in the graph in a UIComponent defined in the mxml file. I would also like to the UIComponent to be within a Panel, and therefore the content of this component should not be visibly this sign outside.

    The problem is that I'm unable to set limits for this UIComponent, and so the graph occupies most of the screen beyond the Panel container area. (height/width for the UIComponent attributes do not address this).

    What is the appropriate way to have the curve in a canvas with limited arae (with scrollbars so the graphic content is bigger than this region) so that it not overflow not display area desired?



    In the code below, for example, I would like to the UIComponent (to which I add children Sprite) have limits so that it does not appear anywhere on the screen.

    Thank you very much.

    Define a mask.

  • How can I work around - printing with backup printing mode and paper drying... WAY too slow draws

    How can I work around 'backup mode printing' and 'drying page '. ?   Printing is MUCH too slow

    Yes the gray photo cartridge missing

    Hi @carp04

    To work around "printing in rescue mode" ensure that all cartridges are installed and no are exhausted.

    With respect to the drying of the page, change the print settings might help; Definitions of setting for the printer driver.

  • CC of Photoshop is dramatically slow when drawing or resizing.

    Hello everyone.

    Please help me find a bottleneck:

    OS: Windows 7 x 64 professional

    CC of Photoshop, not in 2014.

    Hardware configuration:

    Motherboard - Asus P8Z77 - V LX LGA

    CPU - Intel Core i7 2700 K + Zalman CNPS10X EXTREME

    Video card-Asus GTX660 - DC2OCPH - 2GD5, 2GB GDDR5

    RAM: 2x8Gb HYNIX Original DDR3 1600, DIMM + 2x8Gb Kingston KVR16N11/8 1600 DDR3, DIMM

    HARD DRIVE:

    4xSeagate Barracuda ST2000DM001 - 2 TB - RAID 5 - for the storage of data, the OS TEMP directory.

    1xWestern Digital 500 GB - for the Photoshop, 300 GB of free file.

    1xWestern Digital 2 TB other stuff + OS page leader. 1.2 to free.

    SSD: OCZ Agility 3, 90 GB - OS + installed Photoshop. 30 GB free

    PSU: HIPRO HPP600W-80Plus

    Tablet: Wacom Intuos Pro M.

    Photoshop preferences:

    History - 15 levels

    Cache level - 8

    Tile size - 1024 KB cache

    Photoshop allows 70% of memory.

    The GPU acceleration - tried both 'off' and 'base '.

    Previews of layers are on the "Minimum".

    My use main photoshop is in editing photos - 5760 x 3840 pixels.

    When I create a document with 5760 x 3840 pixels and add several layers of editing, curves, masks and so now I try to resize the image. Photoshop starts lagging. The same effect occurs when I create a mask with a simple brush. As an example - I draw a line of 1 cm on my tablet, and then the PS did the same thing with a delay of 10 seconds.

    Any help would be appreciated. I have not had any problems even with CS6.

    1. you probably have a specific problem with the drivers causing your tablets very inefficient operations.  I would look for in getting starting with the new Wacom drivers.  Focus first on why your powerful system works poorly with the tablet.  Determine if a mouse works better than the Tablet, to make sure that you have isolated the problem.

    Then, after working this possibility, if performance is always annoying for you...

    2. I would say that, assuming you have the budget, relegate you ALL hard disks of your spinning for backup or low access of readers of storage.  Do ANYTHING with them for normal use, everyday.  See point 3 below for that.

    3. get 2 TB of storage in the form of four 512 GB SSD SSD, put them in a RAID 0 array - not RAID 5.  Make sure the C: drive and install Windows, applications, your work, scratch data, swap, etc.  Don't worry about reliability - get vouchers, pro models.  They have high MTBF, and even with 4 SSD will not take you nearly as great a chance of failure as with a single HARD disk.  Re-evaluate if the RAID controller you are using is a good match for high-speed SSD storage and get a good one if not.

    4 create a full backup regime.  That sounds a little scary, but it really boils down to set up your system to system backups of system image steady on your storage space of HARD drive (or USB in offline mode).  RAID 5 is wasting resources on a permanent basis in anticipation of failure.  Backup prepares you for any eventuality, and RAID 0 uses effectively resources - especially of the SSD.

    5. you have 32 GB of RAM, which is enough, but make sure you have done all that is necessary to ensure that your system maximizes efficiency by accessing this RAM.  I'm not familiar with what ASUS motherboard, so I don't know what he can do, but sometimes you can dig and find info on optimal configurations where when good things match, the system will switch in a higher mode with more channels, etc..  I know that my workstation is special when things RAM all matches.

    Personally, I did everything above, save for the diagnosis of the tablet that I don't have a tablet.  There is NOTHING that will awaken a system - every aspect - as have an IO subsystem high flow.  You'll wonder how you ever could resist using hard drives.

    -Christmas

Maybe you are looking for

  • Boot Camp can not detect Windows software support

    Hi guys! 1. I have a question, I started my bootcamp and pressed the 2 first options and clicked on continue: http://postimg.org/image/9mly0tvjl/ 2. that's what I did to "2." step. I chose the iso file of Windows 7 Home Premium and boot camp agreed a

  • Clock and battery indicator went

    Hey, I've finally updated to OS X El Capitan last night. Everything goes a lot overall, I love the new features and the whole system runs a lot faster. The only problem I have is that since I've updated the clock and battery indicator are no longer v

  • Replace from the Clipboard, or "connect the wires that overlap?

    I'll go by many of my first diagrams and clean code with things I've learned since I started using Labview.  A lot of this involves deleting objects, then copy/paste of a conception of good reference in the old design.   However,. This often leaves a

  • HP Envy 5530 series: HP Envy 5530 scanning problems

    I have a computer laptop, MSI game with wireless connection to my HP Envy 5530 series printer/scanner On my desktop, double click on the HP Envy icon used to bring up a menu to choose what to do with the printer. It worked great for scanning. IDKY bu

  • Can't get out of safe mode using msconfig

    I tried to use the msconfig on my laptop,who has windows vista, to get out of safe mode.Whenever I signed off but when I went backand the same choices came, I checked start windows normallywhich bring me just on the choice ofStart windows normally or