Forum Topic: The Flash 'Reg' Lounge

(786,245 views • 52,253 replies)

This topic is 1,742 pages long. [ 17471,494 | 1,495 | 1,4961,6191,742 ]

<< < > >>
None

Denvish

Reply To Post Reply & Quote

Posted at: 3/19/09 02:35 PM

Denvish DARK LEVEL 45

Sign-Up: 04/25/03

Posts: 16,238

No whitespace unless absolutely necessary, and as much as possible one one line. Every line commented. eg (bbs formatting will probably break this)

function BREAKBARR(mc,sa,n,a){																	//SPLIT BALL ARRAY
	sa=Number(sa);a.splice(sa+1,0,[]);															//CREATE NEW SUBARRAY
	for(var i=0;i<a[sa].length;i++){if((i+1)>n){a[sa+1].push(a[sa][i]);};}		//LOOP THROUGH
	a[sa].splice(n,a[sa].length-n);																	//REMOVE ITEMS FROM OLD ARRAY 
	mc.ap=a[sa].length;a[sa].push(mc);															//PUSH MC TO FRONT ARRAY
	PUSHIN(mc,sa,n);																						//PUSH IT IN TO TRACK
}																													//

Mid blue for keywords & identifiers, green for strings, grey for comments. Font: Tahoma 8 so all the comments do line up

- - Flash - Music - Images - -

BBS Signature

None

BritishMoose

Reply To Post Reply & Quote

Posted at: 3/19/09 03:41 PM

BritishMoose NEUTRAL LEVEL 15

Sign-Up: 10/18/03

Posts: 2,955

As the nerds have their own coding topic...

Animation

How many of you animators have experimented with different methods of animation asides from flash?

At uni, I'm not allowed to use my Macromedia baby 'cause I'm too good with it: they tell me to try out new programs/techniques 'n' all that so that I develop.

So far I've done A LOT of analogue animation (with a pencil and lightbox) as well as trying out After Effects. My standard practice nowadays is drawing out each frame, taking a photo of each image and then compiling in Adobe Premier. Odd or what!

Never forget...

BBS Signature

None

ColdLogic

Reply To Post Reply & Quote

Posted at: 3/19/09 03:48 PM

ColdLogic EVIL LEVEL 19

Sign-Up: 11/12/03

Posts: 524

At 3/19/09 02:35 PM, Denvish wrote: No whitespace unless absolutely necessary, and as much as possible one one line. Every line commented. eg (bbs formatting will probably break this)

are you trying to make my brain explode?


None

K-Guare

Reply To Post Reply & Quote

Posted at: 3/19/09 04:08 PM

K-Guare FAB LEVEL 16

Sign-Up: 05/23/08

Posts: 2,322

// Comment about something completely obvious; seen frequently.
var unimportantvarname:int = 0;
var importantVarName:int = 0;
var classInstanceName:ClassName = new ClassName();
const CONST_NAME = 0;
function doTerribleThings(argone:int, argtwo:String):void {
	trace("doTerribleThings() - Test");
}

I guess the only interesting thing is I make my comments pink.

BBS Signature

None

Saza

Reply To Post Reply & Quote

Posted at: 3/19/09 04:20 PM

Saza LIGHT LEVEL 15

Sign-Up: 10/01/05

Posts: 1,895

At 3/19/09 04:08 PM, K-Guare wrote: I guess the only interesting thing is I make my comments pink.

I just did that.

