PDA

View Full Version : [AS3] Fullscreen mode in Browser for PC games (2010)


Niber
11-26-2010, 02:12 PM
Hi,
I've been making big-scale 3d games for the last couple of years but now I want to go back to using flash, however a feature of one enormous importance is the ability to go into full-screen from browser, playing it with a browser bar above is just so bad for immersion and having to download the game almost completely ruins the point of using flash,

I read many (3?) years ago that they finally added full-screen support but that Adobe totally dumped a truckload of bullshit on every game-developer by restricting so you can't use keyboard-input, but that that would surely come in the feature,

Now (end of 2010) I'm looking into it seriously and first of all to my suprise it's mentioned very little, I'm paying internet by the kb so I can't do too much websurfing from home but I were just at a internet cafe for 2.5 frikking hours and could not found a single mention of this on the internet, it's all youtube/FLV bullshit not a word on games.

But now a friend finally pointed me to the small print on Flash 10 which basically says that only Arrows, Space and Tab is availible, and I've done a test myself in flash cs5/fp10/as3 and can confirm that this is indeed the only buttons that works.

But that's NOT enough to make the game I'm planning on making, I need atleast a few more buttons unlocked, does adobe really think that a few more buttons would be catostrofical or is it just that they simply gives the middle-finger to PC flash games, I'm guessing the latter,

so what I'm wondering is:
a) Does anyone know if more buttons will be unlocked in the future?

b) Why do ppl stand for this? fullscreen mode has been availible for about 3 years AFAIK and still no consideration for games, if they added a restirction on flash that it's illegal to view video on flash then youtube would drop flash in a second but why aren't ppl leaving flash in droves and booing them out every time they are on conferenses?

3) How does other flash games do it? during my search I can across many threads of ppl complaining that fullscreen mode in farmville doesn't work for them (because of dual monitors and stuff), if farmville and other social games use flash fullscreen do you guys know how they get around this problem? or does such a huge industry really cater around this ridicolous restriction? I've never played the game myself but I would guess that a "social game" would atleast have the option to type in it but idunno maybe not.

tadster
11-26-2010, 06:34 PM
So farmville goes fullscreen and has full keyboard input? I've never played farmville, but that would be interesting, perhaps it's not 'real' fullscreen but rather they just pop up the swf 100% in a new window. (see also hulu)
But you can use the ExternalInterface to have flash respond to javascript key events.
Although doing so will drop the performance of your games.

rrh
11-27-2010, 03:08 AM
I was under the impression that the limitations existed out of security concerns, that if you could embed something in a website that could take over the whole screen and sense all keys, it would be exploited for phishing and keyloggers.

I don't know what the Farmville approach would be. It might be entirely mouse-based; I wouldn't assume you can type in it, since they could just communicate with other players through Facebook.

Niber
11-27-2010, 05:15 AM
as for the javascript suggestion I'm not going to jump through those loops AND have performance drop but thanks anyway for the suggestion it sounds like a good option if I was really desperate, but in my case since I'm at the starting phases of my game it's not yet all too late to change engine and sent adobe a UPS delivery with a box of my feces (tho I've already made 1 prototype of my game in flash so having to change would suck).

I'm not totally interested what the reasons for this betrayl for game devs are but ok let's discuss that as well, I could very well be miss-understanding something here but I don't see how keylogging would be a issue in FULLSCREEN, keylogging is something you want to hide in the background NOT something u want to show fullscreen,

I think it's rather for general annoyance things they want to restrict things they may not even know of yet they don't want an outbreak of a new type of ad that will be so annoying ppl will uninstall flash player, allowing keyboard input isn't really the issue there but they restrict it just in case,
and someone in adobe probably asked "but what about games?" and the manager responded "oh it won't be a problem you don't need more than these couple of keys for youtube" "yeah but GAMES, not VIDEOS" "huh? you're not making any sense"


but yeah it just doesn't make any sense to me reading these things of how adobe is focusing on gaming etc and spending millions developing hardware acceleration etc and still have such a huge restriction in games that could be opened up in 5 minutes of work, why are reporters taking them seriously, everytime adobe mentions their focus on games the reporter should smack them in the face with a big black dildo

tadster
11-27-2010, 06:57 PM
I was unaware that Adobe was focusing on games, I thought they care more about HTML5 right now.
But why do you need fullscreen so bad? Even if you get keys to work while fullscreen, going full screen also lowers performance greatly, even in a standalone situation.

Flash games are really hot right now, but none of the ones I've played go fullscreen.
see kongregate.

Niber
11-28-2010, 04:34 AM
@Tadster: I guess it's because most flash games are arcade games of sorts but I'm making a really dark adventure-game kind of Heavy Rain style and a grey firefox bar really breaks the immersion.

Performance isn't an issue because I'm making a adventure-game with static pre-rendered backgrounds (i.e. no sliding) so only the character is getting redrawn (redraw regions) meaning that even as I play my game in 1920x1080 it's really only rendering out like 300x700 per frame for the moving character.

Atm it's leaning towards simplifying my game a bit to match the keyboard limitations tho, so it may turn out fine (I'm still a bit pissed of at adobe tho),
only thing I can't figure out now is that when I go into fullscreen mode I don't want to scale the thing, but rather I want to redraw the thing in its new resolution and load in a new pre-render based on what your resolution is, but if I go fullscreen without scaling it centers the movie so if I want the background to start in the top left corner I annoyingly have to use negative coordinates, but I'm sure there's a solution..

tadster
11-28-2010, 07:06 PM
Well, best of luck to you Niber, I'd be really interested in seeing the game once you have a completed version of it, sounds like it will be really good.