Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

1411512 Posts in 69376 Topics- by 58430 Members - Latest Member: Jesse Webb

April 26, 2024, 05:20:58 PM

Need hosting? Check out Digital Ocean
(more details in this thread)
TIGSource ForumsDeveloperTechnical (Moderator: ThemsAllTook)Moving beyond flash
Pages: [1]
Print
Author Topic: Moving beyond flash  (Read 1485 times)
ZIn8
Level 0
*


View Profile
« on: March 28, 2013, 08:26:10 AM »

Hey, I would like to make an extended version of my rather stupid flash/actionscrip3 (2D obviously) game. I want to increase screen size (full-screen) and make it a standalone downloadable version. What would be a best way to do this?

I know I can wrap the .swf file into an executable file. Will there be any performance issues if I increase the screen size then?

I would appreciate any suggestions. Thank you very much.
Logged
Udderdude
Level 10
*****


View Profile WWW
« Reply #1 on: March 28, 2013, 08:44:01 AM »

Fullscreen Flash is always a performance hit because it's rendering the entire size of the user's desktop.  You'll probably need a 3rd party tool which changes the screen resolution.

I had to write one myself because all the 3rd party .swf wrappers I found were crappy, expensive or both.
Logged
nikki
Level 10
*****


View Profile
« Reply #2 on: March 28, 2013, 08:50:37 AM »

I *think* you could use AIR for that
Logged
Udderdude
Level 10
*****


View Profile WWW
« Reply #3 on: March 28, 2013, 08:53:33 AM »

No, Adobe AIR cannot change the screen resolution.

Furthermore standalone AIR apps kind of suck because they require you to bundle or install AIR, and it bugs the user to update AIR every time they try to play your game.

Edit: It turns out using bundled AIR won't bug the user for updates.  However, setting up the bundled install is kind of a pain, whereas with Flash it's still the same standalone projector ..
« Last Edit: March 28, 2013, 10:39:20 AM by Udderdude » Logged
Sam
Level 3
***



View Profile WWW
« Reply #4 on: March 28, 2013, 10:07:03 AM »

Worth mentioning the golden rule of performance optimisation: Make sure you actually need to do it.

Although rendering to a larger screen area will inevitably be more taxing on performance, it is quite possible that it'll not actually harm framerate on a reasonable computer. And if it does cause problems you almost certainly have ample room to improve the efficiency of how your game is drawing graphics through Flash.

General rule using the standard graphics stuff is to avoid making it redraw vector images or rotated bitmaps. Instead you want it to be drawing, or copyPixel'ing untransformed bitmaps. Done correctly you can make even a traditional looking vector art game run orders of magnitude faster by automatically generating spritesheets and so on.

If you want serious graphical power then use Stage3D. Fullscreen complex 3D or 2D scenes with fancy shader effects all over the place is no problem then. Check out the Starling library for a simplified way of getting the power of Stage3D for 2D graphics.
Logged
Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #5 on: March 28, 2013, 10:33:00 AM »

Certainly try AIR, you can create it as a captive runtime which yeah costs a few megs but so does tons of other runtime library requirements that other frameworks require.

As to resolution switching, I personally don't believe in it anymore now that LCDs are the dominate monitor type. Usually they really only have one native resolution, and anything else is going to get scaled, stretched, or adjusted.
« Last Edit: March 28, 2013, 10:41:09 AM by Gregg Williams » Logged

nikki
Level 10
*****


View Profile
« Reply #6 on: March 28, 2013, 11:21:08 AM »

I don't read a resolution-change as requirement.
just the desire to go fullscreen. (like youtube does too without switching my resolution)

« Last Edit: March 28, 2013, 01:33:26 PM by nikki » Logged
rundown
Level 5
*****



View Profile WWW
« Reply #7 on: March 28, 2013, 04:57:16 PM »

You can actually do this within flash.
This does the trick.
stage.displayState = StageDisplayState.FULL_SCREEN;

