Adobe Flash

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

Post Reply
User avatar
Web
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 30
Joined: Sat Mar 12, 2011 11:53 pm
Current Project: somewhat tinkering on my own game
Favorite Gaming Platforms: Snes, Sega saturn, Nes, Sega cd, Sega dreamcast
Programming Language of Choice: C++, Sdl
Location: Saint marys, West Virgina
Contact:

Adobe Flash

Post by Web »

Thinking about maybe making a switch over to adobe flash, it has everything i need right in one package for developing games. You can either make them standalone or browser based, I know i wont get the performance and flexibility that comes with C++ though, but they can be cross platform. I have stumbled on flash's new API called "molehill" which is designed to make flash into a full immersive 3d environment. Here are some demo's

http://www.youtube.com/watch?v=WdUV-8b8wQ4
http://www.youtube.com/watch?v=szaXvTsoeVs
http://www.youtube.com/watch?v=usL0wTAbQig

thoughts?
Pinky are you pondering what im pondering?
I think so Brain but where is the ‘any’ key?”
ImageImage
ImageImage
ImageImage
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Adobe Flash

Post by k1net1k »

This is my area of expertise. if you have any questions let me know :)

I played around with the native 3d in flash since FP10 and this is all software rendered on the CPU. molehill looks pretty awesome. being able to access 'low level' api's for 3d content is awesome. i look forward to this new challenge, and the next year which will be one of the biggest changes to social gaming in recent times.

sadly whilst the gpu can do shaders and stuff like that, code execution for other parts of game engines is still slower (up to 4x slower) than native code, as flash still relies on garbage collector to clean up after itself. things like pathfinding, ai, etc are still done on the cpu.

This thing called AGAL (Adobe Graphics Assembly Language) looks pretty complicated. for vertex shaders and pixel shaders. maybe someone familiar with shaders in other environments would have more of an idea if this is normal/different/retarded

Code: Select all

//vertex shader
m44 op, va0, vc0 // pos to clipspace
mov v0, va1 // copy uv
for some more demo's of new molehill 3d api, check this out.
http://blog.theflashblog.com/?p=2607

make sure you install the flash player 11 beta player from here first
http://labs.adobe.com/downloads/flashpl ... bator.html

Edit: also have a look at Alchemy. it allows you to port c++ code to flash and get similar performance.

edit2: im waiting for some of the 3rd party libraries to see how they handle some of this lower level stuff, and hope that they surface a nicer api to use. from my understanding, they will be similar to how they were in FP10 but much more powerful.
Flare3d
Alternativa
away3d

edit3: also, make sure you use wmode=direct to ensure GPU rendering. otherwise it will fallback to software rendered.

edit4: keep in mind you can also develop ('open source') using an editor like flashdevelop or eclipse, and the flex sdk. this would be good for those not wanting to shell out $1000's for adobe software, and frankly an inferior code editor.

you can also publish to a lot of devices and platforms like
win/mac/linux in the browser
win/mac air packager
iphone/ipad iOS packager in Flash CS5
android packager
blackberry playbook
google tv

also, the newest version of flash will support gaming devices like logitech steering wheels, xbox360 usb controllers. dolby surround !

obviously the performance isnt the same as in natively coded apps, but for a lot of games it works well.
see: http://www.youtube.com/watch?v=5rp7UNCWbyc as an example
User avatar
Web
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 30
Joined: Sat Mar 12, 2011 11:53 pm
Current Project: somewhat tinkering on my own game
Favorite Gaming Platforms: Snes, Sega saturn, Nes, Sega cd, Sega dreamcast
Programming Language of Choice: C++, Sdl
Location: Saint marys, West Virgina
Contact:

Re: Adobe Flash

Post by Web »

Thanks for the reply... back a few years ago when i was playing around with flash i found this program called swift 3d... it basically looked like Maya for flash... i still want to continue learning c++ though and i've seen you can do OOP with classes in a round about way in flash.
Pinky are you pondering what im pondering?
I think so Brain but where is the ‘any’ key?”
ImageImage
ImageImage
ImageImage
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Adobe Flash

Post by k1net1k »

also, unity is making a flash exporter.
User avatar
MrDeathNote
ES Beta Backer
ES Beta Backer
Posts: 594
Joined: Sun Oct 11, 2009 9:57 am
Current Project: cocos2d-x project
Favorite Gaming Platforms: SNES, Sega Megadrive, XBox 360
Programming Language of Choice: C/++
Location: Belfast, Ireland
Contact:

Re: Adobe Flash

Post by MrDeathNote »

