Be a Supporter!
MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Why AS is unused? Feb. 2nd, 2013 @ 11:29 AM Reply

Hello everyone! I have one question and i think you now what. Why a lot of game developers (i tell about PC and console game developers) don't use AS3? Super meat boy was written on C++, Castle crashers - C++. Grafics were drawing in Flash and why programmers didn't use AS3? Because AS3 is very stupid or uneffective? Who can give me answer? If i want create game on console i must learn c++ for example and forgot about AS3? (i tell this because i found a lot of lessons for creating games on AS3 and it will be very sad if it can't help me with my education) Please help me.

Sam
Sam
  • Member since: Oct. 1, 2005
  • Offline.
Forum Stats
Moderator
Level 19
Programmer
Response to Why AS is unused? Feb. 2nd, 2013 @ 03:41 PM Reply

At 2/2/13 11:29 AM, MantisSuperior wrote: Hello everyone! I have one question and i think you now what. Why a lot of game developers (i tell about PC and console game developers) don't use AS3? Super meat boy was written on C++, Castle crashers - C++. Grafics were drawing in Flash and why programmers didn't use AS3? Because AS3 is very stupid or uneffective? Who can give me answer? If i want create game on console i must learn c++ for example and forgot about AS3? (i tell this because i found a lot of lessons for creating games on AS3 and it will be very sad if it can't help me with my education) Please help me.

Performance, hardware access and distribution ease, most likely. As far as I'm aware, Castle Crashers was originally created using AS2 and then parsed as C# for distribution on XBLA (If only it was as easy as that sentence was to write).

AS3 is a great language (and more often than not a good development environment) for prototyping ideas. In addition, learning a language is never a bad thing and will only further help you as a programmer.

If you want to create games for consoles you have to abide by what can actually run on them.

MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 3rd, 2013 @ 04:13 AM Reply

Thank for your answer. I think, if all game developers use C lenguage for their console games then AS3 don't work on this platform. I must study C# or C++. Who now some books or tutorials for C++ or C# game programming? And how i can use flash for painting and animation without AS? Maybe other animation program?

CJBIG
CJBIG
  • Member since: Jun. 27, 2005
  • Offline.
Forum Stats
Member
Level 03
Animator
Response to Why AS is unused? Feb. 3rd, 2013 @ 10:18 PM Reply

At 2/3/13 04:13 AM, MantisSuperior wrote: Thank for your answer. I think, if all game developers use C lenguage for their console games then AS3 don't work on this platform. I must study C# or C++. Who now some books or tutorials for C++ or C# game programming? And how i can use flash for painting and animation without AS? Maybe other animation program?

C++ is used mostly for engine development, maintenace and adding on to existing code. You would however be on the right track by learning C# and it will be easier if you do already have an understanding of AS.


"We are not stones to endure the rain and snow. We are people."

MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 4th, 2013 @ 07:15 AM Reply

...but other programmers use C++. For example Terraria creator have been writing terraria on c#, but now he's writing a new game Starbound on c++. Why7

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Why AS is unused? Feb. 4th, 2013 @ 12:42 PM Reply

You learn programming, not a programming language.

At 2/4/13 07:15 AM, MantisSuperior wrote: ...but other programmers use C++. For example Terraria creator have been writing terraria on c#, but now he's writing a new game Starbound on c++. Why7

Why don't you ask him?

kiwi-kiwi
kiwi-kiwi
  • Member since: Mar. 6, 2009
  • Offline.
Forum Stats
Member
Level 09
Programmer
Response to Why AS is unused? Feb. 4th, 2013 @ 01:46 PM Reply

At 2/4/13 07:15 AM, MantisSuperior wrote: ...but other programmers use C++. For example Terraria creator have been writing terraria on c#, but now he's writing a new game Starbound on c++. Why7

good question, the only thing c++ adds to the table that other languages don't have is better platform integration, if you don't mind writing the same platform specific code for every platform you support.

Most likely they want to write some graphically intensive game where you want those 1000 draw calls to run as fast as possible, so the time you spend going through all the abstraction layers needed to call opengl functions from a managed platform actually matters, or well, that's what they probably think anyway.

MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 5th, 2013 @ 08:30 AM Reply

Please, could you tell me, what advantages and disadvantages for developing games in С++ and C#? Why Castle Crashers develop with C# and Super Meat Boy with C++? Or it isn't important and i can write games on anyone languages?

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to Why AS is unused? Feb. 5th, 2013 @ 11:22 AM Reply

For 3D games, the Flash platform is really uneffective. Requires a lot of work (you need to build your own engine) for bad performance and it doesn't run on most hardware.

For 2D games, those games were written in C++ or C# because they're made for XBox. It's not uncommon to write 2D games for PC in ActionScript. Machinarium for example, uses Flash.

MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 6th, 2013 @ 06:45 AM Reply

How i can create animation and sprite in flash when i write on C#? Flash animations work with C#?

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to Why AS is unused? Feb. 6th, 2013 @ 04:15 PM Reply

At 2/6/13 06:45 AM, MantisSuperior wrote: How i can create animation and sprite in flash when i write on C#? Flash animations work with C#?

Flash animations work with anything, as long as you export and import them properly.

Here's the steps to exporting Flash animations to Unity for example:
http://www.reddit.com/r/Unity3D/comments/17tuzq/unity3d_2d_g ame_timelapse_boom_bears_made_in_30/c89382k

MantisSuperior
MantisSuperior
  • Member since: Feb. 2, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 8th, 2013 @ 05:28 AM Reply

Thank you all for your help

Awoken
Awoken
  • Member since: Feb. 9, 2013
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to Why AS is unused? Feb. 18th, 2013 @ 12:41 PM Reply

Just addin my own 2 cents here. I like AS3 because it is extremely easy to program. I find it much more intuitive than VB. Flash in my opinion is a great piece of software to experiment with small scale projects and test some algorithms and such. It's my prefered language.

Now that being said, I haven't made the leap over to C or any of the other more powerful languages because they intimidate me.

mandog
mandog
  • Member since: Jul. 13, 2010
  • Offline.
Forum Stats
Member
Level 22
Musician
Response to Why AS is unused? Feb. 28th, 2013 @ 11:11 AM Reply

At 2/3/13 04:13 AM, MantisSuperior wrote: Thank for your answer. I think, if all game developers use C lenguage for their console games then AS3 don't work on this platform. I must study C# or C++. Who now some books or tutorials for C++ or C# game programming? And how i can use flash for painting and animation without AS? Maybe other animation program?

Thenewboston, always search for "thenewboston [codinglanghere]"


original I am.

BBS Signature
mandog
mandog
  • Member since: Jul. 13, 2010
  • Offline.
Forum Stats
Member
Level 22
Musician
Response to Why AS is unused? Feb. 28th, 2013 @ 11:13 AM Reply

At 2/18/13 12:41 PM, Awoken wrote: Just addin my own 2 cents here. I like AS3 because it is extremely easy to program. I find it much more intuitive than VB. Flash in my opinion is a great piece of software to experiment with small scale projects and test some algorithms and such. It's my prefered language.

Now that being said, I haven't made the leap over to C or any of the other more powerful languages because they intimidate me.

#include iostream
int main{
int var1 = 23;
cout << "Hello world!" << var1 << endl;
cin.ignore();
return 0;
}

intimidates you?

Learn python or lua then!

Python:
print("Hello World!");

Lua:
io.write("Hello World!");

*Sorry if I got any scripts wrong


original I am.

BBS Signature
Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Why AS is unused? Feb. 28th, 2013 @ 05:17 PM Reply

At 2/28/13 11:13 AM, mandog wrote: #include iostream
int main{
int var1 = 23;
cout << "Hello world!" << var1 << endl;
cin.ignore();
return 0;
}

Technically speaking that's C++, not C (you also forgot the <> brackets around the iostream header).
Not that the C example would be much different:

#include <stdio.h>

int main() {
    int var = 23;
    printf("Hello World! %i", var);
}

And to be fair pretty much any language looks very simple when you just write a hello world. C and C++ are complex languages with a steep learning curve, so it's understandable that someone be intimidated by them.

To stick with using C++ examples here's why I find it perfectly understandable:

template <class Ty>
struct Thing {
    typedef Ty value_type;
    Ty value;
};

template <class Ty>
class Container {
private:
    Ty _thing;
public:
    typename Ty::value_type get_thing_value() const;
};

template <class Ty>
typename Ty::value_type
Container<Ty>::get_thing_value() const {
    return _thing.value;
}

A simple templated class taking another templated class as its template and things get hairy.
That might seem like a contrived example, but I've encountered that patter before while writing C++.

At 2/28/13 11:13 AM, mandog wrote: Python:
print("Hello World!");

This is a little nitpicky but putting brackets around "hello world" isn't a Pythonic way of writing that, and they're not necessary.
You can just do:

print "Hello World!"

And using semi colons for statements in Python also isn't necessary, or recommended by the PEP 8 style guide (in fact that specifically recommends not doing it).

Diki
Diki
  • Member since: Jan. 31, 2004
  • Offline.
Forum Stats
Moderator
Level 13
Programmer
Response to Why AS is unused? Feb. 28th, 2013 @ 05:20 PM Reply

At 2/28/13 05:17 PM, Diki wrote: This is a little nitpicky but putting brackets around "hello world" isn't a Pythonic way of writing that, and they're not necessary.

Actually I wasn't really being fair here; it's possible you were writing that for Python 3.x in which case the brackets are very much necessary.
Though the semi colon still wouldn't be.

mandog
mandog
  • Member since: Jul. 13, 2010
  • Offline.
Forum Stats
Member
Level 22
Musician
Response to Why AS is unused? Feb. 28th, 2013 @ 05:22 PM Reply

At 2/28/13 05:17 PM, Diki wrote:
At 2/28/13 11:13 AM, mandog wrote: #include iostream
int main{
int var1 = 23;
cout << "Hello world!" << var1 << endl;
cin.ignore();
return 0;
}
Technically speaking that's C++, not C (you also forgot the <> brackets around the iostream header).

He wasn't asking about C, he was saying bigger langs like C.
You have caught me early in the morning.


original I am.

BBS Signature
Patcoola
Patcoola
  • Member since: Mar. 7, 2003
  • Offline.
Forum Stats
Member
Level 60
Animator
Response to Why AS is unused? Mar. 2nd, 2013 @ 03:03 PM Reply

At 2/2/13 11:29 AM, MantisSuperior wrote: Because AS3 is very stupid or uneffective? Who can give me answer? If i want create game on console i must learn c++ for example and forgot about AS3?

Yes, AS3 is really slow. I've moved from AS3 to JavaScript (almost identical) and JavaScript was a shocking 5 - 6.5 times faster in benchmarks. Add Flash's vector graphics and you have a platform that requires huge amounts of CPU power.

I think AS3 was great to learn, but it's not good for serious projects.

milchreis
milchreis
  • Member since: Jan. 11, 2008
  • Offline.
Forum Stats
Member
Level 26
Programmer
Response to Why AS is unused? Mar. 3rd, 2013 @ 08:36 AM Reply

At 3/2/13 03:03 PM, Patcoola wrote: Add Flash's vector graphics and you have a platform that requires huge amounts of CPU power.

.svg as a vector equivalent in the browser is not the fastest thing either.

Sacros
Sacros
  • Member since: Aug. 1, 2010
  • Offline.
Forum Stats
Member
Level 20
Animator
Response to Why AS is unused? Mar. 17th, 2013 @ 01:23 AM Reply

Im not sure you can deploy ActionScript to a console, or if you can the requirements and trade-offs that entail are too high to even consider

correct me if im wrong but Flash Player is some sort of AS interpreter concieved for the web, meaning theres a runtime environment that is unnecessary in stuff like consoles and unlike the JVM, Flash Player IS quite heavy


ama gon chill

seel
seel
  • Member since: Jun. 27, 2005
  • Offline.
Forum Stats
Member
Level 21
Musician
Response to Why AS is unused? Mar. 20th, 2013 @ 12:25 PM Reply

At 3/2/13 03:03 PM, Patcoola wrote: Yes, AS3 is really slow. I've moved from AS3 to JavaScript (almost identical) and JavaScript was a shocking 5 - 6.5 times faster in benchmarks. Add Flash's vector graphics and you have a platform that requires huge amounts of CPU power.

I think AS3 was great to learn, but it's not good for serious projects.

Depends on how you use it, it's a given that heavy use of vector graphics is going to be slow. If you use the Bitmap, BitmapData classes with pre-rendered graphics it's going to be a lot faster. If you want to go even further you can use the new Molehill api and utilize hardware acceleration. As for WebGL vs Molehill I'm not sure which one is faster. However if you want to make games for a console neither JS nor AS are viable options at this point.

Patcoola
Patcoola
  • Member since: Mar. 7, 2003
  • Offline.
Forum Stats
Member
Level 60
Animator
Response to Why AS is unused? Mar. 20th, 2013 @ 02:14 PM Reply

At 3/20/13 12:25 PM, seel wrote: Depends on how you use it, it's a given that heavy use of vector graphics is going to be slow. If you use the Bitmap, BitmapData classes with pre-rendered graphics it's going to be a lot faster. If you want to go even further you can use the new Molehill api and utilize hardware acceleration. As for WebGL vs Molehill I'm not sure which one is faster. However if you want to make games for a console neither JS nor AS are viable options at this point.

Sure I agree, Flash does display very well. However, the topic is Action Scripting, and who wants a language that does basic math extremely slow.

seel
seel
  • Member since: Jun. 27, 2005
  • Offline.
Forum Stats
Member
Level 21
Musician
Response to Why AS is unused? Mar. 20th, 2013 @ 03:45 PM Reply

At 3/20/13 02:14 PM, Patcoola wrote: Sure I agree, Flash does display very well. However, the topic is Action Scripting, and who wants a language that does basic math extremely slow.

How is molehill and 2D programming not related to programming in Actionscript? I digress, it might very well be true that Javascript outperforms Actionscript these days, but again that doesn't help OP make a game for a console.

Patcoola
Patcoola
  • Member since: Mar. 7, 2003
  • Offline.
Forum Stats
Member
Level 60
Animator
Response to Why AS is unused? Mar. 20th, 2013 @ 06:45 PM Reply

At 3/20/13 03:45 PM, seel wrote: How is molehill and 2D programming not related to programming in Actionscript?

I have no idea where you are getting this idea that I have implied any mention that Action Scripting is not related to molehill or 2D programming.

I digress, it might very well be true that Javascript outperforms Actionscript these days, but again that doesn't help OP make a game for a console.

Apparently you do not understand the threads topic and my supporting argument that Action Scripting is a slow and poor preforming language. I use Java Script a well known language for poor performance to illustrate how slow Action Scripting is, and that's why it's not used in consoles.

I don't feel I have to explain anything further to you, so don't expect any future relies from me.

kaiser-d
kaiser-d
  • Member since: Sep. 17, 2005
  • Offline.
Forum Stats
Member
Level 13
Blank Slate
Response to Why AS is unused? Mar. 21st, 2013 @ 07:24 AM Reply

Short answer why you can't use AS for console games is because AS is dependent on the flash player, which is not included in consoles game rendering engine.

Slightly longer answer (regarding web based performance, as mentioned in the js comparison)
AS and Javascript are both interpretations of EMCA script, however javascript is faster because it uses your browsers native parser while AS requires the flash plugin to run in addition to your browser. Before HTML5 and canvas, there were a lot of things that you could not accomplish with html entities that you could do with flash pretty easily. Now, not so much.

Longer still answer
AS is not very appropriate to high performance games because it is not compiled, nor does it run natively. In order for any computing system to handle any code, it has to be broken down into binary for the machine to digest it. In the case of a compiled language, this happens during the compiling process, which results in a script that can be easily read by the machine but looks like gobbledegook to you. The resulting package is no longer directly editable, but is generally optimized for fast performance and will function as optimally as your code was written, within the limitations of the hardware it is running on. An interpreted language uses another program to interpret the code into binary for it using expected patterns during runtime. This could be a plugin, your browser, your OS in some cases, or some other extension designed to interpret the code from what the developer writes into something the machine understands. This way code can be maintained in a human readable format during runtime and usually has pretty good cross platform support if the render engine does(Java is a good example of this, as it can run on any machine that can handle the Java Virtual Machine, which is most everything from your phone to your toaster, well, if you have a really nice toaster anyhow), however there is usually a performance tradeoff. Console games require a lot of complex calculations simultaneously (particularly for 3d playfields and particles) which are beyond the scope of AS, and most other interpreted languages too for that matter within the timeframe that needs to happen to give you a game experience that isn't laggy or choppy. Interpreted languages can also run into problems when your machine is under a heavy load as either the program you are running or the interpreter becoming unresponsive kills your program, as opposed to compiled programs in which case there is no interpreter to make them hang, though the program itself can still hang if there is not sufficient memory to run it.

In college (game design), they basically beat to death the importance of C++ and python too to some degree, as they both perform decently (python's a bit slower but has easier syntax) and interface with rendering software such as Maya and Zbrush. I can't comment on C# as I don't develop in a windows environment and I hate visual studio, but I'm sure it's not incredibly much different from C++ or any other C-based implementation for that matter.


FB | Blog
If you ever wondered who to blame for your problems, find a mirror.

BBS Signature
seel
seel
  • Member since: Jun. 27, 2005
  • Offline.
Forum Stats
Member
Level 21
Musician
Response to Why AS is unused? Mar. 21st, 2013 @ 02:27 PM Reply

At 3/20/13 06:45 PM, Patcoola wrote: Apparently you do not understand the threads topic and my supporting argument that Action Scripting is a slow and poor preforming language. I use Java Script a well known language for poor performance to illustrate how slow Action Scripting is, and that's why it's not used in consoles.

I'm not even arguing against AS being slow, I think you misunderstood which part of this topic I'm addressing. The reason it's not used on consoles is because there is no Flash Player available except in some browsers (which are usually older versions, which means they're even slower and has less compatibility), plain and simple. The reason why there's no Flash Player is, as you mentioned, because it's really slow and there really is no point in making one either.

PMMurphy
PMMurphy
  • Member since: May. 27, 2012
  • Offline.
Forum Stats
Member
Level 01
Programmer
Response to Why AS is unused? Mar. 24th, 2013 @ 12:12 AM Reply

If you want real answers to you questions as to why a language is better for video games or not. Reverse engineer those languages. But have fun with that.

But basically your language itself is just a tool to assist you in creating the product you want. THere are tons of langagues. Most people who need a faster performing langugae will derive from C variations of languages. Java is a variation of C but its just not very popular and most people stray away from it.

C++ c# and some people even create their own variation of C that isn't even c , c++ or c#.

The language doesn't matter. All that matters is if your code is capable of performing the task you want it to perform at a optimal setting. Its just C-like languages tend to handle video games in a more affective manner than others. Atleast, thats what im told.

mandog
mandog
  • Member since: Jul. 13, 2010
  • Offline.
Forum Stats
Member
Level 22
Musician
Response to Why AS is unused? Mar. 30th, 2013 @ 01:48 PM Reply

Speeders, like me, we spend thousands on the newest SSD's that a couple months later are 50% less.


original I am.

BBS Signature