PDA

View Full Version : Which code libraries do you use?



inchworm
January 20th, 2010, 09:38 PM
I'm always on the look out for useful libraries which can save me some time. Obviously there are some good ones in the tweening department (TweenMax/Lite, GTween, Tweensy, Tweener, etc..) as well as a few officially supported adobe ones like the as3corelib.

I've found that recently I've been using CasaLib by Aaron Clinger a lot. And Away3D to get my stuff moving in the 3rd dimension. What are you guys using/have used that you could share with me?:rd:

IQAndreas
January 20th, 2010, 10:08 PM
[shameless self advertising]I use DebugText! A handy to use on-screen trace replacement! ;) http://iqandreas.blogspot.com/2009/12/debug-text-has-been-updated-now-with.html [/shameless self advertising]


Other than TweenLite, I don't use a lot of external libraries unless it's for specific purposes such as "Box2D" for physics (http://box2dflash.sourceforge.net/), "Papervision" for 3D work (http://blog.papervision3d.org/), and SmartFox server for socket connections (http://www.smartfoxserver.com/), however, I'm still learning all three of those.

Otherwise, as3corelib has a lot of really useful classes, including image formats etc.
http://code.google.com/p/as3corelib/

One library I recently got my hands on was TexTransition, but I still haven't had a chance to use it, but it looks promising.
http://textransition.com/

Ooh. I nearly forgot the Senocular Transform Tool. I still haven't used it, but I believe it is quite handy and seems easy enough to use and implement:
http://www.senocular.com/?entry=372

inchworm
January 23rd, 2010, 08:00 PM
Hey your DebugText tool looks pretty neat. I'll have to check that one out.

mathew.er
January 24th, 2010, 02:20 AM
TweenLite to animate things, Cairngorm as a micro-achitecture framework, PV3D for 3D stuff and Box2D to make things collide. In that order :)

