00:00
00:00
Newgrounds Background Image Theme
Upgrade Your Account!

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!

Become a Supporter so NG can see another Christmas!

The Flash 'Reg' Lounge

3,084,322 Views | 60,186 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2009-09-05 20:12:16


At 9/5/09 07:34 PM, K-Guare wrote:
At 9/5/09 06:09 PM, Duchednier wrote: Moxies is a restaurant, its been around forever :)
Well no wonder I haven't heard of it. :]

We're practically on opposite sides of the country


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-05 20:54:49


At 9/5/09 08:12 PM, Magical-Zorse wrote: We're practically on opposite sides of the country

Well now it seems I now have two reasons to
be a little sad about not living closer to the other corner of the states.

The other reason is PAX, lol.

what

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 04:08:35


Speed Test
For loop verse while loop.

For loop:

for(var i:int = 0; i < 1000000000; i++) { }

Results:

6956 6779 6830 average = 6855

While loop:

var i:int = 0; while ( i < 1000000000) { i++ }

Results:

6826 6777 6798 average = 6800.333

Strange indeed. The while loop is slightly faster than the for.


"To live is the rarest thing in the world. Most people exist, that is all."

- Oscar Wilde

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 05:30:33


At 9/6/09 04:08 AM, Deadclever23 wrote: Strange indeed. The while loop is slightly faster than the for.

Crazy Flash.
Y'know what's even faster than them, though? Do..while is faster than both, and for..in is even faster (although, there are less opportunities to use for..in)!
Or, at least I think that's the usual case in AS2; I've never tested it myself.

However, it looks like it depends a lot on what you are doing in the loop. Take a look at this. And if it looks like I don't know what I'm talking about, I probably don't.


Doomsday-One, working on stuff better than preloaders. Marginally.

Response to The Flash 'Reg' Lounge 2009-09-06 05:59:45


At 9/5/09 11:39 AM, Glaiel-Gamer wrote:
At 9/5/09 04:02 AM, Deadclever23 wrote:
At 9/5/09 03:14 AM, angryglacier wrote:
At 9/5/09 02:59 AM, Glaiel-Gamer wrote: in game screencap
Oh yeah and your game crashed in the middle of pax what made it do that?
I thought you said it ran perfectly on your own OS, Glaiel?
I dunno what's going on. The game doesnt crash, their monitor and my computer don't get along

The AV guy brought us a new cable today. Game has not hiccuped since, so it was the cable after all.

Response to The Flash 'Reg' Lounge 2009-09-06 07:25:08


Your speed test is quite simply, not true. There is absolutely no difference at all between your two loops, not even in bytecode, they produce (even under flash's shitty compiler) the exact same bytecode.

More likely, it is a result of running the swf inside of flash, forcing debug mode even if the swf isn't compiled for debugging, and the extra time is spent on processing an extra line of code.

Response to The Flash 'Reg' Lounge 2009-09-06 07:37:09


Whats up with the featured art section then? :D

cocks

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 07:48:29


At 9/6/09 04:08 AM, Deadclever23 wrote: Speed Test
For loop verse while loop.

For loop:

for(var i:int = 0; i < 1000000000; i++)
{
}

Results:

6956
6779
6830

average = 6855

While loop:

var i:int = 0;
while ( i < 1000000000)
{
i++
}

Results:

6826
6777
6798

average = 6800.333

Strange indeed. The while loop is slightly faster than the for.

Numbers don't mean anything without units. What's 6826? 6826 milliseconds? There doesn't even seem to be any significant difference between the average for both loops. 6855/6800 is 1.008, a difference so negligible that even some of the values within the same type of loop vary more, like 6826 and 6777. This clearly suggests that whatever difference there is between the two types of loops is purely coincidental due to the random factors that could affect your result. I don't know about these small technical events in great depth, but I assume that things such as your CPU doing a little bit more work during one of the tests for background programs could affect the result by a tiny bit, or maybe it can be physical conditions related to your hardware. I cannot answer with certainty what exactly causes those variations in your values, but it seems pretty obvious that whatever the difference may be, it is not in structure of your code. I would expect the same results if you were to replace the while loop by a for loop (thus comparing for to itself, showing it to be impossible that the difference is in code structure)

Moreover, I find it absurd that each of your values contains 4 significant numbers, yet the average contains 7. When handling values of limited precision, all operations done to them must yield a number with the same amount of significant numbers, or else the result is flawed in the sense that you added imaginary numbers that were not included. (ie: 6777.000 insteado f 6777)


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 07:49:07


At 9/6/09 07:37 AM, Jimp wrote: Whats up with the featured art section then? :D
cocks

Egoraptor and Canas got phished by www.nevvgrounds.com ('w' was replaced by two 'v's) apparantly.
People were descouted, but that's about it.
Thread


Doomsday-One, working on stuff better than preloaders. Marginally.

Response to The Flash 'Reg' Lounge 2009-09-06 08:19:45


At 9/6/09 07:48 AM, Toast wrote: There doesn't even seem to be any significant difference between the average for both loops. 6855/6800 is 1.008, a difference so negligible that even some of the values within the same type of loop vary more, like 6826 and 6777.

Exactly. Fuck the fourth significant figure :p

So long as we're on the subject of coding, does anyone know the best way of shuffling an array in Flash? Not that it makes too much of a difference in this particular case, but shuffling always throws up some interesting solutions.


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 09:29:22


At 9/6/09 08:19 AM, Paranoia wrote: So long as we're on the subject of coding, does anyone know the best way of shuffling an array in Flash? Not that it makes too much of a difference in this particular case, but shuffling always throws up some interesting solutions.

First I thought you could assign a random number to each value and then sort the values depending on their random number, but that would be inefficient since no sorting algorithms can sort a list in linear time. here's what i managed to do in linear time:

import random import math def shuffle(a): n = len(a) l = [] while(n>0): rng = int(math.floor(random.random()*n)) l.append(a[rng]) a.pop(rng) n -= 1 return l

I wrote it in python but it's easy to understand even if you're not fluent with the language. It simply creates a new empty array and chooses a random value from the first array, inserts it to the second array, and removes it from the first array. It takes exactly n steps to shuffle a list of n values

(def = function, len = length, append = push)


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 09:47:10


I'm back baby(s).

Speed Tests

Surely any pc that can run vista can afford the extra few milleseconds to process what you want. In C++ and proper engine coding it would be a vast chasm, but with flash it is not even an inconvenience to the player.

I agree optimization is vital, but shaving thousands of seconds off will not make your game any better.

Fastest Coding Language

On the topic of SPEEEEEED, what is the fastest (as in runtime computation) language? I've heard F# is near the top, but apparently C++ is better at rendering in real time. I've set a target to learn a proper programming language (ie. C++/C#) by christmas, and was just wondering what are the pros/cons of them.

Also, what i miss?

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 10:31:05


Toast: don't make a second array, dumbass.

At 9/6/09 09:47 AM, Depredation wrote: On the topic of SPEEEEEED, what is the fastest (as in runtime computation) language? I've heard F# is near the top, but apparently C++ is better at rendering in real time.

F# is a .NET language, meaning the runtime is the same as C#. It uses abstractions to do things like loops so it's normally slower even. And Mono is much slower than .NET.
Overall C++ is the 'fastest'.

I've set a target to learn a proper programming language (ie. C++/C#) by christmas, and was just wondering what are the pros/cons of them.

Like for the fifth time?
Either way, speed is not a factor you should be looking at.


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 12:20:29


At 9/6/09 10:31 AM, GustTheASGuy wrote: Like for the fifth time?
Either way, speed is not a factor you should be looking at.

I'm a busy man. I'm guessing starting AS's won't make it any less busy.

It was just out of interest, i don't plan on learning something for the extra few milliseconds cut off proccessing time.

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 12:27:20


did everyone discussing that speed test completely disregard my post? THERE IS NO DIFFERENCE

Response to The Flash 'Reg' Lounge 2009-09-06 12:31:56


haha, egoraptor got hacked and everyone got unscouted, fuck

Response to The Flash 'Reg' Lounge 2009-09-06 13:21:41


At 9/6/09 10:31 AM, GustTheASGuy wrote: Toast: don't make a second array, dumbass.

very well then.

def shuffle(a): n = len(a) while(n>0): rng = int(round(random.random()*(n-1))) a[rng], a[n-1] = a[n-1], a[rng] n -= 1 return a

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 13:47:12


At 9/6/09 01:13 PM, angryglacier wrote: Was egorapter really hacked or is this a joke? Please tell me this is a joke.

He wasn't hacked, he got phished.

Oh noes! Someone famous was hacked, I'm so sad :(

get over it


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 13:48:06


At 9/6/09 12:27 PM, dELtaluca wrote: did everyone discussing that speed test completely disregard my post? THERE IS NO DIFFERENCE

I didn't.
I respect and appreciate your knowledge of bytecode; I think it's awesome.

I'm not being sarcastic, in case you were wondering

Doomsday-One, working on stuff better than preloaders. Marginally.

Response to The Flash 'Reg' Lounge 2009-09-06 13:49:24


At 9/6/09 01:47 PM, Magical-Zorse wrote: He wasn't hacked, he got phished.

Yeah i always find it funny when people get someones password then claim to be a badass hacker...


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 13:53:34


At 9/6/09 01:21 PM, Toast wrote: very well then.

No.

def shuffle (lst): l = len (lst) for n in range (0, l): r = randint (0, l) lst [n], lst [r] = lst [r], lst [n]

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 14:01:46


At 9/6/09 01:53 PM, GustTheASGuy wrote:
At 9/6/09 01:21 PM, Toast wrote: very well then.
No.

def shuffle (lst):
l = len (lst)
for n in range (0, l):
r = randint (0, l)
lst [n], lst [r] = lst [r], lst [n]

That's retarded. The only difference is that you use a for loop instead of while and you use a different method for getting a random number. My knowledge in python is limited so I accept your version of the random number generator, but there's absolutely no differnence besides that. I started off with a while loop for the first version of shuffling I tried and then I modified it to a better version which didn't require while loop (the first one i posted here), but the results are identical. I could go on a "who can write the shortest algorithm" war with you and you'd probably win due to your more extended knowledge and experience, but the algorithm I posted was perfectly fine.


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 14:29:47


At 9/6/09 01:48 PM, Doomsday-One wrote:
I'm not being sarcastic, in case you were wondering

That's even sadder though.

At 9/6/09 02:01 PM, Toast wrote: I could go on a "who can write the shortest algorithm" war with you and you'd probably win due to your more extended knowledge and experience, but the algorithm I posted was perfectly fine.

It's annoying! 8|
I haven't used Python, had to look at your version to get it right.


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 18:03:35


At 9/6/09 02:29 PM, GustTheASGuy wrote: That's even sadder though.

Have you ever watched the show House? I can imagine you as hugh laurie for some reason, highly intelligent, and very brash.

Game Test

I fiddled a little more with my BEAT (audiosurf clone) game. My beat detection is still hit and miss because i can't pre-calculate anything with flashes crappy tools.

Click to start, choose an mp3 (something with a good beat) and play. It's still unbelievably glitchy/laggy at times because i've chucked in a lot of effects and haven't controlled how many can spawn at a given time yet.

Collect the colours and press space to deposit.

http://depredationdesigns.deviantart.com /art/Flash-Audiosurf-133122897

Good types of songs:-

http://www.youtube.com/watch?v=TcoKxYv8N CQ
http://www.youtube.com/watch?v=Uqxo1SKB0 z8

The Flash 'Reg' Lounge


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 19:35:37


At 9/6/09 06:03 PM, Depredation wrote:
At 9/6/09 02:29 PM, GustTheASGuy wrote: That's even sadder though.
Have you ever watched the show House? I can imagine you as hugh laurie for some reason, highly intelligent, and very brash.

I can't believe I haven't noticed this before,
you're totally right.
That's a great show, by the way.
Hugh Laurie pulls off a great accent.


what

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 19:45:52


At 9/6/09 06:03 PM, Depredation wrote: Have you ever watched the show House? I can imagine you as hugh laurie for some reason, highly intelligent, and very brash.

I've never watched House but I love Hugh Laurie. I've been watching Blackadder recently so my view of Hugh Laurie at the moment is of a loveable simpleton.

One of the episodes of season 3 of Blackadder has Rowan Atkinson, Hugh Laurie, Stephen Fry, Rik Mayall and Ade Edmonson.. it's like a who's who of liam's favourite comedians ;) I mean.. 1980-1990 era favourite comedians, at least =P


Sup, bitches :)

BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 22:19:02


You guys remember the game that me and Argentin had such a hard time getting sponsored? Well, we finally gave up on the hunt and released the game with just ads, perhaps we might be able to sell a non-exclusive or two with some luck.

Sympathy-five? :)

The Flash 'Reg' Lounge

Response to The Flash 'Reg' Lounge 2009-09-06 22:50:23


At 9/6/09 10:19 PM, knugen wrote: You guys remember the game that me and Argentin had such a hard time getting sponsored? Well, we finally gave up on the hunt and released the game with just ads, perhaps we might be able to sell a non-exclusive or two with some luck.

Sympathy-five? :)

It's finally out :3


BBS Signature

Response to The Flash 'Reg' Lounge 2009-09-06 23:49:42


At 9/6/09 10:50 PM, Magical-Zorse wrote: It's finally out :3

Yay :)

Guys, it seems like it's really tight on the dailies.. A little help would be awesome ;)

Response to The Flash 'Reg' Lounge 2009-09-07 00:43:04


At 9/6/09 10:19 PM, knugen wrote: Sympathy-five? :)

You had this game up on fgl for how long? It seems like a game that wouldn't be too hard to find a sponsor for... at least a lesser known one.


BBS Signature