PINK COMMENTS! (:


The-Super-Flash-Bros LIGHT LEVEL 27

Sign-Up: 09/02/02

Posts: 1,246

Oooh, coding styles!

No brace cuddling, custom background colours to make comments and strings stand out, liberal use of whitespace to make things nice and readable. Monaco font, my personal favourite fixed width font

Tom-

The Flash 'Reg' Lounge


None

jmtb02

Reply To Post Reply & Quote

Posted at: 3/19/09 05:34 PM

jmtb02 LIGHT LEVEL 29

Sign-Up: 03/01/04

Posts: 5,841

At 3/19/09 04:35 PM, The-Super-Flash-Bros wrote: Oooh, coding styles!

Cuddle those braces yo!

The Flash 'Reg' Lounge

Hi there!

BBS Signature

None

UnknownFury

Reply To Post Reply & Quote

Posted at: 3/19/09 05:43 PM

UnknownFury EVIL LEVEL 26

Sign-Up: 08/10/05

Posts: 6,031

At 3/19/09 05:34 PM, jmtb02 wrote: Cuddle those braces yo!

Mine's similar to that, Liams etc. Similar colours too (NG Colours).
Denvish = yuck :P
I like reading El-Presidente's stlye but I don't know why but when it comes to writing out code I never format it like that.

Portfolio(Under construction): UnknownFury.com |
Msn: giant_ak_47@msn.com | Contact: me@unknownfury.com
Follow me on twitter!


The-Super-Flash-Bros LIGHT LEVEL 27

Sign-Up: 09/02/02

Posts: 1,246

At 3/19/09 05:34 PM, jmtb02 wrote:
At 3/19/09 04:35 PM, The-Super-Flash-Bros wrote: Oooh, coding styles!
Cuddle those braces yo!

Nice eye-saving colour scheme there. But CUDDLING IS EVIL!

Tom-


None

Glaiel-Gamer

Reply To Post Reply & Quote

Posted at: 3/19/09 08:47 PM

Glaiel-Gamer NEUTRAL LEVEL 27

Sign-Up: 12/28/04

Posts: 8,031

At 3/19/09 05:45 PM, The-Super-Flash-Bros wrote: Nice eye-saving colour scheme there. But CUDDLING IS EVIL!

Prove it. Mathematically.


Kissing

Zyphonee

Reply To Post Reply & Quote

Posted at: 3/19/09 09:04 PM

Zyphonee FAB LEVEL 13

Sign-Up: 11/13/08

Posts: 1,857

At 3/19/09 03:41 PM, BritishMoose wrote: As the nerds have their own coding topic...

Animation

How many of you animators have experimented with different methods of animation asides from flash?

At uni, I'm not allowed to use my Macromedia baby 'cause I'm too good with it: they tell me to try out new programs/techniques 'n' all that so that I develop.

Some time ago, I ran out of luck and I didn't have electricity for a day. I actually started trying out traditional animation. It's preety interesting, I like it. What's hard about it is that unlike flash, if you're working on thick paper like I do (Shwemmer is my personal fave when inking) pulling out smooth animation is HARD because of the lack of onion skin. On office paper it's preety easy, since if you put one sheet over the other one. If you make a good animation and scan it so you can put the images with an alternate programme (Say, LiveSWF...) it is sure lots of people will be impressed. I love traditional animation, it feels so graceful...


Elated

turtleco

Reply To Post Reply & Quote

Posted at: 3/19/09 09:10 PM

turtleco FAB LEVEL 07

Sign-Up: 03/01/08

Posts: 815

At 3/19/09 09:04 PM, Zyphonee wrote:
At 3/19/09 03:41 PM, BritishMoose wrote: As the nerds have their own coding topic...

Animation

How many of you animators have experimented with different methods of animation asides from flash?

At uni, I'm not allowed to use my Macromedia baby 'cause I'm too good with it: they tell me to try out new programs/techniques 'n' all that so that I develop.
Some time ago, I ran out of luck and I didn't have electricity for a day. I actually started trying out traditional animation. It's preety interesting, I like it. What's hard about it is that unlike flash, if you're working on thick paper like I do (Shwemmer is my personal fave when inking) pulling out smooth animation is HARD because of the lack of onion skin. On office paper it's preety easy, since if you put one sheet over the other one. If you make a good animation and scan it so you can put the images with an alternate programme (Say, LiveSWF...) it is sure lots of people will be impressed. I love traditional animation, it feels so graceful...

traditional animation is fun, I just use computer paper and draw it in one at a time. The problem is that I ran out of paper several times :P. I usually just put on a hole puncher and put rings around it at the end so I can test the animation as often as possible. The coloring and finishing is a lot more fun to do than with flash and I can animate traditionally a good margin faster, But the major problem is that sommetimes I put the character in the wronge place because traditional animation doesn't have onion skin, but much more effects can be applied as well.

um... I make movies?

BBS Signature

None

Wurmy

Reply To Post Reply & Quote

Posted at: 3/19/09 09:19 PM

Wurmy LIGHT LEVEL 28

Sign-Up: 06/20/06

Posts: 2,307

At 3/19/09 04:35 PM, The-Super-Flash-Bros wrote: Oooh, coding styles!

No brace cuddling, custom background colours to make comments and strings stand out, liberal use of whitespace to make things nice and readable. Monaco font, my personal favourite fixed width font

Tom-

I'm going to assume you and jmtb02 use FlashDevelop. It just looks like it :p

BBS Signature

None

jmtb02

Reply To Post Reply & Quote

Posted at: 3/19/09 11:34 PM

jmtb02 LIGHT LEVEL 29

Sign-Up: 03/01/04

Posts: 5,841

At 3/19/09 09:19 PM, Wurmy wrote: I'm going to assume you and jmtb02 use FlashDevelop. It just looks like it :p

I use FlashDevelop and I really like it. I am not the biggest fan of OOP, which FlashDevelop seems to cater too the most. Procedural is just so much more flexible for me to use especially at the scope of Flash games. I just moved up to Flash 10 and am using FlashDevelop in conjunction.

Also, Flash CS4 tweens. What the heck happened there? Seriously.

Hi there!

BBS Signature

None

Senti

Reply To Post Reply & Quote

Posted at: 3/19/09 11:54 PM

Senti LIGHT LEVEL 38

Sign-Up: 12/01/03

Posts: 3,518

http://www.sendspace.com/file/45pogy

So solid.

I'm getting CS4 through school next year. Whats up with tweeners?

BBS Signature

None

Deathcon7

Reply To Post Reply & Quote

Posted at: 3/20/09 12:02 AM

Deathcon7 NEUTRAL LEVEL 21

Sign-Up: 10/01/03

Posts: 5,754

CS4 ftw!
Convinced my mom and dad to help me get Creative Suite CS4 (they both have invested interest in some of the programs). So yay, bones here I come!

Also, I'm gonna need a screenshot of the color setting screen, because I want the NG theme please. Someone, oh please!


None

Wurmy

Reply To Post Reply & Quote

Posted at: 3/20/09 01:53 AM

Wurmy LIGHT LEVEL 28

Sign-Up: 06/20/06

Posts: 2,307

Stupid 'AS' question
I can't figure out an easy way to pick -1 or 1 randomly without an if statement.. help :(

I just want to know how.. it's been bothering me for a long time :(
BBS Signature

None

Glaiel-Gamer

Reply To Post Reply & Quote

Posted at: 3/20/09 02:21 AM

Glaiel-Gamer NEUTRAL LEVEL 27

Sign-Up: 12/28/04

Posts: 8,031

At 3/20/09 01:53 AM, Wurmy wrote: Stupid 'AS' question
I can't figure out an easy way to pick -1 or 1 randomly without an if statement.. help :(
I just want to know how.. it's been bothering me for a long time :(

(int(Math.random()*2)-.5)*2;

or

Math.random()<.5?1:-1;


Shouting

fluffkomix

Reply To Post Reply & Quote

Posted at: 3/20/09 02:27 AM

fluffkomix EVIL LEVEL 10

Sign-Up: 05/05/08

Posts: 1,963

i just found out you can use graphics to motion tween!

I only found out now because my ICT 9 teach told me it had to be a movie clip

to truly appreciate newgrounds | my store
Lemon Demon: fancy pants manifesto collab
Here ends another post by the grand master of all things: fluffkomix

BBS Signature

None

Wurmy

Reply To Post Reply & Quote

Posted at: 3/20/09 02:46 AM

Wurmy LIGHT LEVEL 28

Sign-Up: 06/20/06

Posts: 2,307

At 3/20/09 02:21 AM, Glaiel-Gamer wrote: (int(Math.random()*2)-.5)*2;

What I was looking for.. not sure why I couldn't come up with it x_x

Math.random()<.5?1:-1;

And although this doesn't use an if statement, isn't it the same as using an if statement anyways? You're just checking whether or not a random number is less than .5 or greater than and getting an answer from that..

BBS Signature

None

Glaiel-Gamer

Reply To Post Reply & Quote

Posted at: 3/20/09 02:54 AM

Glaiel-Gamer NEUTRAL LEVEL 27

Sign-Up: 12/28/04

Posts: 8,031

At 3/20/09 02:46 AM, Wurmy wrote:
Math.random()<.5?1:-1;
And although this doesn't use an if statement, isn't it the same as using an if statement anyways? You're just checking whether or not a random number is less than .5 or greater than and getting an answer from that..

?: is the conditional operator, not an if statement (although it does behave similarly)

like you can do

var a:int = b?1:-1;

but you can't do

var a:int = if(b) 1 else -1 ;
because the if statement is NOT an expression, while the conditional operator is

you'd have to do

var a:int;
if(b) a = 1; else a = -1;

this is fun too

var stuff =
n==a ? 1 :
n==b ? 2 :
n==c ? 3 :
n==d ? 4 :
n==e ? 5 :
n==f ? 6 :
0;


None

Deadclever23

Reply To Post Reply & Quote

Posted at: 3/20/09 03:27 AM

Deadclever23 FAB LEVEL 11

Sign-Up: 11/27/06

Posts: 1,020

Other ways to get 1 or -1.
i = j/Math.abs(j);

IndyDev - Reviews, News and Tutorials. the hottest new Indy blog of it's kind. (Shameless self promotion).

BBS Signature

None

GustTheASGuy

Reply To Post Reply & Quote

Posted at: 3/20/09 05:36 AM

GustTheASGuy LIGHT LEVEL 08

Sign-Up: 11/02/05

Posts: 11,329

At 3/19/09 11:34 PM, jmtb02 wrote: I use FlashDevelop and I really like it. I am not the biggest fan of OOP, which FlashDevelop seems to cater too the most. Procedural is just so much more flexible for me to use especially at the scope of Flash games.

Well, there isn't really anything to cater to for procedural. What would you like?
But how can procedural be more flexible than OOP? It's specialized, the opposite.

Looking at your code my thoughts were, you need more MVC.

My color scheme is about the same, with more saturated colors and edgy fonts.

#ngprogramming at irc.freenode.net
haXe | Keel imperative | Spyro! | Thru you


None

Luis

Reply To Post Reply & Quote

Posted at: 3/20/09 09:20 AM

Luis NEUTRAL LEVEL 02

Sign-Up: 04/23/00

Posts: 13,256

This lounge is hijacked and should be the Actionscripter Reg Lounge.

Now i go back into the shadows. To animate and masturbate quietly.

Well not so much animate.

Sig by Life-Stream

BBS Signature

None

El-Presidente

Reply To Post Reply & Quote

Posted at: 3/20/09 10:06 AM

El-Presidente LIGHT LEVEL 27

Sign-Up: 06/02/05

Posts: 5,169

FD Colors

At 3/19/09 05:34 PM, jmtb02 wrote: Cuddle those braces yo!

I may have to use a color scheme like that. Looks awesome. The drastically different colors makes it easy to read too. I remember last time looking for how to change the entire background color in FD but couldn't find it. How did you do that?

Depth Swapping
Anyone here really good with different techniques of swapping depths? Just hoping that someone would possibly have the time to do a really quick discussion about what method [I have a few in my head right now] would be the best to use.

Also, I'm going on vacation (tomorrow) !

MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...

BBS Signature

None

Xeptic

Reply To Post Reply & Quote

Posted at: 3/20/09 10:14 AM

Xeptic LIGHT LEVEL 30

Sign-Up: 05/12/05

Posts: 2,165

At 3/20/09 09:20 AM, Luis wrote: This lounge is hijacked and should be the Actionscripter Reg Lounge.

Whilst we are on the topic:

Game Concept

(it's not really a new concept) I've been working on this the past two days. It's like a 'defend the beach during d-day endurance towerdefense-ish' game. Endurance as in you can't actually win (because I like being historically correct :p) so you just have to last as long as you can. There will be tanks and planes and snipers an maybe dudes with rocket launchers and stuff like that to make it a little more diverse. So yeah, do you think it has potential to be fun?

BBS Signature

None

Xeptic

Reply To Post Reply & Quote

Posted at: 3/20/09 10:17 AM

Xeptic LIGHT LEVEL 30

Sign-Up: 05/12/05

Posts: 2,165

On a side note: press space to reload. And right now it just spawns 100 enemies (to see if it could handle that). For the actual game it will all be randomly generated )based on how long you've been playing I suppose).

BBS Signature

Misunderstood

Depredation

Reply To Post Reply & Quote

Posted at: 3/20/09 12:11 PM

Depredation LIGHT LEVEL 17

Sign-Up: 09/05/05

Posts: 4,780

At 3/20/09 10:17 AM, Xeptic wrote: On a side note: press space to reload. And right now it just spawns 100 enemies (to see if it could handle that). For the actual game it will all be randomly generated )based on how long you've been playing I suppose).