It does give some framerate issues like Udderdude said. Mostly because of all your bitmaps. Bit if you look into blitting this might solve everything.
Logged

nikki
Level 10
*****


View Profile
« Reply #8 on: March 28, 2013, 05:06:51 PM »

keep in mind that you can only go fullscreen in flash from a mouseEvent.

you cannot set the stage in a constructor somewhere.
Logged
rundown
Level 5
*****



View Profile WWW
« Reply #9 on: March 28, 2013, 05:09:42 PM »

Euh yes you can. I'm making a game where I made a gamestart function.
You can't go fullscreen if you develop for web.

If( your .swf is not inside a website || if you compiled it to an exe)
{
 fullscreen works everywhere! //yey
}
Logged

Gregg Williams
Level 10
*****


Retromite code daemon


View Profile WWW
« Reply #10 on: March 28, 2013, 05:11:53 PM »

Obviously performance is a potential problem. As to going fullscreen you can use AIR instead and create a native window giving you much more control over things and getting around that requirement.

Another potential solution might be to take your flash game and port it to Haxe, then use Haxe to create the desktop versions. I've not tried this myself though.
Logged

Udderdude
Level 10
*****


View Profile WWW
« Reply #11 on: March 29, 2013, 04:23:09 AM »

You can actually do this within flash.
This does the trick.
stage.displayState = StageDisplayState.FULL_SCREEN;

It does give some framerate issues like Udderdude said. Mostly because of all your bitmaps. Bit if you look into blitting this might solve everything.

If you mean stuff like Flixel, blitting won't solve the main issue.  Flash still has to stretch your game bitmap to the desktop resolution and draw it to the screen.
Logged
Martin 2BAM
Level 10
*****


@iam2bam


View Profile WWW
« Reply #12 on: March 29, 2013, 07:11:28 AM »

I had to write one myself because all the 3rd party .swf wrappers I found were crappy, expensive or both.

Can you share the code or at least your experience? I wanted to make my own too (same reasons) but don't know where to start.
Logged

Working on HeliBrawl
Udderdude
Level 10
*****


View Profile WWW
« Reply #13 on: March 29, 2013, 07:47:09 AM »

I had to write one myself because all the 3rd party .swf wrappers I found were crappy, expensive or both.

Can you share the code or at least your experience? I wanted to make my own too (same reasons) but don't know where to start.

I made it with MSVC, all it does is set the screen resolution and then run another program to set it back.  There's a few more details you'd have to do to make it not squash the user's windows by setting fullscreen mode rather than changing the desktop resolution.
Logged
Martin 2BAM
Level 10
*****


@iam2bam


View Profile WWW
« Reply #14 on: March 29, 2013, 07:56:45 AM »

I thought it was something more complex (with embedded activex to load the player) because I wanted to also trap right-clicks.

Thanks anyway!
Logged

Working on HeliBrawl
Udderdude
Level 10
*****


View Profile WWW
« Reply #15 on: March 29, 2013, 08:07:25 AM »

Yeah I checked out the ones that used embedded ActiveX but I had some issues with it, namely that the user needs to install the ActiveX Flash player in order to run your game, and Mac/Linux/Web versions of your game won't be able to use any of the special features like right click capture anyway.  Also, if you want to target an older version of Flash, you're pretty much screwed.
Logged
X-Tender
Level 1
*



View Profile WWW
« Reply #16 on: March 29, 2013, 04:12:16 PM »

You can detect/trap the right Mouse button since FP 11.2
http://www.leebrimelow.com/quick-tip-new-right-click-mouse-event/

Also when you use the Starling Framwork the Fullscreenmode would also be pretty fast.
Logged

Martin 2BAM
Level 10
*****


@iam2bam


View Profile WWW
« Reply #17 on: April 01, 2013, 02:18:46 PM »

 My Word!

thanks!
Logged

Working on HeliBrawl
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic