Interactive Media

Mohamed Al-Kaf - Media Explorations

Issues with Adobe Animate

Written by: Mohamed Al-Kaf | Posted on: | Category:

Issues When putting together the complete background image. Using all the asset for the building and scenery Seems to have to have a performance hit on the software.

Screenshot 2019-05-01 at 4.14.03 pm.png

Screenshot 2019-05-01 at 4.16.13 pm.png

I tried to even changed the vector graphics into BITMAP i thought maybe how the software keeps redrawing at the image is moved is affect the software. Because anytime you do not move the playback speed is acceptable and looks smooth. However as soon as you move the frame rate reduce and becomes laggy.

Adding multipul cars to Path Layers added to the lag. This was important port of the game cause it was easy way to create path for cars usuing lines that they can rotate around rather than a motion tween and at corners for each car chance the rotation postion.

As it was ment to fast paced communication game i thought maybe to found another software or a work around for this to work.

They way i have codded the software is the whole map to be in the background at a large scale and then manipulate the position of the map.

I researched the virtual camera that can be told to follow graphic symbol. This was smooth however because advanced layer option was needed many of the legacy option such as the guide path layers could not be used.

Screenshot 2019-05-01 at 4.06.08 pm.png

2019-05-01 4.05.28 pm.gif

As you can see from the quick clip below, the speed of the cars slow down when the map is moving, this is due to the frame rate dropping when i believe that software is redrawing the new position of the map.

2019-05-01 4.18.26 pm.gif

the code used for this:

var upPressed:Boolean = false;
var downPressed:Boolean = false;
var leftPressed:Boolean = false;
var rightPressed:Boolean = false;

allBG.addEventListener(Event.ENTER_FRAME, fl_MoveInDirectionOfKey);
stage.addEventListener(KeyboardEvent.KEY_DOWN, fl_SetKeyPressed);
stage.addEventListener(KeyboardEvent.KEY_UP, fl_UnsetKeyPressed);

function fl_MoveInDirectionOfKey(event:Event)
{
    if (upPressed)
    {
        allBG.y += 5;
    }
    if (downPressed)
    {
        allBG.y -= 5;
    }
    if (leftPressed)
    {
        allBG.x += 5;
    }
    if (rightPressed)
    {
        allBG.x -= 5;
    }
    if (view.hitTestObject(allBG.red_car)){
    trace("follow");
}else{
    trace("not follow");
}
}

function fl_SetKeyPressed(event:KeyboardEvent):void
{
    switch (event.keyCode)
    {
        case Keyboard.UP:
        {
            upPressed = true;
            break;
        }
        case Keyboard.DOWN:
        {
            downPressed = true;
            break;
        }
        case Keyboard.LEFT:
        {
            leftPressed = true;
            break;
        }
        case Keyboard.RIGHT:
        {
            rightPressed = true;
            break;
        }
    }
}

function fl_UnsetKeyPressed(event:KeyboardEvent):void
{
    switch (event.keyCode)
    {
        case Keyboard.UP:
        {
            upPressed = false;
            break;
        }
        case Keyboard.DOWN:
        {
            downPressed = false;
            break;
        }
        case Keyboard.LEFT:
        {
            leftPressed = false;
            break;
        }
        case Keyboard.RIGHT:
        {
            rightPressed = false;
            break;
        }
    }
}