Brilliant, nice art style, but a little shallow. Try adding more enemy types, eg tanks, planes, and make the pillbox upgradeable, not complexly upgradeable, but heavier guns, flamelwerfers etc.

Fallout 3

Good so far, albeit a little slower than i'm used to. The vats feature is nice though.

BBS Signature

None

crushy

Reply To Post Reply & Quote

Posted at: 3/20/09 01:08 PM

crushy LIGHT LEVEL 15

Sign-Up: 09/17/05

Posts: 1,843

I like it Xeptic, it's not very satisfying when you kill the little guys though, perhaps make their deaths a little more dramatic/obvious and bloody :D

Learning AS3 :D
Help me fix Flash :(

BBS Signature

None

Xeptic

Reply To Post Reply & Quote

Posted at: 3/20/09 01:30 PM

Xeptic LIGHT LEVEL 30

Sign-Up: 05/12/05

Posts: 2,165

Thanks for the feedback guys! I'm going to add more units and some more animations/moves to the soldiers, the ones I have now are just there to test the engine :)

BBS Signature

All times are Eastern Standard Time (GMT -5) | Current Time: 09:33 PM

<< Back

This topic is 1,742 pages long. [ 17471,494 | 1,495 | 1,4961,6191,742 ]

<< < > >>
You need a Grounds Gold Account to post on the NG BBS! If you don't have one, click here to sign up now! It's fast, free, and easy — and opens up tons of great NG features!