What new game APIs do you want in the Flash Player?
I have been learning some game development lately, and building my first game (well, at least my first game since Flash 4). I think game development and deployment are some of the real strengths of the Flash player, but ones which we haven’t specifically focused on in a while.
While working on my game, there were a couple of things I needed to do where additional player APIs could have made the development easier (as well as likely speeding up execution). This got me to thinking about other APIs that would be useful for game development. So, what new Flash Player APIs would you like to see that would make game development easier?
Here are a couple from me:
Hit test that tests visible bounds of Sprites. Something like:
sprite.hitTestVisible(anotherSprite):Boolean
Basically, something similar the API Grant Skinner created, but native to the player.
The next API I would like is one that would check for hits against multiple sprites, and return a vector of sprites that we colliding.
sprite.hitTestMultiple(sprites:Vector.<Sprite>):Vector.<Sprite>;
This would make it easy to do collision detection for multiple items, and perhaps lead to a performance boost.
So, what APIs would you like to see that would make game development easier. Please be as specific as possible (i.e. don’t just say “Physics engine” or 3D support). Leave you suggestions in the comments.






Hi, I think sound in games is vastly under-rated. I would like to see a lot finer grain control and manipulation of sound along with rock solid timing to benefit interactive music.
Joc
16 Jun 09 at 12:08 pm
Multitouch APIs are key to moving the platform forward. I know this is in the works on internal builds – we want it now though!
Ben
16 Jun 09 at 12:11 pm
@Joc
–
I would like to see a lot finer grain control and manipulation of sound along with rock solid timing to benefit interactive music.
–
Please be more specific. What specific APIs would you like to see?
mike chambers
mesh@adobe.com
mikechambers
16 Jun 09 at 12:14 pm
Hey Mike,
We are having a meeting tomorrow tonight in Philly on the topic of AS3 and Game Development in Flash with Mike Welsh from newgrounds.com – more info here: http://www.pfpaug.org/core/pivot/entry.php?id=56
I’ll be sure to mention this post in the meeting and see if we can’t all provide some good feedback for you.
See ya!
Rob
Robert M. Hall
16 Jun 09 at 12:17 pm
Can we get a “lazy” mode on the hitTest? Like have the sprite fire an event on collision. I imagine its probably a super performance killer though.
Would make stuff like inventory slots easy, because you can do compatibility check as they pass over, instead on drop. Sure there are a bunch of ways to do it currently though.
mondo
16 Jun 09 at 12:49 pm
Hello.
I might be slightly off topic, but font embedding and displaying it is pain in the “behind” at the moment. There are some rare cases ( quest description with differently styled objectives for example ) when font manipulation looks like a chaotic trash pile on whole game’s code background. But it’s just maybe me. So I personally would be glad to seem some improvements in this area.
Aleksandr.
Aleksandr
16 Jun 09 at 12:50 pm
The bottom example might lead to a lot of inefficiencies as developers might end up performing excessive hit checks. If “A” checks for contact with “B” and “C”, then they don’t need to check against “A”.
I would like to see more improvements such as the Vector class in FP10. (Maybe fixed-sized arrays?). Also, adding methods to the Point class. Every game developer needs a Math Vector class, so it gets annoying to have to convert between differing Math Vector classes when using different APIs (I constantly have to convert Box2D’s vector class to expose a Point object for my API, but need to use my own MathVector class for standard vector manipulations such as scaling, rotating, and setting length).
Eric Smith
16 Jun 09 at 1:19 pm
Better control over nested MovieClip playback and display-list, especially when doing gotoAndStops() and suchlike. Earlier access to instances in keyframes (even when the layer starts with a blank keyframe).
More info over memory usage (Object.memory) Also proper control over a more garbage collection would be nice (so you can trigger it when nobody will notice).
Generics and Java-style Collections
The sprite hittest you mentioned needs to report more data: i’d also like to know where stuff is colliding (a Rectangle?) Maybe include an optimized ray/rectangle/polygon/circle intersection.
Multi-threading.. like the ShaderJob. Like a base-class you can extends that has it’s own framerate or something and communicates with events. It would be useful for heavy-duty background processing while keep other stuff going smoothly: of course it comes with some sort of clever data locking mechanism.
Loads of other stuff you can also build yourself (building your own library is half the fun anyway :)
Cheers!
Macaca
16 Jun 09 at 1:23 pm
Hi Mike
hitTestVisible() would be a great step, but going further it would be fantastic to see a decent collision response API that worked like the methods in these tutorials: http://www.metanetsoftware.com/technique.html
Even just having a standardised, optimised Euclidean vector class would be extremely useful here.
MichaelJW
16 Jun 09 at 1:27 pm
Mike,
The one very core gaming piece that flash lacks natively is quality data structures. Vector. was certainly a step in the right direction, and gave game developers a bit more flexibility due to performance increases.
In my opinion, a core set of these structures (Lists, Maps, Queues, Stacks, etc…) which use the template-like syntax for type control is the first step. Polygonal has a great set of APIs (which are untyped) – No offense to Mr. Skinner, but that O(n) hit test doesn’t seem practical in a complex game implementation.
If the structures are there, the game API should evolve thereafter.
Matt Bolt
16 Jun 09 at 1:31 pm
Realtime animation controls.
I explain, in games we often have to mix differents animations systems (frame based, simulation based, timer, etc…) but, as the flash player framerate is notoriously unstable, it’s a pain to synchronize all that stuff together in order to make better visual/sound effects. Another issue in game is due to the necessity of providing pause, and stuff such as setInterval/setTimeout or sounds are really painful to pause with the rest of animations (if I trigger an event to occurs after 5s I have to keep track of the time elapsed in parallel of the interval in order to restart it properly).
A quick exemple of what can be done :
Let say that we have a new timer class named RTTimer, which dispatch a specific event containing the duration of the last frame in ms and some other usefull things (duration in seconds, running time since start, etc…). That timer allow start, stop, time stretching over all listeners of an instance by multiplying the frame duration using a speed factor, etc…
We could have a RTMovieClip which run frame-based animations according to the RTTimer events and which guarantee that a 24 frames animation will take one second whatever the real framerate is in the browser (by skipping frames if needed) and which is affected by the RTTimer time stretch.
We could also have specific RTInterval and RTTimeout classes (or methods) which are listening to RTTimer as well (which mean that they’re always synchronized with the rest of animations, they can be paused, stretched, etc…)
Tweens should also run on that timer to be synchronized with the previous objects.
In that way the game experience is preserved even if the framerate fall down on small hardware config.
I’ve wrote a lowra extensions based on theses concept some years ago, it’s named Kairos, and you could find it on google code if you to take a look at it :).
Cédric
Cédric Néhémie
16 Jun 09 at 1:53 pm
It’s not api, but I want lossless audio import, faster builds with large amounts of classes and data, and easier preloaders. It’s surprisingly hard to make a single swf these days.
Max
16 Jun 09 at 2:07 pm
This is not just a framework as it’d require additional player work, but gamepad/joystick support. This is a sort of a niche though.
zeh
16 Jun 09 at 2:11 pm
Better 3D support (see five3D).
It would be really nice if you guys got serious about tweening – the built-in stuff still sucks compared to almost all the 3rd party classes out there.
Asynchronous javascript calls would be huge!!
Right clicking.
Use the geometry classes more consistently: graphics.lineTo(point).
Rob
16 Jun 09 at 2:34 pm
2 words: Device support.
3D mouse support.
Wii remote controller support.
head-tracker support.
Dance Dance Revolution dance-pad support.
And something that will construct polygons out of images in the webcam, so that human movement can be used as a game controller.
Harry Garland
16 Jun 09 at 2:47 pm
Parameterizable types. Like Vector, but user definable. This was in the ES4 spec, and Haxe has it, so hopefully it’s not too terribly difficult.
Multi-threading. Javascript worker thread style or java Runnable style, anything.
API access to low level memory like Alchemy. Haxe already implemented it, give it to us AS3 users too.
Compiler optimizations. Alchemy proves that the vm can do a lot more than the current compiler lets it.
Steve Shipman
16 Jun 09 at 2:58 pm
We desperately need joypad support:
http://blog.iainlobb.com/2008/08/no-joy-my-campaign-for-joystick-and.html
Iain
16 Jun 09 at 2:59 pm
You should talk to the guy who created Flixel : http://flixel.org/
He’s a master 2d flash coder who might be able to offer some great ideas.
andrew wooldridge
16 Jun 09 at 3:02 pm
AI. It’s really broad, especially depending on the game, but pathfinding, distance and a bit of logical AI could be part of an API… or maybe it’s own API.
seanlail
16 Jun 09 at 3:02 pm
More hardware rendering and native code for simple things (such as data structures or common calculations). Hardware rendering is a hugely tough problem though.
Maybe some other game tick tools like timer based games. I can’t tell you how many bad games are made because everything is frame based rather than time based from tweens to the main tick.
Maybe if going the 3d way native format parsers (collada) that returns standardized formats for speed.
Basic AI proximity, pathing and helpers for multi-player or NPC games.
Input tools like mouse speed, direction, key input apis.
Definitely a SoundManager type class that makes sounds much more consolidated to one area.
All this is pretty simple stuff once you dig in except for making it faster by native. But almost all flash game developers start off the wrong way.
drawlogic
16 Jun 09 at 3:45 pm
I think the biggest thing that Adobe could do for us, that we can’t do ourselves, has to do w/ speed improvements.
I think including a common set of data structures would really help:
- Queue
- Stack (more clearly separated than the standard Array)
- Tree
- Binary Tree
- Binary Search Tree (BST)
- Linked List
- Heap
- Priority Queue
- Graph (including searching)
- Better performing multi-dimensional Array
Plus, other things such as:
- True conditional compilation (#ifdef like support)
- Access to Alchemy OpCodes and PixelBender Assembly
An extended Math class that includes other features such as a Trig library, etc.
Lastly (and perhaps most importantly), you said not to say anything generic like “physics engine”, but you must have specifically used this as an example because you knew so many people would say it and want it. A native physics engine built into Flash would be widely used. Why aren’t we supposed to suggest this? Do you disagree that many would use it? Or is it that you are looking for a specific engine suggestion? I don’t understand why we are not supposed to say this…
Thanks Adobe/Mike for getting feedback on this excellent question!
Nate Chatellier
16 Jun 09 at 4:34 pm
Anyone have any ideas for an API that would help with game security? Helping to protect values in memory from being tampered with, and perhaps a more built-in way of securely transferring data?
Maybe it’s not something that can be improved (much less solved) with an API, or something that is really even specifically a ‘flash’ issue as much as it is just the nature of the web, but it seems one of the number one issues with flash games is how difficult it is to secure them, and/or make high score lists a little easier to implement. So I’m sure any help would be appreciated. ;)
(maybe even an ‘obfuscate’ checkbox in publish settings would be nice, although not an API…)
John Thomas
16 Jun 09 at 4:47 pm
Alright I have fairly simple ideas for API’s which would make all of our lives much easier. Some of my ideas may already be in CS4, because I use CS3.
A Better Sound API:
So you can put a song in a frame, but you cannot edit it via Action script. It would be nice to be able to change its volume (relative to the volumes set once in the frame), change tempo, pitch, etc.
Also a built it API for Action script allowing for easier managing of multiple sounds. It could be similar to depth management, but with only a certain amount of layers (Because flash can only play a certain amount of sounds at one time). If there was a simple function for turning sounds on and off it would save time rather than making a bunch of if and else statement.
Automatic Toggle For Booleans:
Simple. If the Boolean is true its sets it to false. If its false it sets it to true.
Automatic updating of .swc files:
It would save a lot of time if we could set a .swc to be replaced automatically every time a certain mc is saved. When I am taking an MC and exporting it as a .swc then going to another file to relocate it and replace it, everything gets a bit messy.
Simple Built in Preloader:
Some amateur programmers have an especially hard time with preloader. If we had the component like progress bar have some value like preload to preload it would be awesome. Also being able to choose the bar for the preloading so it would be customized would be cool.
I have some more ideas, but I cant remember right now. Thanks for letting us share with you though!
Adam Eagle
16 Jun 09 at 5:04 pm
Joystick support ->
http://bugs.adobe.com/jira/browse/FP-566
judah
16 Jun 09 at 5:06 pm
AI is definitely a big problem. I found it nearly impossible to perform complex AI routines because of inefficiency — even a small decision tree took many seconds to complete.
So I would like to have some help performing an A* or best-first-search type algorithm — something like
findBestNode(nodes:NodeList, evaluationFunc:Function):Node
Where the NodeList could be a structure derived from something built into Flash.. or, frankly, any way that makes it efficient on your end… we can adapt to whatever it takes. I’m willing to jump through lots of hoops if there’s a way to get semi-decent decision trees working in Flash!
Eric Heimburg
16 Jun 09 at 5:38 pm
Just to clarify, the reason this is different than a sort operation is that “nodes” have multiple children — so it’s not a node list per se, but some sort of node tree structure.
Eric Heimburg
16 Jun 09 at 5:40 pm
1) Completely revamped sound API that allows for a) simple control over pausing, resuming, and fading that doesn’t mess with the looping and volume settings of the track, b) looping audio that suffers from no delays when using the SOUND_COMPLETE event well, c) queuing multiple sounds to play one after the other, d) the ability to easily loop through portions of a track (e.g. you have a song with a slow lead-in that you only want to play once and then have it skip the lead-in when it loops).
I really can’t stress enough just how terrible the current sound API is right now. Nothing strikes fear into my heart like the mere thought of trying to do something interesting with audio in flash. It brings grown men to tears and eats kittens.
2) The ability to read through the actual shape information in a vector shape (e.g. so you can draw a bunch of vector lines in a movieclip and be able to read their location/orientation/scale to determine how to create collision objects for a level).
3) Native line-to-line, circle-to-circle, circle-to-line collision detection methods. Boxes would be nice too.
4) Support for disabling the right-click support through USER INTERACTION. I know, Adobe will never let us disable it automatically, but can we at least do like the file saving/loading API’s and have users click a button to disable the context menu? It’s totally insane that we still can’t use the second most important input on a PC for gaming. Hugely limiting the sorts of designs people can implement.
5) Fullscreen support that doesn’t block input! Why are we still limited to playing games in tiny windows?
There’s a bunch of other things I’d like to see fixed to speed up game development (like the idiotic scrollbar that is arbitrary limited to a ~4000 pixel range for no bloody reason even though movieclips can be much, much larger than that), but they aren’t really API requests. Feel like taking interface fix requests too? I can go all day.
Evan Miller
16 Jun 09 at 6:31 pm
Mike,
One thing that comes in handy in game development more than you might guess is seeding random number generation. It allows you to have randomness in a game but make it repeatable. Having it be repeatable helps with replicating a bug during development or with keeping screens in sync during multiplayer play.
So, a seeded random number generator would be very welcome.
Jobe Makar
16 Jun 09 at 6:59 pm
Wow, lots of great comments, I definitely want some more low level data structures. Add finite state machine to the current running list. I also second the sound comments and would like to chime in with stereo / surround sound support. I have plans for my own robust collision system but that is certainly something most people can’t do on their own. With a real collision system you wouldn’t even need hitTest anymore, and just so you know if you are using it now you are setting yourself up for a world of hurt.
My big want is runtime render profiling so that we can optimize our projects, we can at least write our own data structures, but render profiling is something only Adobe can do.
Second would be MovieClip specific playback controls, you can just tell clips to play at x frames per second instead of having to handle different rates yourself (i.e. you animator designs something to play at 20 fps when the swf is set at 60 fps). Perhaps it is as simple as an extra parameter added to gotoAndPlay();
Stephen Calender
16 Jun 09 at 6:59 pm
More 3D support – Z-buffering and frustum clipping, 3d gouraud triangles
Ryan Speets
16 Jun 09 at 7:18 pm
No brainer: a real time 3D engine with *hardware acceleration*. Flash will never be a serious choice for game development until this happens.
Mitch
16 Jun 09 at 8:04 pm
Hi, Mike. For collision, why not buy and integrate Corey O’Neil’s Collision Detection Kit? It’s fantastic!
http://code.google.com/p/collisiondetectionkit/
Most of the agencies in Toronto use TweenMax instead of the built-in tweening class.
How about depth management for 3D objects?
http://www.untoldentertainment.com/blog/2008/11/26/flash-cs4-3d-depth-management/
Or – here’s a novel idea – how about you restore the usability of the timeline that was lost when AS3 came out? The timeline is a major time-saving device for games that’s been rendered unusable with CS3/CS4. You can no longer reliably target nested movie clips. You used to be able to have an animated avatar, and target the hair clip inside the head clip to change it to the player’s preferred hair piece. Can’t do that any longer without some major, hellish asspains. What’s the point? Make the timeline work again please. Give us an option to NOT execute code before clips are drawn to the stage and are usable through code.
- Ryan
Ryan Henson Creighton
16 Jun 09 at 8:39 pm
Hi Mike,
I’m totally agreeing with Steve Shipman. ES4 generic classes implementation would be totally awesome, and can allow us to implement some common data structures in a much more efficient way (using Vector internally, instead of Array (or even using the Alchemy pseudo-memory), and dealing with typed datas).
Also, multi-threading would be simply awesome for us too. Even something that’s not as deeply integrated in the language like in Java. Like a basic class with an addEventListener system to have callbacks when asynchronous execution ends, and run(f : Function) : void method to execute code on another thread. An acceptable limitation would be forbidding to access objects external to that thread during its execution (while allowing to deep-copy objects prior to thread start, and to return object in its completion event) – so it would remove the need for synchronization and prevent deadlocks.
API to access the Alchemy pseudo-memory, just like Haxe does.
Native support for OGG audio files. It’s really much more interesting than MP3 for games, as it loops painlessly, is lossless and allow more controls on compression.
Also, performances tools for optimization. Profiling datas on rendering times : how much time does the player spend to render something, how many things are rendered, and so on. Also, datas on internal input management. Currently, the simple action of rolling the mouse over a complex multi-objects scene is slowing the framerate by 20 to 50 percents. It’s probably because of the internal mouse-object collision detection and event queue, but it would be great for us to be able to see what the player is doing internally.
Devices support are more like an AIR feature to me. Also, specialized API like “physics” or “AI” aren’t something I’d like to see as native features – it’s way too specialized to be generic enough for all of us.
Thank you very much for this consideration of us Flash games developer. It’s much appreciated. :)
Samuel Loretan
DOFUS Team / Ankama
Samuel Loretan
16 Jun 09 at 11:54 pm
Implementing hitTestVisible() would be great, as would Iain’s suggestion for joypad support. If Unity can do it, then surely Adobe can add support in Flash? :)
Finally, hardware accelerated 3D.
iestyn
17 Jun 09 at 12:46 am
I think you should make a different version of Flash API that is just for making games. It should be something like Game Maker (http://www.yoyogames.com/make) or Multimedia Fusion (http://www.clickteam.com/eng/mmf2.php)
eichwulf
17 Jun 09 at 12:47 am
Seed based Random generator (joining Jobe Makar)
– Reason: Its useful for a lot of aims: Game development, wave based processing(audio/image/video/…), etc.
Generics for normal classes
– Reason: Generics in Vectors are already working – whats the deal in making them not available for anything else? Its a major performance boost.
A real, well working proxy
– Reason: flash.utils.Proxy is not only a real performance eater (recent tests showed me that using flash_proxy override nextIndex is about 150 times – not 150% – slower than if you use other ways of iterations) – its also not possible to act as real proxy to a class like
var proxy: MyClass = new MyProxy.();
this would be really useful to implement AOP, MockObjects and other things. If the methods to be called would still be comparable fast it would actually be even nicer.
Improved Browser integration
– Reason: Currently the browser integration sucks. Its by far not as bad as Java but still not happy about it.
– Detail:
*) Add support to read if the allowscriptaccess or allowfullscreen are set (this really sucks right now!)
*) Having a embed tag that registers as a new Stage(you heard me right) at another embed tag (master.swf), so they can be controlled by one enterframe (all redraw done synchroniously) to synchronize multiple flash pages would allow to make a lot better integration of flash within html content.
*) Adding the option to NOT hijack any browser input( mouse/keyboard disabled ). In this mode the flash would be like a image, taking no input whatsoever, including context menu, keyboard, mouse..
*) Add a title parameter to be read in image-mode for browsers to be able to display a title on hover
*) Support to optionally pass-through keyboard events to the browser like:
KeyBoard.interceptor = function( keys: Array ): Boolean
{
return !_textAreaHasFocus;
}
Why that hazzle? In many flex applications (full browser) its not possible to use ctrl+t for getting a new tab to be opened.
Real Custom Cursor support
– Reason: Hiding the system mouse and drawing a custom mouse always shows some delays. Having finally a simple possibility to really use system & custom cursors would improve the overall haptics of webpages and be good for the name of Flash as platform in general.
Thread support
– Reason: Doing background processing without the ability to use threads leads to strange – homemade – constructs that are not really performing well.
– Detail: Right now two flash scripts on the same page seem to work on the same thread(even though the enterframe seems not to be synchronized) meaning that they will slow each other down. Having the flashplayer to be actually able to execute them in seperate threads would allow the programmers (using SharedObject,ExternalInterface,…) to exchange the results might work very well.
Proper sound output processing API.
– Reason: computeSoundSpektrum is the single most buggy and peaky method in flash player.
Martin Heidegger
17 Jun 09 at 1:54 am
User initiated mouse lock. Pretty risky, as I can imagine banner ads tricking users into it, but perhaps with the esc key releasing again, it could be workable.
More mouse information presented natively – mouseMoveX, mouseMoveY, mouseAngle – all things I have to calculate in pretty much every game I make, and at the 90fps or so mouse move events fire at, it can be pretty expensive.
Since you mention the BitmapData collision test method, it’d be nice to have the return of your shape-to-shape hittest be a Rectangle. Not only does it let you know the size of the collision, but the vector from the centre of the rectangle to the centre of mass of the colliding object (if sufficiently regular eg. a circle) is exactly the normal of collision, which is obviously very handy. Without a native method of detection, I’d still have to run the BitmapData collision just to get this info out anyway, which seems kind of silly.
Tom-
Tom Vian
17 Jun 09 at 2:44 am
I wrote a pretty negative blog post about this last night, so rather than just be a typical arse and moan without contributing, here’s a quick mind dump ( Which will contain duplicates from other people I’m afraid, but if an idea’s good it does no harm to repeat it and pass it off as your own ;) ).
* Pixel perfect collision detection ( ie, weird shape against weird shape ).
* Joystick support.
* Being able to detect the hosts cpu speed so games can be scaled.
* Being able to use the right mouse button for something useful.
* Built in encryption to stop both the kiddie hi-score hacking, and people just stealing games and injecting their own ads / logos / crap.
* Better hardware rendering ( I’m not suggesting F11 should be on par with Unity, but rendering is a major bottle neck )
* Inline byte-code for when you want to get down and dirty
* A ( Sound ) mod player format, rather than having to use hacks.
* As already mentioned, as3 to find it’s love of timelines again. It shouldn’t be harder to target mc’s than it was before.
* Not really an API thing, but a hi-score table component would be a nice thing for all to see.
Phew.
Squize
17 Jun 09 at 3:00 am
Joystick!
mateus
17 Jun 09 at 3:21 am
Please don’t worry about APIs, throw all available brainpower at enabling hardware accelleration. :-)
The crucial issue is rendering performance.
Cheers, Dan
Dan
17 Jun 09 at 4:36 am
I’m sorry in advance if I come back more than once to post other ideas.
It would be nice to have a Browser class so that the player can listen to what the browser is doing.
ie. Browser.RESIZE, Browser.MINIMIZE, etc.
That way Flash can react to a browser resize without having to write an ExternalCommand back and forth.
Scott (@Endoplasmic)
17 Jun 09 at 6:34 am
1. I want to add a vote for seeded random numbers. Seems like it should be as simple as “Math.rand(12345)”.
2. 3d perlin noise
John from GR
17 Jun 09 at 6:36 am
Hi,
Definitely better performance and hardware acceleration so that you can add more stuff to your games.
Easier garbage collection (like a simple movieclip.remove that removes an object with all of its references from memory) so you don’t have to loose your time trying to find what event listener you forgot to remove and is causing a memory leak
Thanks
Zied Zrelli
17 Jun 09 at 7:21 am
Please have look on the greate Stephen Calender Blog Post about Obstacles for Flash Game Development
http://www.stephencalenderblog.com/?p=120
and yeah, Data Structure and a better sound API are very important issues, which have to be improved
Florian Weil
17 Jun 09 at 8:50 am
Can I be lazy and ask for a generic physics engine? A method that would allow me to input an angle, two material hardness factors, and a velocity in order to get a return velocity and angle for a bounce would be awesome and help budding developers.
Nils
17 Jun 09 at 9:29 am
#1 request: Collision Detection AND reaction. It is simple to detect a collision in a frame. But when objects are in motion tunneling is a serious problem.
A problem that requires calculus to solve.
And then once a collision is detected, determining the projection that will separate them is another huge headache.
So I would like to see collision detection and projection for convex rigid body polygons.
Zach Foley
17 Jun 09 at 10:58 am
#2 request: MML Music markup and editor.
Adding music and sound to a game is either hard (using existing MML tools) or huge (using mp3s)
I’d like to see a chip-tune synth added to the flash player. so that I could add lots and lots of music and sound in just 1 or 2 k.
Infact – it could make flash a whole new platform for MUSICAL expression on the web, but let’s not get too distracted from games :-)
Zach Foley
17 Jun 09 at 11:02 am
There are lots of great ideas here regarding multi-touch, hit tests, device support, data structures, better audio support, etc. I’d like to add my 2 cents for MIDI support, including reading MIDI files and playing to MIDI devices. Then Flash developers can deal with symbolic sound files, not just audio-based files, which opens up more interactive possibilities.
Michael
17 Jun 09 at 11:14 am
My requests (I’ll try to keep these to APIs rather than a generic wishlist):
1. Another vote for a seeded deterministic random function.
2. Bitmap masking, e.g., the ability to copy a bitmap with alpha onto another bitmap while preserving the transparent sections of the target bitmap.
3. removeAllChildren(). Not hard to do manually, but is there a reason this doesn’t exist?
4. A version of sharedobject that does not flush unless told to do so.
5. More bitmap functions and filters. Let Adobe figure out what bitmap manipulation functions can be done quickly and cross platform and developers will figure out how to turn these into cool game effects.
Kevin
17 Jun 09 at 11:19 am
Totally agree with Tom Vian – mouse locking would be incredibly useful.
Also – a lot of people in the forums ask about calculating angle and distance – could we get the other half of Point.polar please?
Rob
17 Jun 09 at 1:10 pm
Just a thought, apologies for not being directly API related – some flavour of Flash Media Server targeting Gaming might go a long way, especially as this might allow a more whole approach to resolving flash game security issues (perhaps similarly to how vid streaming security and DRM issues have been approached), as well as perhaps making some multiplayer options a little easier to achieve.
John Thomas
17 Jun 09 at 7:10 pm
One single feature that immediately strikes me – is better destroy mechanisms.
I would like to see a better mechanism for controlling events, timers and anything else that results in objects not being properly garbage collected.
I would like to see a recursive function for the MovieClip class, that would allow the ability to recursively stop that MovieClip, along with all children MovieClips and so on. Perhaps this could be a parameter inside the stop() function.
A nice bonus to this would be a method on the MovieClip or Sprite that would furthermore – disable any timeline code, as this tends to lead to the object hanging on and thus – not getting properly garbaged collected.
Steven Hargrove
17 Jun 09 at 9:24 pm
I think some handy data structures for games would be nice, like Nate Chatellier mentioned. Also the I found Grant Skinner’s Proximity Manager really useful:
http://www.gskinner.com/blog/archives/2008/01/proximitymanage.html
George Profenza
18 Jun 09 at 3:05 am
I just thought it would be neat to extend the removeAllChildren() idea with being able to pass in a parameter for type:
.removeAllChildren(Cards) for example, so it’ll axe the things you want instead of having to do if(child is Cards){ }
Scott (@Endoplasmic)
18 Jun 09 at 10:59 am
@Zach
Do you know the MML Library from Libspark?
http://www.libspark.org/wiki/keim/SiON_e
Martin Heidegger
18 Jun 09 at 1:23 pm
Hi Mike
Definitely performance and memory issues are important.
I dont kown how the gc runs,but when memory usage is 500M-1024M , gc triggers more often, basicaly this is right,but when gc triggers it slow down FPS,when it triggers more often,frame skips.
Proper contraol over gc is very necessary.
Like
System.setGCblablabala(minTrigerMemory,minTriggerFrequency)
System.gc(minTriggerFrequency:int)
Threading&Time
TimerEvent and EnterframeEvent depend hevaily on FPS.
When we set FPS to 10 ,we will never get the accuracy control of time,eg 50ms .If we need more accuracy , we have to set higher fps,the more cpu usage
One more green thread is very nice for independent interval.
Midi file and midi device support
Ray
18 Jun 09 at 5:55 pm
-a class to recicle items, like that one:
http://lab.polygonal.de/2008/06/18/using-object-pools/
-3d hardware acceleration.
nkner
19 Jun 09 at 6:53 am
I’d really like to see a pixel-perfect hit test, too.
But for something simple, Cheezeworld’s Input Manager would really make getting keyboard input easier!
http://code.google.com/p/cheezeworld/downloads/list
Scarybug
19 Jun 09 at 10:41 am
I would love to see a way to modify the same property of a collection of display objects without needing to iterate over an array / object pool.
Bitmap scroll with automatic wrapping across all edges.
Better input handlers. Almost every game out there needs to write its own Keyboard handler for example (or use something like KeyPoll). There should be native ways to determine key press without the need for events and state changing. An extended mouse class able to report things like acceleration, click counts/timers, gestures.
Loads more data types required (linked lists, please)
Native physics engine would be very useful.
Native particle system.
Collision, collision, collision! AABB-AABB Intersection, Object Bounding Sphere, Point Sets, rotated AABB, sphere-sphere intersection, bounding spheres, OBB (intersection, fitting, etc), Cloest Point, point to line/AABB/OBB/triangle/two lines, etc! Full primitive testing, line/ray intersection, segments, spatial partitioning (grids, linked lists, hashed storage, octree, quadtree, k-d tree), BSP tree support (node storing / lead storing / solid leaf)
Hell I’ll even vote for GPU collision assistance :)
Richard Davey
19 Jun 09 at 2:23 pm
KeyDown events for modifier keys (ctrl, alt, etc), and mousewheel support for mac.
Rob
19 Jun 09 at 5:57 pm
Multitouch API, that’s definitely what I miss the most at this moment :( Everything else can be replicated in one way or another…
Philip Seyfi
21 Jun 09 at 3:36 am
For games: Speed. Improve the runtime engine, and the compiler to simply get us more speed, without having to jump through hoops to get it. Also, add the hoops so we can jump through them when we need to (more low level types, an option to lock a class down more, so we can shed some of the dynamic language overhead – absolutely add more dynamic language features back! but not necessarily for games).
Also, traditional 3D pipeline support (OpenGL ES will do for now), but also more access to raw GPU power (PixelBender on the GPU, etc.), to allow for all sorts of non-traditional rendering. :-)
An iPhone target (and better smartphone support in general – not Flash Lite) – I don’t mean in Safari, but would love to be able to compile my Actionscript 3.0 code to run on the iPhone as a native app instead of using an embedded Flash Player – gamehaxe is working on something similar.
Kevin Newman
22 Jun 09 at 9:35 am
BTW, for GPU support in Flash, you could make it so the user is presented with a warning, explaining why a certain flash site, or AIR app might not run well (not enough GPU to run this site – the wording can be worked on).
Restricting some of the advanced stuff (like GPU support) to AIR would be ok IMO (others may differ).
Kevin Newman
22 Jun 09 at 9:39 am
Yep, GPU acceleration and OpenGL/DirectX support would be really great. Just look at the Unity3D for an example – this should have been possible in Flash for some time already but for some reason it still isn’t :(
Proper support for Singletons would also be nice and any performance improvement are welcome as there’s never enough processing power when it comes to games ^^
Philip Seyfi
23 Jun 09 at 11:02 am
Most of what is being asked has a workaround and most amazingly fast; also you can get the flavor that fits you the most…
but I havn’t been able to hack my way to support, multitouch and pen pressure sensitivity at runtime.
More low level data structures.
Better sound management: i would be nice you coul put sounds in the timeline and assign an instance name to it just like MovieClips, at least as a simple component.
I wouldn’t like GPU support, flash has to be ubiquitous, so Mike, focus your attention on being implemented on mobile phones, not jut NOKIA with flash lite, Flash is fun while everyone can use it, I’d love to be able to continue playing a game I was playing home, on my mobile… GPU support would only make less people enjoy this so far fabulous technology. Ubiquity makes flash what it is today, please don’t forget that… But AIR could support GPU.
Agustin
23 Jun 09 at 3:55 pm
oh! and asynchronous processing, for some heavy processes…
and when I say Mike, I mean Adobe people, I know you don’t negotiate with Apple for Flash support on the iPhone :p
Agustin
23 Jun 09 at 3:59 pm
- Multi threading
Not just for games – I’m working an AIR application that screams for this! Many computers now have multicore processors, and this really is a great method to get huge speed gains.
- Template’s
Like in C++ etc, the ability to template a class to work with another, with the associated speed gains.
- Inline functions
A minor change to the compiler (including the code before compile, rather then the function overhead during runtime). Another small improvement that could give us more performance.
- Ability to include MXML files in each other
For applications, I’d like to keep my MXML gui (generated in an another AIR app) in it’s own file. I’d like to able to have a simple import statement to bring my MXML from the GUI file into my main one.
- Conditional Compiling
Another small change that doesn’t require significant change to the compiler. I’d like to be able to include or exclude parts of my code depending on user defined flags. Would be extremely useful for debug vs production code, flex / flash / air targeting etc. Even simple scripting like POV Ray has huge benefits from this, and it would (again) let us improve performance by setting a flag to compile a production version vs a debug one.
- Display object depth sorting
The ability to sort display objects by depth (o a similar property) would take a huge amount of complexity out of working with the display system. (I may be too late on this one, as I haven’t studied the changes for Flash 10’s display options)
- Ability to get shape information from a vector drawing
Adding my vote! This was mentioned earlier, and it would avoid duplicating shape information for collision detection methods.
- Deconstructors
That could give us the ability to dispose of an object and have it clean up after itself.
- Data structures
As above!
- (Dreaming here) Something like pixel blender / alchemy that can compile CUDA code…
All the power a GPU offers for AI, pathfinding and other fun things would be amazing to access in flash development! Most games don’t expect 3D graphics, yet the ability to use that power for other things, or to have the GPU used for transitions and effects would be simply amazing.
Oh and Flex Builder for linux :)
Paul O'Reilly
24 Jun 09 at 1:15 am
Oh yea….
Let AIR applications call native applications!
(Security? Give a dialog “AIR application wants to access x. Do you want to allow this [Never] [Just this once] [Always])
If AIR can do this, then one of many great idea’s is that many linux developers (myself included) can work on a flex builder replacement (in AIR) targeted towards flex like development… all that energy going into nagging Adobe could be turned towards building free tools to complement Adobe’s existing ones… we just near AIR to be a little more useful and able to call the Flex SDK and other programs :)
(There’s a lot of interesting idea’s that can work in with this, and complement Adobe’s intentions for an integrated work-flow which is creating the current roadblock for linux… it wouldn’t take much to encourage developing these tools, and if fireworks, photoshop, flash builder and CS4 can communicate via IP, any AIR tools can benefit all platforms and work-flows, and provide an amazing ROI)
Paul O'Reilly
24 Jun 09 at 1:24 am
I haven’t read all of the comments above, so maybe some redundancy.
Data Structures (already mentioned, but important) and
Generics (I would like to see something like C# System.Collection.Generics)
Hardware-acceleration is a must, at least for PixelBender. My biggest problem is that i have PixelBender and cannot use it to do some nice post-processing. Because of the lack of support for graphicdevices, the size of the viewport has to be set to a very small size to keep framerates high enough.
I think Unity demonstrates how to do a hardware-acclerated plugin in browser.
Hannes Moser
25 Jun 09 at 3:56 am
Forgot something, Conditional Compiling(f.e. easier debugging, inline, etc.), Multi-Threading(if this is available i think you can work around a lot of performance issues, look at XNA –> XBOX threads, managed and limited but ok).
Hannes Moser
25 Jun 09 at 4:00 am
Great article, Mike. I’m really glad that Adobe is starting to dial into games.
I wrote a response at http://coderhump.com/archives/461 talking about how I hope Adobe approaches game support on Flash. I differ from a lot of people posting here in my priorities, I think. :)
Ben Garney
25 Jun 09 at 11:47 am
AS3 API into smart phones so we can access GPS, the phone’s functions, etc.
Joel Fiser
27 Jun 09 at 9:12 am
particle emission, 3DControl,easy-mass-collision detection,z-buffering… this are the few i would like to see in new AS3 API.
manoj sahu
28 Jun 09 at 2:05 am
My top ten (though not all are strictly API requests):
1. Right mouse button.
2. Hardware accelerated 2D sprite engine.
3. Hardware accelerated particle engine.
4. JIT performance improvements.
5. Fast 2D collision detection.
6. Joystick/gamepad support.
7. Multi-threading
8. Better/easier browser integration.
9. Built in custom mouse pointer support.
10. Quality, deterministic pseudo-random number generator.
All of this is for 2D games, obviously, but that’s where I plan to spend my time for the next couple projects, anyway.
Sindisil
7 Jul 09 at 2:13 pm
Device support (joypads, USB controllers, Wiimote, etc) definately my no.1.
Wayne
10 Jul 09 at 3:04 am
SPEED SPEED and SPEED Please! and
MEMORY MEMORY and MEMORY MANAGEMENT Please!
..and well, in order:
-full hardware rendering
-multithreading
-3D support(z-buffering,dae,shaders and etc…let flash marry shockvawe..or unity3d..or java..or google native…whatever it make it 3d!.
-choice of laguage(something like built in Alchemy or C# VB in .NET)
-HTML,JS,CSS as in AIR
-physics (2D and 3D)
-function overloading
-multiple inheritance
-IDisplayObject
-built-in MVC Model (just look at PureMVC and Fabrication..such a beauty)
-multitouch
-Sound…wanna make some noise
-lower level data/memory access (I seen HAXE and Alchemy beat AS3 in performance… …WTF?!)
there are plenty more but all of them been already requested so those one are most interesting from my point of view.
just hope that FP11 will be real step forward. FP10 is not “bad” but I just expected more.
Pavel
10 Jul 09 at 5:08 pm
@Ben Garney – High lord of flash games, I agree to everything in his post.
A lot of good ideas here, a lot has been achieved already in the open source community so to be realistic I don’t see how Adobe and why it should consume these. Glazing over the above I immediately thought why?
The real issue is generating revenue for flash games, it is at a stage where all I could see above can be achieve through better development and support to the community. The IDE’s need a strong slap, flex as a frame work is RIA not games, Flash CS4 is graphical/timeline campaign animations not real development. Isn’t it obvious when all high end developers don’t use your products (well except for Flex Builder).
I think API’s can be (if not already) always supplied by the community, strong support to develop efficiently through better IDE (I am scare to think flash builder4 in its current form won’t revolutionise things but I wait to Flash Builder 5).
And finally back to revenue, we really need flash player 10 to work on phones, at least try to simulate the iPhone scourge.
I am sorry that I haven’t answered your question.
Elliot Rock
12 Jul 09 at 11:35 pm
And I add better AIR integration like Paul O’Reily’s comments (if I could get CS4 or Flex to compile to AIR)
Elliot Rock
12 Jul 09 at 11:38 pm
A Gamepad API that allows us to read button presses as well as giving us a Point reading that corresponds to the X and Y coordinates on the analog stick.
Estevan Galvez
15 Jul 09 at 8:56 pm
even though they’re not all API-specific:
SPEED! via better game loop mechanism. similar to win32 use of PeekMessage instead of GetMessage. ENTER_FRAME and Timer class are WAY TOO slow for any real game dev.
better pass by reference scheme like, ya know.. pointers.
hardware acceleration (screen modes/back buffering)
signed/unsigned char TYPES. puuuleeze! i love two’s compilment math and all, but…
preprocessors: #define, #ifdef, etc.
ENUMS!!!!!!
i’ll stop there. but above all, anything related to better speed would be my pick.
kona
26 Jul 09 at 2:10 am
Hi Mike,
It’s more of a core thing than just for games, and probably too expensive to put in the flash player for everybody as they currently charge per user, but it would be a huge benefit for game logic as well as special effects, to have the api for this tool available as an Alchemy module.
http://www.orbaz.com/products/particleflow/
It’s a brilliant api. The interface is great too, but the api would provide a serious core value.
Thanks for asking.
-Cort
Cort
29 Jul 09 at 1:45 pm
Though it’s not an API request, I should note that Flash, to reach next level of gaming, needs mouse cursor exclusivity option.
I’m aware of many reasons of why there is none now, but something like a Flash Player pop-up asking to enable that by user permission would imho be a good compromise.
If Flash games are heading 3D, there oughta be support for this.
I mean, FPS or space sim with having to hold left mouse button all the time? Bloody carpal…
Pericius
5 Aug 09 at 1:56 am
-What about being able to control nested movieclips before they throw an event in AS3 as it was possible since flash 4 or 5?
-What about being able to load and unload and control swfs without having to worry about them not getting propperly removed from memory as it is the case now with your sucky Java copy Garbage Collector? (You should generally stop copying each and everything from Java without thinking about usability propperly; hooray, we cloned the GC to avoid circular references problem but in return apps now run way more regularly into memory leakage issues, wicked)
-i understand that with a plugin technology you´re worried about any security concern that is brought up, but seriously, its no good idea at all to limit cross domain asset loading and handling to the degree you did with the security sandbox updates in the past few years, meanwhile without workarounds flash is more limited in loading and handling media cross domains than a html 1 gen browser
(awesome, i can use draw on a bitmap without restrictions when i set up policy files and proxy type stuff)
-What about propper compiled swfs that aren´t that easily decompiled?
-What about propper 3d api stuff that doesn´t use cheap tricks like the stuff you introduced now which turns the things into sorta jaggy bitmaps?
-What about propper hardware acceleration for all graphical operations so the content runs in acceptable performance compared to most other technologies out there on a mediocre system?
-What about supporting all newer api features in AS1 and 2,too, not just AS3?
-What about compiling AS1, 2 and 3 down to machine closer code so they all can run in same higher than now performance?
-What about the option of writing #pragma strict in an AS1/ 2 AS file so one can enable type checking just for that file
(last few would ease in people getting into AS3 and also allow people to use flash who just plain aren´t into using your java copy AS3 as otherwise, you know, they could aswell use java or other things that perform way better than flash anyway).
You guys let the community wait for ages for the propper things they ask for like some of these mentioned here and then come out with crappy 3d functionality when the community has already done papervision and away 3d or now crappy collision detection features when the community has again already moved on and ported box2D or you come up with pseudo hardware acceleration which is a joke when the community is already moving on to use unity3d.
When will you guys wake up and stop swallowing your own hype is reality pills?
tomsamson
5 Aug 09 at 2:05 am
I agree with a lot of what Tom is saying here above.
Also, bring back the fun in making games with flash.
I haven´t made a single game “just for fun” since as3 was introduced. The reason? Cause it´s NOT fun anymore… for obvious reasons…
oos
10 Aug 09 at 1:01 am
Code Editing:
The Flash code editor way been that of its rivals and most coders use other code editors. When I download Visual Basic it comes with everything, autocompletion especially. Why is Flash still a toy and not a real professional tool for coders?
Memory Management:
It is incredibly hard to keep track of memory and thus things get left in memory and you have no idea what is going on. BitmapData.dispose which releases the BitmapData memory is greta example of what we need for all items. When I have finished with a MovieClip I want to kill it completely and remove all memory it has allocated even if there are events left on it.
Audio mananement:
Audio layers allowing different layers of sound and thus control. If the structure was Layer->Channel->Sound then you could apply more control i.e. stop layer. Also an audio pause and resume, most games need to pause at some point and thus need to pause the audio.
Keyboard management:
The keyboard is a biggy, I have a very large API to handle keypresses, from storing different states on every key, i.e. Released, Pressed, Down, Flags (Shift/Control/Alt). e.g. the Release flag can be tested at any time after the event occured. Keypresses in games are not usually trapped on an event but when the process of the game happens I would like to see a key test, i.e. if (KeyPressed(“A”)) { do something; ClearKey(); }
Geometry:
Line intersections, Circle intersection, Point to line – etc.
Classes for all shape primitives, Line, Circle, Rectangle ( this is there in part)
Collision:
Bitmap to Bitmap collision – line to bitmap etc. MovieClip to MovieClip collision. How do these in intersect? etc. It is all possible but it is incredibly slow.
Flash has one big disadvantage over other programming tools in that it is slow and there is a reason for that. So the APIs need to be more extensive in order to retain speed. Shadez 2 has to really get rid of the way I used to think of Flash, no movieclips, no hit tests as they bring it to its knees, no class allocation (i.e Point) way too slow, precompiled tables for Sin/Cos again way too slow, Sqrt slow, no Number to int conversions slow… all of these functions should not be as slow as they are.
I think the big one is the environment, it reminds of coding in the 80’s.
Other than that I love writing games in Flash, it just a shame that such things are are non-existant.
Sean Cooper
http://twitter.com/seantcooper
Sean Cooper
15 Aug 09 at 4:25 am
AS3 needs native support for physical units in the Number class. e.g.
“55 miles per hour” * “3 seconds” = “74 feet”.
This is helpful for any kind of simulation. Checking units is a great way to catch math errors.
It would be fairly easy to add, and open-source examples exist:
For Python, there’s the “magnitude” library,
Ruby has “Stick”, and
Java has “unit”.
Magnitude seems to have a good paradigm.
Jeremy
20 Sep 09 at 4:31 pm
hardware accelerated drawTriangles and drawGraphicsData
better memory profiling
faster build times for large projects and better ways to manage assets.
automatic imports of classes when loading swfs.
Andre Spierings
3 Nov 09 at 9:49 pm
For Adobe Flash to forever silence the gaming platform competition it need only include 3 things
1) multithreading
2) memory management
3) A sweet gaming-specific IDE. Better than Director. Like Unity.
WRITE THESE ON ALL THE WALLS IN THE SAN JOSE HQ!!!!!!
cameron
5 Nov 09 at 5:23 pm
First off, I’m very glad you’re looking at improving game development in Flash! The whole iPhone thing is very appreciated as well!
1. If you have a bunch of blue balls and a bunch of red balls I’d like to be able to say “if a blue ball hits a red ball this happens”, but that’s sorta difficult when you have to use instance names and pathways.
2. I’d like the built in 3D to take care of the stacking order for me, instead of expecting me to be a super genius at coding.
I would REALLY like that first one you suggested also, having two movieclips hitTest with full accuracy.
There you go, and thanks for reading. :)
Lee Comstock
18 Nov 09 at 6:52 pm
Right Click event listener!
A SMALL run-time compiler(allows a user to input basic commands into a textfield and it runs them!)
When running through the Display list, also skip over alpha=0 values in addition to the visible = 0 clips.
UnknownGuardian
19 Nov 09 at 9:08 pm
It would be REALLY nice to have following features in Flash:
- Detect from within Flash is fullScreen allowed (this can be workaround-ed with try – catch)
- Control(disable!) browser scrolling on mouseWheel (when mouse is over flash) event from flash, so we can use these events more often
- Native collision detection (not only for bounds)
- simpler pixel bender integration
esmin
19 Feb 10 at 3:55 pm