Web wrote: i've seen you can do OOP with classes in a round about way in flash.
It's pretty much like the OOP you can implement with javascript and honestly it's barely worth it. It's pseudo OOP, the "inheritance" mechanism may be the ugliest thing I've ever seen. I have inheritance in quotes because it's not REALLY inheritance. There are a few schools of thought in this area and a few ways of implementing these pseudo objects. You could read some of the articles by John Resig and a few others. I'm of the opinion that if you need objects in javascript then that's probably the least of your worries but they may be useful for games, i'm not a flash expert and I haven't used it in a few years so k1net1k might be able to tell you more.
http://www.youtube.com/user/MrDeathNote1988

Image
Image

"C makes it easy to shoot yourself in the foot. C++ makes it
harder, but when you do, it blows away your whole leg." - Bjarne Stroustrup
User avatar
k1net1k
Chaos Rift Maniac
Chaos Rift Maniac
Posts: 563
Joined: Sun Nov 07, 2010 2:58 pm
Contact:

Re: Adobe Flash

Post by k1net1k »

i dont know enough to compare properly or give you 'programmer speak'. if it means scope and things declared one level of brackets before the indent, then yes. if it means class car extends class vehicle, then yes it does. thats my lame way of understanding it.

lol listen to me professing to be an expert then 3 post later i have no idea how to answer a very simple question :)
User avatar
christo
Chaos Rift Cool Newbie
Chaos Rift Cool Newbie
Posts: 59
Joined: Sat Apr 24, 2010 7:28 am
Favorite Gaming Platforms: iPhone, PS3
Programming Language of Choice: c, java, groovy
Contact:

Re: Adobe Flash

Post by christo »

You can definitely do OOP in Flash, or ActionScript (AS) as the language is called. It's actually a dialect of JavaScript, both being implementations of ECMAScript (the standard name of the language) and they vary so little from each other that, for the purposes of this discussion they're the same.

The thing to remember about OO in Flash AS is that it uses Prototype-based inheritance. I think this is more flexible and more powerful than class-based inheritance. If you have never used prototype-based inheritance you will find it quite foreign.

The problem with the OO discussions I see as people learn it is that people seem to equate OO with inheritance. This is a very out-of-date idea but it is sometimes still promoted in universities.

The idea of inheritance being the primary method separating shared and distinct "state and behaviour" is like the idea of ice cream being your primary food. Ice cream IS food, and it might be yummy and it might stop you from starving to death, but if all you know of food is ice cream, you're missing out on a lot. You're missing out on the best stuff.

Firstly the most frequently discussed idea of inheritance on this forum is only one kind of inheritance, implementation inheritance. Another kind is interface inheritance which is more flexible and more powerful.

And secondly, Flash AS did not originally use classes to define inheritance relationships. The inheritance is dynamically determined based on the runtime prototype relationships amongst the objects. If this sounds fancy, all it means is that instead of having default code that runs in the superclass unless overridden by a subclass, "super" is called "prototype" and it can be changed on a per-object basis by the running code.

This idea is extremely powerful. It's a large part of the power of dynamic systems like Smalltalk and I think the origin of this distinction is actually found in Simula. These languages and concepts are decades older than C++.

Flash's language, ActionScript which is really JavaScript was designed by Eich at Netscape in the 90s and one of the main influencers of this language was Self, an incredible dynamic language with prototype-based inheritance which also influenced the design of Lua.

Now having said that, since ActionScript 2.0, classes and interfaces have been added to the language, so you do get ice cream as well.

So the bottom line, you can definitely do OO in Flash. Just don't expect much help for doing so from Flash for Dummies. In fact you might learn a lot more by learning about JavaScript here
User avatar
Web
Chaos Rift Newbie
Chaos Rift Newbie
Posts: 30
Joined: Sat Mar 12, 2011 11:53 pm
Current Project: somewhat tinkering on my own game
Favorite Gaming Platforms: Snes, Sega saturn, Nes, Sega cd, Sega dreamcast
Programming Language of Choice: C++, Sdl
Location: Saint marys, West Virgina
Contact:

Re: Adobe Flash

Post by Web »

I started messing with Flash on and off since it was Macromedia Flash 5, the main reason was for animation... i found out back then that John Krisfaluci - the creator of Ren and Stimpy - was using this program to create 'webisodes' Actually he's still using it, his most recent ones that i know of is two music videos, one for Tenacious D and one for Bjork. Also on the plus side apparently now flash is going to have support for devices such as steering wheels and gamepads without the need for 3rd party.
Pinky are you pondering what im pondering?
I think so Brain but where is the ‘any’ key?”
ImageImage
ImageImage
ImageImage
Post Reply