A Flash Developer Resource Site

Results 1 to 19 of 19

Thread: actionscript 3.0 and c++ i want to know???

  1. #1
    Junior Member
    Join Date
    Oct 2006
    Posts
    4

    actionscript 3.0 and c++ i want to know???

    Hi I'm new to flash well im new to everything but i have been reading somethings.
    Anyway i want to learn everything, this computer stuff is alright wish i would have started when i was 20yrs old but o well

    My name is "Al" i wanted to ask
    one of you something about actionscript 3.0

    Is 3.0 as powerful as c++ or will it be?

    Can you do the same or more with
    actionscript 3.0 than c++?

    Are you able to use open gl or direct x with 3.0?

    will the new flash be able to do 3d rotations like director can
    or better yet will the new flash be able to replace director all together?

  2. #2
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    Is AS3 as fast as c++? nope not even close. AS3 is not even as fast as java, which is quite a bit slower than c++. But no one can expect a client-side multi-platform high-level programming language like flash to be even close in performance to a low level (almost machine language level) language such as c++

    On the bright side though, flash is getting faster. maybe not as fast as java yet, but it sure is much nicer to develop with than java (at least visually)

    As of now, flash doesn't have any directx/opengl support, but from what i read on a thread here just a few minutes ago, f10 might have it.
    If you'd like to use directx/opengl support though, it's possible but only in executables (exe files, not on the web) with programs like zinc

    flash doesn't have any support for 3d rendering, but someone just might create a library which will add that support (like what sandy's 3d engine does in as2)
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  3. #3
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    C++ is not almost machine language level, its no-where near,

    machine code is just binary. Assembly is close as each assembly instruction converts to one binary instruction. Each third-generation language (such as C, C++, pascal...) command converts to many binary instuctions.

    i just had to clarify that.

    I would say, if you want to get serious about programming, then start on something like C++ (i know i really wish i had), if you start on Actionscript it will be hard to wheen yourself off of it.

    Also flash seems to make people code sloppy, i know i've seen lots of sloppy code on these forums.

    thats just my two cents.

    zlatan
    New sig soon

  4. #4
    Senior Member sherif79's Avatar
    Join Date
    Jan 2001
    Location
    Essex, England
    Posts
    266
    I agree that it'll be better to start off with someting else than AS. But about code being sloppy, that's nothing to do with AS or flash, that just goes back to the fact that they are not experienced enough -yet-.

    BTW, this website is really good if you want to learn AS.

  5. #5
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    being inexperienced is ok, but, imo, it's flash that makes people code sloppy. even little things like not having to put semi colons on the end of lines to not having to data type varibles.
    New sig soon

  6. #6
    Junior Member
    Join Date
    Oct 2006
    Posts
    9
    Basicly, AC or Java won't be as fast as pre complied languages. As they complie on runtime. Something like that.
    ~Zibeon

  7. #7
    Junior Member
    Join Date
    Oct 2006
    Posts
    4
    Hey
    Thank you all for your help i think i understand
    actionscript is cool but java and c++ is raw power is that right?

    So is there something like flash that uses c++ instead of actionscript
    you know lets you make animations just like flash but uses the power of c++

    and i would love to learn how to make intros should i stay here and look at the tutorials
    or what would you guys or ladies do
    thank you for your help you all are very nice for taking your time out to help me
    from "AL"

  8. #8
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    Well.. c++ is power, java is powerfull, but i wouldnt call it raw
    Flash is really the best tool you can find out there for creating intros, animations, etc for the web (or even standalone apps). I'm sure there's more powerfull platforms out there for animating and drawing, but most can be used on the web like flash, which makes flash a weapon of choice, but also the reason it can't be that fast...

    About the machine language bit... c++ is interpreted directly to assembly code (which is really as close as developers get to machine code, since most people don't program with 0's and 1's), and with a good compiler, this can be done very efficiently, which makes it pretty close to machine code imho.. in any case, c/c++ is good if you need power, but I think you should learn Java (or maybe even AS3, as they are becoming quite similar) if you want good form... they're cleaner than c++, easier to learn, and a good place to start off

    good luck!
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  9. #9
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    You might want to look into .net too, especially C#. Seems like things are heading more and more towards managed languages. It might be a bit less powerful in most cases, but it's pretty nice to work with, and I hear C# can actually outperform or at least come very close to C++ in some other cases, due to JIT compilation.

    But it probably depends on what you want to do. Want to make programs that need to run in a browser? Definately use Flash then, unless you have something in mind that can't be done with it, in which case you might want to look at Java. Do you want to make games? Then Flash might still be the tool for you, both for online or offline games, but there are things it can not handle very well (like 3d), so you might want to look elsewhere. Do you want to get into the IT industry? Then maybe C# would be your best bet, as I doubt that a lot of (internal) business applications are still being made in C++. But if you need cross-platform support, then it's Java you need to look at. Or are you planning to make web application? Then you need to start learning html, css, javascript, php/asp/java, sql, and possibly also Flash.

    Power/speed isn't everything. Flash is fast enough for a lot of things. It all depends on what you want to accomplish.

  10. #10
    Junior Member
    Join Date
    Oct 2006
    Posts
    9
    My main issue with this is C++ is completely different to both AC and Java. It is a really bad language, ie low level, You can end up writing line upon line of code where as others can do it in a single function, but it is stonking fast. I hear Delphi comes close to the speed of C++. But Java and AC complie on runtime. So if you make a RPG say, animated, pretty detailed sprites etc, it will lag like a biotch. Even a stick rpg will lag, unless on lowest quality.
    You wont get languages like AC or Java to ever be as fast as C++ unless you can complie them.

    The biggest potential stumbling block is speed: interpreted Java runs in the range of 20 times slower than C. Nothing prevents the Java language from being compiled and there are just-in-time compilers appearing at this writing that offer significant speed-ups. It is not inconceivable that full native compilers will appear for the more popular platforms, but without those there are classes of problems that will be insoluble with Java because of the speed issue.
    If you want a comparison between Java and C++ go HERE

    nearly an interpreted language applies, ie AC.

    So it's not a case of really comparing complied to interpreted...if you see what i mean.

    Just as Fall_X said, it's about what you are doing.
    It can be about speed/power, but C++ will just take so long to get it even close to what flash can do in a single line of code.
    Last edited by Zibeon; 10-27-2006 at 05:46 AM.
    ~Zibeon

  11. #11
    crossconscious
    Join Date
    Sep 2005
    Location
    Belgium
    Posts
    1,188
    Quote Originally Posted by Zibeon
    So if you make a RPG say, animated, pretty detailed sprites etc, it will lag like a biotch.
    Erm, what? I'm making an rpg, lot's of tiles and sprites at the same time, all pixel art-based, with pathfinding AI and lots of other stuff going on, but it roons smoothly. It's just a matter of knowing how to do things. Good, performant scrolling is a bit tricky to get right, but there's a lot of techniques known to make it work.

    Quote Originally Posted by Zibeon
    Even a stick rpg will lag, unless on lowest quality.
    Stick games are usually vector-based, so they will lag more than sprite-based games. For sprite-based games, you can set the quality to low, and you wouldn't even notice the difference.

    Quote Originally Posted by Zibeon
    You wont get languages like AC or Java to ever be as fast as C++ unless you can complie them.
    Actually, both are already compiled. Just not to native code, because they have to be cross platform, so they are compiled to some intermediate bytecode.

  12. #12
    Junior Member
    Join Date
    Oct 2006
    Posts
    9
    Actually, both are already compiled.
    Not exactly

    Interpreted
    In an interpreted environment, the instructions are executed immediately after parsing. Both tasks are performed by the interpreter. Interpreted languages include the MS-Dos Batch language (the OS itself is the interpreter), shell scripts in Unix/Linux systems, Java, Perl and BASICA (a very old BASIC language). Advantages of interpreted languages include relative ease of programming (since once you type your instructions into a text file, the interpreter can run it) and no linker is required. Disadvantages include poor speed performance and that you do not generate an executable (and therefore distributable) program. The interpreter must be present on a system to run the program.

    Compiled
    Compilers parse the instructions into machine code and store them in a separate file for later execution. Many modern compilers can compile (parse) and execute in memory, giving the 'appearance' of an interpreted language. However, the key difference is that parsing and execution occurs in two distinct steps. Examples include newer forms of BASIC (such as Visual Basic), C/C++, Delphi and many others. In a compiled environment, you may speak of several separate files: source code (the text instructions you actually enter), object code (the parsed source code) and the executable (the linked object code). There is definitely an increase in complexity in using compilers, but the key advantages are speed performance and that you can distribute stand-alone executables.

    To the main question here:

    Is 3.0 as powerful as c++ or will it be?
    No, not yet

    Can you do the same or more with
    actionscript 3.0 than c++?
    Depends, generally you can do exactly the same, AS will just be far quicker, and less involved to code.

    Are you able to use open gl or direct x with 3.0?
    Things like "void glMatrixMode(GLenum mode);" No.
    Last edited by Zibeon; 10-28-2006 at 05:43 AM.
    ~Zibeon

  13. #13
    Senior Member ozmic66's Avatar
    Join Date
    Oct 2005
    Posts
    472
    "Is 3.0 as powerful as c++ or will it be?"
    "No, not yet"

    If be powerful you mean speed, then how could it ever be? flash runs on a virtual machine in order to make it cross-platform, and as long as it does, it is a level higher than c++ and could never be as fast

    If it isn't speed, c++ is still quite powerful anyway
    Pixelwave Flash-based iPhone framework
    iPhone Games: Flyloop | Freedom Run

    Twitter: Oztune

  14. #14
    Junior Member
    Join Date
    Oct 2006
    Posts
    9
    Exactly
    ~Zibeon

  15. #15
    \x3a\x6f\x29
    Join Date
    Sep 2005
    Location
    paris
    Posts
    88
    There are also a lot of libraries for C++ so you do not have to do everything on your own. For example DirectX allows you to access multimedia devices (DirectAudio, DirectShow, etc.) with only some lines of code. There is also a librarie that is called pixeltoaster (or it has been renamed right now) that gives you very fast pixel access and it is not that hard to get some output on the screen. It is very easy and if you know a little bit about C++ you wont have any problems.

  16. #16
    Junior Member
    Join Date
    Oct 2006
    Posts
    4
    This info is a lot of help thank you.
    i have one more thing to ask
    i just got flex so i can learn actionscript 3.

    But when it comes to c++ should i get dev bloodshed or would microsoft vc++ 2005 express be better for me???

  17. #17
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    i use Dev-C++ so i would recomend it, but dont use visualc++ please!
    New sig soon

  18. #18
    Junior Member
    Join Date
    Oct 2006
    Posts
    4
    why do you say that?? is it buggy or??

  19. #19
    Senior Member dudeqwerty's Avatar
    Join Date
    Mar 2005
    Location
    Bosnia
    Posts
    1,626
    lol im sure its fine, maybe some weird microsoft "standards in it" like they put into all the laguages they create tools for.

    im not liking microsoft too much these days, my windows if f***ing up.
    New sig soon

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center