dcsimg
A Flash Developer Resource Site

Page 1 of 2 12 LastLast
Results 1 to 20 of 23

Thread: Flash supported on 2.7 OS -- out now

  1. #1
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158

    Flash supported on 2.7 OS -- out now

    PSP 2.7 update

    Updating my PSP now. Not sure if it's supposed to be a flash lite player.. or full blown PC flash player. I know it's based on Flash 6, but that's about it.

    I'm hoping the cursor keys map to the control pad on the PSP. I'll post when I find out a little more. There is nothing on macromedia.com about this.

  2. #2
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    did you update with Japanese version or English version? I havent seen any official statements abouit English version yet?

    As for keys here is a starting point, check optimize for 6r65 in Publish settings. You could also test to see if it supports key up events.

    Code:
    /*
    Define key DOWN events
    */
    var keyListener:Object = new Object();
    keyListener.onKeyDown = function() {
    	
    	// for 5 way navigation and softkeys
    	switch(Key.getCode()){
    		case Key.ENTER: my_txt.text = "enter"; break;
    		case Key.LEFT: my_txt.text = "left"; break;
    		case Key.RIGHT: my_txt.text = "right"; break;
    		case Key.UP:my_txt.text = "up"; break;
    		case Key.DOWN:my_txt.text = "down"; break;
    		case Key.PGUP: my_txt.text = "page up"; break;
                    case Key.PGDN: my_txt.text = "page down"; break;
                    case Key.TAB: my_txt.text = "tab"; break;
    	}
    	
    	// for 12 digit keypad
    	switch(String.fromCharCode(Key.getAscii())){
    		case "1": my_txt.text = "1";break;
    		case "2": my_txt.text = "2";break;
    		case "3": my_txt.text = "3";break;
    		case "4": my_txt.text = "4";break;
    		case "5": my_txt.text = "5";break;
    		case "6": my_txt.text = "6";break;
    		case "7": my_txt.text = "7";break;
    		case "8": my_txt.text = "8";break;
    		case "9": my_txt.text = "9";break;
    		case "0": my_txt.text = "0";break;
    		case "*": my_txt.text = "*";break;
    		case "#": my_txt.text = "#";break;
    	}
    };
    Key.addListener(keyListener);
    Last edited by hp3; 04-26-2006 at 05:43 PM.
    aviarts.com - web development and flash development

  3. #3
    Senior Member barrax's Avatar
    Join Date
    Jun 2000
    Location
    Southampton, UK
    Posts
    113
    I just tried to convert my old asteroids engine for playing on a psp and it ran extremely slow - unplayable. I ticked the optimise for player 6r65 and it ran faster initally but then slowed back down as soon as you tried to move and fire.

    Its an old engine that i coded a couple of years ago - so im not too suprised. I'm going to optimise the code, try and keep things in one onenterframe loop. Hopefully that will speed up performance.

    I'm guessing that hitTest is going to be hogging the power - so i'll swap that for mathemetical collision detection.

    I'll keep you updated on my progress.

    Can anyone else provide tips for getting a flash movie/game running nicely?

  4. #4
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    The link in my initial post is to the English download.

  5. #5
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    At this point, based on the games I ported from some flashlite cell phone games... the performance is pretty bad.

    Having did alot of testing with the cell phones, I gotta say that they actually ran these games faster. Which is just odd, given the difference in horsepower between a psp and a cell phone. So I am hoping there is something I am missing.

    On the cell phones, things that would hit the cpu hard were scaling, rotation, and alpha. But, I have a game that ran very well on the cell phone, and it runs horrible on the PSP right now. I turned off collision detection, and any kind of scaling/rotation.. didn't even notice a difference.

    I am gonna create a test application, to see if the issue is just drawing objects. No need to start looking at all the code if it's pretty much just how quickly it can draw things.

  6. #6
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    Ouch....

    I just made a quick little test application, and the performance is not so good.

    Basically this test app is just a moving evil emoticons. There is no collision, no special AI... nothing. The emoticon is a bmp with no transparency.

    Each time you press up on the control pad, it will add another evil emoticon. The performance decreases rather quickly. After adding like 4, the slowdown is really noticeable.

    It's arguably worse than cell phone performance.

  7. #7
    Senior Member barrax's Avatar
    Join Date
    Jun 2000
    Location
    Southampton, UK
    Posts
    113
    ive got an asteroids ship floating round - no asteroids and no gun fire... running smoothly so far. This involves clip rotation and x+y movement.

    Exported as version 6r65 with a single onEnterFrame.

    Got "real work" to do now, so i'll get back onto this tomorrow.

  8. #8
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    I haven't done a rotation test just yet. But I think unless you are limiting the number of asteroids to about 5 at a time, you are definitely going to run into the issue I have described. Before any AI, rotation, scaling, or alpha usage, I am getting slowdown with like 4-5 objects on the screen.

    So, whatever you code from here is basically just slowing it down more.

    I'll add a line of code to rotate the emoticon each frame and see how many of them I can get on the screen before the slowdown occurs.

  9. #9
    aidanmack.co.uk
    Join Date
    Dec 2001
    Location
    York, UK
    Posts
    400
    www.barraxworld.co.uk

    Your portfolio is awesome m8ty!
    so so jealous!

  10. #10
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    With rotation, I can see significant slowdown with only 3 objects on screen.

    I am by the way using the 6r65 version as well for all these tests.

  11. #11
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    Flashforward blog is trying to keep on top of the PSP situation with links to others testing this.

    http://blog.flashforwardconference.c...psp-more-info/
    aviarts.com - web development and flash development

  12. #12
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    I dont own a PSP but I know there are two sets of controls, dpad and the 4 arrows. I assume th 4 arrows correspond to the up/downl and left/right key events. Does the click on the dpad corresond to the enter key?

    I guess what I am asking is how do you know if someone presses the dpad? Or how to trap a dpad press event, if you are not using the pointer and standard flash buttons? Like a key catcher approach for PSP?
    aviarts.com - web development and flash development

  13. #13
    Senior Member barrax's Avatar
    Join Date
    Jun 2000
    Location
    Southampton, UK
    Posts
    113
    Huh? I thought the Dpad WAS the arrows... "direction pad". I currently dont own a psp - but i will in the next few hours

    As far as im aware (and i may be wrong - only been into this for half a day) i think you got...
    1.) arrow keys on yer PC keyboard == arrow buttons on psp
    2.) left mouse button on PC == the fire button on psp (whatever that is??? perhaps "X")

    Can anyone confirm this? (the left mouse button bit - my test game already uses the arrow button mapping from PC so i know that's correct).

    cheers,
    b

  14. #14
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    My main concern is undestanding whether the device executes Key.ENTER, regardless of what the keys are called.
    aviarts.com - web development and flash development

  15. #15
    Senior Member SlimSlaby's Avatar
    Join Date
    May 2005
    Posts
    158
    Quote Originally Posted by hp3
    My main concern is undestanding whether the device executes Key.ENTER, regardless of what the keys are called.

    Key.ENTER = 13, and I haven't found a way to generate that code with any buttons on the PSP. So, you might be out of luck on that one.

    The only keys I have been able to detect are :

    37 = Left on dpad
    38 = Up on dpad
    39 = Right on dpad
    40 = Down on dpad

    The mouse button is the X button, and you can detect the up and the down state same as on the PC.

  16. #16
    Senior Member barrax's Avatar
    Join Date
    Jun 2000
    Location
    Southampton, UK
    Posts
    113
    Im about 40% through re-coding my asteroids game. The flash player on the psp is really struggling. It looked promising at 1st as slimslaby and me tested it with 20 asteroids rotating and with the ship flying.

    Since then I've got my hands on a psp so ive been able to test quicker (cheers slaby for the continuous refresh screens from across the atlantic )

    I added hit detection (Maths not hitTest()) from the ship to the roids and with 6 asteroids it was bareable. But anymore and it chugs.

    I added bullets from the ship - and thats another thing to hit detect. As you can guess, that really slowed it down to about 5fps... not playable. All this is happening within one onEnterFrame loop - and one for-loop within this onenterframe which cycles upto 10 times (for each roid).

    This is a simple game of asteroids, published as 6r65 optimised @ 20fps, no sounds, _quality set to "low" and the flash player for the PSP is struggling.

    Needless to say - any other games i tried were running at 1fps and most of them made the flash player/psp run out of memory.

    Theres not much else you can do but sit tight and wait for an update from Sony IMHO.

    Has anyone else discovered optimisation tricks?

    Cheers,

    B

  17. #17
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    ---
    The mouse button is the X button, and you can detect the up and the down state same as on the PC.
    ---
    how are you detecting these events? Are you creating a seperate Flash button object just for these? Or are you useing the key object somehow?
    aviarts.com - web development and flash development

  18. #18
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    do you guys know if PSP supports the mouse object?

    Code:
    // Create a mouse listener object
    var mouseListener = new Object();
    
    mouseListener.onMouseDown = function() {
      textField.text = "mouse down";
    };
    
    mouseListener.onMouseUp = function() {
      textField.text = "mouse up";
    };
    
    Mouse.addListener(mouseListener);
    aviarts.com - web development and flash development

  19. #19
    Senior Member barrax's Avatar
    Join Date
    Jun 2000
    Location
    Southampton, UK
    Posts
    113
    Code:
    mouseObj = {};
    mouseObj.onMouseDown = fire
    Mouse.addListener(mouseObj);
    Thats what ive been using for the game im making.... so yeah.

  20. #20
    Moderator
    Join Date
    Apr 2001
    Location
    Akron OH, USA
    Posts
    4,841
    have you guys tested loading of xml, jpeg or mp3 into this player?
    aviarts.com - web development and flash development

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center