At 3/18/09 12:11 PM, Kirk-Cocaine wrote: *whistles innocently*
Fourth time reaching 5000. Do it again, I dare you!
MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...
HO HO HOPE you become a Newgrounds Supporter this year!
We're working hard to give you the best site possible, but we have bills to pay and community support is vital to keep things going and growing. Thank you for considering!
At 3/18/09 12:11 PM, Kirk-Cocaine wrote: *whistles innocently*
Fourth time reaching 5000. Do it again, I dare you!
MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...
Woot, I'm back after my 14 day BBS...Umm..."Holiday".
Ahh, good to be back, not that anyone really cares that I am but you know what...no neither do I.
Must stop trolling and all that crap.
Meh.
BLINK
Just wondering if anyone's ever read the book Blink by Malcolm Gladwell.
Good book, I'd recommend it.
Coding Structure
Just thought this might be kind of cool, but where did everyone learn their coding structure from and how does it look. When I mean structure, I don't mean how things are done necessarily, but how they look. Here's mine [as an example and response]:
var number : uint = #;
function name (a : type) : type
{
}
I just mean spacing and enters and stuff. I learned this style from Gust, although I have small adaptations from this style in different places. Also, anyone use any weird colors and shit?
There probably aren't that many variations that people use, but who knows!?
For those of you who are artists and can't answer this question, go draw a cat or do whatever you artists usually do.
MY E-PENIS IS BIGGER THAN YOURS
8=================================>
...and this is my fag...
At 3/19/09 11:09 AM, El-Presidente wrote: Coding Structure
var a:int = 0;
function do_nothing(count:int):String {
if(count == 0) return "Yes";
return "I don't think so.";
}
Sup, bitches :)
At 3/19/09 11:39 AM, liaaaam wrote: structure
Exactly like that.
At 3/19/09 11:09 AM, El-Presidente wrote: Coding Structure
var k = 23
var t:MovieClip;
var u = [];
//DESCRIPTION OF FUNCTION NORMALLY IN CAPS
function doStuff (bleh){
if(!bleh){
return "NO!";
}
return "MAYBE";
}
Normally my variables are one letter long, which annoys me when I'm looking back on old stuff.
Pausing
Do you think an acceptable way of putting a pause function in a game is just to make the frame rate 0.01? That means there's a frame every 1 minute 40 seconds. That means if you pause something for 5 hours it would have the same effect as leaving it unpaused for 4.5 seconds (assuming the original frame rate was 40)? It's a kinda lazy way of doing it, but it's nice and easy to do.
At 3/19/09 01:41 PM, trig1 wrote: Do you think an acceptable way of putting a pause function in a game is just to make the frame rate 0.01? That means there's a frame every 1 minute 40 seconds. That means if you pause something for 5 hours it would have the same effect as leaving it unpaused for 4.5 seconds (assuming the original frame rate was 40)? It's a kinda lazy way of doing it, but it's nice and easy to do.
You can set it to zero. It's acceptable, but it would be even easier if you managed updates yourself.
function onEnterFrame (_)
{
if (pause) return;
everything.update ();
}
At 3/19/09 01:46 PM, GustTheASGuy wrote: You can set it to zero. It's acceptable, but it would be even easier if you managed updates yourself.
You can't set it to zero using the stage.frameRate, if you try it automatically converts it back to 0.01. I considered managing the updates like you said, but I've got event listeners flying everywhere so it'd be hard to rewrite everything.
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
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?
// 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.
what
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! (:
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-
At 3/19/09 04:35 PM, The-Super-Flash-Bros wrote: Oooh, coding styles!
Cuddle those braces yo!
Hi there!
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.
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-
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.
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...
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...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...
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.
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.
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
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!
http://www.sendspace.com/file/45pogy
So solid.
I'm getting CS4 through school next year. Whats up with tweeners?
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!
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 :(
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;
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
Sig made by me
Once again i'm falling down a mountain like a metaphor
Here ends another post by the grand master of all things: fluffkomix
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..
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;
Other ways to get 1 or -1.
i = j/Math.abs(j);