creatify
January 24th, 2010, 11:39 AM
These are a few I use:
Grant Skinners Rnd (http://www.gskinner.com/blog/archives/2008/01/source_code_ran.html) (static random class)
I made a static AS3 class from this Hex Color Fading class (http://www.pixelwit.com/blog/2007/05/hexadecimal-color-fading/)
amfphp.org (http://amfphp.org/)
and a shameless plug like IqAndreas, a parallax class (http://www.lextalkington.com/blog/2009/12/simple-as3-parallax-system-engine/) and a points-around-circumference class (http://www.lextalkington.com/blog/2009/12/generate-points-around-a-circles-circumference/)
on top of many of the classes posted above

IQAndreas
January 24th, 2010, 11:46 AM
Cairngorm as a micro-achitecture framework
Hm... I haven't heard of that one before.

Could you post a link? My Google results are pretty much all irrelevant and inconclusive...

mathew.er
January 24th, 2010, 11:55 AM
Hm... I haven't heard of that one before.

Could you post a link? My Google results are pretty much all irrelevant and inconclusive...

I think it's for Flex only :)

http://opensource.adobe.com/wiki/display/cairngorm/Cairngorm

creatify
January 24th, 2010, 04:00 PM
On Cairngorm, I had to use a proprietary Flash IDE capable Cairngorm MVC system that was ported / rebuilt for use outside Flex - it's an interesting framework. There are a number of non-Adobe sites with some really useful information when getting started with Cairngorm such as:

http://www.cairngormdocs.org/cairngormDiagram/index.html

http://undefined-type.com/2008/10/cairngorm-and-flash/

hope you find those useful

mathew.er
January 24th, 2010, 04:28 PM
As for MVC frameworks, some might like Mate (http://mate.asfusion.com/) (Flex only) or PureMVC (http://puremvc.org/) (its AS3 port)

edit: oh and Degrafa (http://www.degrafa.org/) rules!

rumblesushi
January 24th, 2010, 07:41 PM
None, other than maybe JPGEncoder.

Although I would very much like to know if there is a serverside/AS3 library designed for online multiplayer in Flash.

IQAndreas
January 24th, 2010, 08:02 PM
Although I would very much like to know if there is a serverside/AS3 library designed for online multiplayer in Flash.
You can look into SmartFox server (http://www.smartfoxserver.com/)

If I understand correctly, I believe the server side can be coded in AS3 or at least AS3 syntax as well. Otherwise, there are several multiplayer game APIs, however, I'm not sure of how the server side looks.

Though do you really want slow AS code running on the server? If you need anything ported to PHP or something, I can give it a try at least, though PHP still isn't my strong suit.

rumblesushi
January 24th, 2010, 08:24 PM
Ah, I probably should have worded my post better Iq. By serverside, I meant serverside language.

So what I really meant to say was a PHP library that's been developed specifically for AS3 ;)

Annoyingly I don't know any PHP at all. Although PHP doesn't look that hard, for some reason I'm only good at programming things that are related to visuals.

mathew.er
January 24th, 2010, 11:07 PM
for some reason I'm only good at programming things that are related to visuals.
You'll really like echo(), then :D

You could use some Flash Media Server alternative... such as Red5. It's Java, pain in the arse to setup and sadly unreliable for any serious usage (hundreds-to-thousands connections, long uptimes). I didn't really hear about any back-end specifically for flash multiplayer games. Maybe people keep them for themselves for their projects... making your own always works the best :)

rumblesushi
January 25th, 2010, 11:40 AM
You'll really like echo(), then :D

You could use some Flash Media Server alternative... such as Red5. It's Java, pain in the arse to setup and sadly unreliable for any serious usage (hundreds-to-thousands connections, long uptimes). I didn't really hear about any back-end specifically for flash multiplayer games. Maybe people keep them for themselves for their projects... making your own always works the best :)

I totally agree. That's exactly why I built my own 3D engine, and why I develop my own physics/collision etc.

But I'm just too busy to learn PHP, plus like I said, I don't think I'd be very good at it :)

I'll just have to get someone on board who is capable of developing the serverside of a multiplayer game.

inchworm
February 14th, 2010, 07:58 PM
PureMVC is a great architecture for setting up your site though I'm *really* interested in RobotLegs and I hope to give it a shot on an upcoming project. As a part of TweenLite/Max, I think TimelineLite/Max doesn't get enough love but it's very useful. Checkout the top of this page for a video link which shows how to use it: http://www.greensock.com/timelinelite/

I haven't used Degrafa before, I'm not sure if I understand what it does... :ponder:

wvxvw
February 14th, 2010, 09:29 PM
TweenLite to animate things, Cairngorm as a micro-achitecture framework, PV3D for 3D stuff and Box2D to make things collide. In that order :)

Nice one... :D

I use nochump (http://nochump.com/blog/?p=15) (this is a Zip format library for AS, I use it pretty much because I was lazy to write one, and it seems to do the job well).
Other than that - no, not really, not for my own projects anyway...


@rumblesushi:
I may sound like one of those crazy newly converted... but you may find that HaXe is a good server side language... It can compile into Neko bytecode (Neko is a compiled language designed to run at server side) + it may use C++ compiled modules (but, to be honest, I didn't try that target, only compiled some other people projects). HaXe can also compile into PHP, which is awesome for common tasks, but it doesn't cover all the PHP functionality (so, sometimes you'll have to add original PHP code to it). I tried making simple things with it, like image uploader script for example, and it worked nice for me... Oh, and it's very easy to port your AS3 code to HaXe because the syntax is very similar and many concepts you're already familiar with will apply there too. I had absolutely no problem writing some simple PHP example project without even having to look in the manual.

Now, to be honest, C# (I can't say VB, because I think it's just ugly, sorry VB fans! I know it's very powerful tool etc, but, oh, sorry, I just cannot help not liking it for the syntax). So, I'd think that C# is the most advanced high-level programming language nowadays. You can use it for everything, literary, server-side included. It is a bit more to learn, but it is a pleasure to write in it :) Besides, it's been very helpful in my day to day life whenever I needed some basic app to do simple tasks that would help me where my code editor can't. Example - generating lots of files based on some pattern, or making simple gui for commandline tools etc...

However, speaking of PHP, it is very easy to use when you do the basic stuff, but, when it gets complex... well, you have to be a pro to understand which operation is going to be more or less expensive in terms of performance... It is much like JavaScript, where the common programming logic sometimes works, and sometimes doesn't... Didn't mean to offend any PHP people here, really :)

rumblesushi
February 16th, 2010, 12:20 PM
wvxvw - I appreciate the info. Evidently I'm pretty ignorant about HaXe, I thought it just compiled into AVM2 bytecode and that's it. Seems like something I should learn :)

Regarding C#, from what I've seen it looks easy to pick up. I like the syntax. It looks easier to learn than PHP, for me anyway, I much prefer the syntax.

BoppreH
February 16th, 2010, 01:18 PM
I'm probably reinventing the wheel, but I find it easier to make my own classes for quick projects. I can never find existing ones that implements the required functionalities and when I do it's frigging hard to start using it.

So I ended up with classes to handle Display Objects (slice images, set position regardless of registration point, takes snapshot, etc), UI elements (scrollbar, FluidObject to be extended in a fluid-layout environment, odometer), games skeletons (tetris, avoider, jigsaw, click-and-link) and debugging tools (display object inspector, Info class that gathers Flash Player information from built-in sources).

Aside from that, I use TweenLite for handling tweens (and sometimes TweenMax when I have to yoyo something), and Corey O'Neil's Collision Detection Kit.