|
-
[F8]Dev frame rate different from browser?
I've been working hard for weeks then I finally tested my game on a browser. I tried many different publish settings but I can't get the speed I see in the dev version (CTRL+ENTER). My game is just 400x300, tiled bitmap screen, maybe 30-40 mcs, 10 visible usually at a time. I don't scale anywhere.
In dev I can get 45 FPS or more, but testing on various browsers it only goes around 35 FPS or less. Is this a normal occurance? Should I trust what I'm seeing in the browser and dev for that speed?
Thanks!
-
Senior Member
It is completely normal. Flash movies have always been slower in the browser.
-
Does it make a difference if the bitmaps are GIF or PNG? There's something I'm doing wrong because Heli Attack has a lot more stuff going on than I do.
-
Hype over content...
As to the browser slow down issue, I've posted a good link in the knowledge base which will help clear things up for you.
Bitmap wise, you're only going to get a performance decrease using png's which are alpha blended ( ie, 24bit pngs ).
Also it's pointless comparing a game to another one in terms of speed / objects ( Like the recent thread comparing a demo to Fancy Pants ), how it's actually coded has a big impact. iopred has probably done a lot of things differently internally to how you've done them, so it's just comparing apples and oranges.
Squize.
Last edited by Squize; 11-25-2006 at 02:57 PM.
-
- cache as bitmaps (if you have vectors)
- scollable tile engine
- bitmap data (no flash vectors)
- smal screensize (aka on 640*480+)
- no flash gradients
...
just to name some
-
Thanks all. Squize can you post a link to that article, I'm not sure where to find that.
-
Hype over content...
Knowledge base sticky at the top of this forum mate, second post in.
Squize.
-
-
For internet explorer if you use wmode = "transparent" when you embed your movie it will run at exact same speed as in a standalone player. It's as simple as that.
You can forget about all the other nonsense. This works every time unless you have something really fishy going on in your code.
-
Hype over content...
But that breaks Flash games for FireFox, so either you have to have two versions, alienate a large percentage of your users, or preferably not use it 
Squize.
-
You don't need to use transparent mode for Firefox. It all depends how you embed it.
So they will still get the same game they'd normally get, but there is no need to penalize IE users when there is a way to give them full frame rates.
Or you need to be careful about your interface. Key presses sometimes don't work in Firefox when using transparent mode, so if you can use mouse for everything.
But, check this out in Firefox http://www.deusx.com/football
Transparent mode is used for both, and you can control the keeper with keys even in firefox, but you can't use space key to curve the ball in firefox ( worth checking why exactly that is )
-
The wmode trick works great for my game on IE, it's perfect now. Wmode in Firefox doesn't seem to do anything, but it didn't look like it was broken either. Keys worked fine. Is there a way for Firefox to get near full frame rates too?
Edit: Nevermind Firefox keys were broken, I put the WMODE tag in the wrong place. But the speed was perfect.
Last edited by Gamebrew; 11-25-2006 at 03:55 PM.
-
Senior Member
weird. WMODE with FireFox is supposed to make it SLOWER.
-
Script kiddie
Adobe open-sourced 130,000 lines of the Flash Player's source code (ie, the AVM - ActionScript Virtual Machine) for the Mozilla foundation recently (biggest donation they've ever received). I have high hopes that this wmode bug will be history when the next public release of Firefox comes out.
-
I Googled lots of info on wmode for Firefox, it seems it can't be fixed. You can do a onKeyDown/onKeyUp instead but that doesn't work well with games. This was a real buzz kill for me. If there is a work around please let me know.
This is like when I was making Java applets, everything was cool until I found out that you could not control frame rates properly in Windows because System.currentTimeMillis() was off. An obvious problem never fixed for so long.
-
firefox will be interesting for me with v3+ because right now its quite a mess (ram, performance). If I remember right v3 will be from the ground up renewed as alot of their libraries & code is from the old netscape days and isn´t up to date anymore.
-
Script kiddie
I've used Firefox 3.0a (you can download WIP versions from their server), wasn't too impressed.
-
Does anyone recommend a good frame rate for an all bitmap game? Is 45 FPS too much to hope for? Or better yet what is the frame rate of Heli Attack? I'm kinda using that as my inspiration
-
Script kiddie
Here's a scale of framerates:
11 fps - consistent speed on PCs and Macs
12 fps - half speed that eyes normally see motion at; basically double-framed professional animation, also default framerate in Flash for this reason
16 fps - speed at which eye can perceive things as a constant motion rather than a series of separate frames; minimum acceptable speed for a game to play at
21 fps - consistent speed on PCs and Macs
24 fps - speed at which eyes normally see motion at; used in professional animation, best if you want to show organic movement fluidly
31 fps - smooth, consistent speed on PCs and Macs; used in the vast majority of Flash games, and also about the highest speed you can reasonably expect the Flash Player to keep up
50 fps - framerate of PAL television broadcasts
60 fps - framerate of NTSC television broadcasts
120 fps - maximum framerate in Flash, only usually used in speed experiments
Generally you lose about 10 fps from playing something in the browser, so for browser versions of games, developers tend to raise the framerate.
In Firefox, after a few seconds of the game running, the framerate will permanently decrease by 7 fps (and nobody's quite sure why).
-
Thanks, yes 31 is the magic number. Too bad I made so much animation already. There should be a guide that's called "before you start trying to make a game in Flash you should know this". Or maybe I just didn't spot it here.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|