00:00
00:00
Newgrounds Background Image Theme

Probagfya just joined the crew!

We need you on the team, too.

Support Newgrounds and get tons of perks for just $2.99!

Create a Free Account and then..

Become a Supporter!

The Flash 'Reg' Lounge

3,045,599 Views | 60,185 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2010-11-05 23:21:44


At 11/5/10 08:25 PM, Luis wrote: Ummm if anyone is in dublin next week you should come and hang out!
I have to remind myself that essentially the meets really started here in this forum/thread. And my heart and liver is still here.

If by Dublin you mean California, then yes.


BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-06 13:09:10


app


Quack!

Woundersplenndin'!

BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-06 22:01:20


At 11/6/10 01:09 PM, Faires wrote: app

balls.

Response to The Flash 'Reg' Lounge 2010-11-07 08:22:22


I am starting a Christmas game (so I don't run out of time like I did last year), and I spent the last few hours doing this:

http://www.newgrounds.com/dump/item/1e7f 75de20d43cafdbc094ec6f6ccad4

The Flash 'Reg' Lounge

Response to The Flash 'Reg' Lounge 2010-11-07 08:23:29


At 11/7/10 08:22 AM, Archawn wrote: http://www.newgrounds.com/dump/item/1e7f 75de20d43cafdbc094ec6f6ccad4

Link fail; how did that happen?

Cumulative Snow

Response to The Flash 'Reg' Lounge 2010-11-07 08:39:28


At 11/7/10 08:23 AM, Archawn wrote: Cumulative Snow

Can you show the source for the fps counter? I've never understood how to make them.
Also, to keep fps down are you caching as bitmap?

Response to The Flash 'Reg' Lounge 2010-11-07 10:17:20


At 11/7/10 08:39 AM, Chickumbleh wrote:
At 11/7/10 08:23 AM, Archawn wrote: Cumulative Snow
Can you show the source for the fps counter? I've never understood how to make them.
package { import flash.display.Sprite; import flash.events.Event; import flash.text.TextField; import flash.text.TextFieldAutoSize; import flash.utils.getTimer; public class FPSCounter extends Sprite{ private var last:uint = getTimer(); private var ticks:uint = 0; private var tf:TextField; public function FPSCounter(xPos:int=0, yPos:int=0, color:uint=0xffffff, fillBackground:Boolean=false, backgroundColor:uint=0x000000) { x = xPos; y = yPos; tf = new TextField(); tf.textColor = color; tf.text = "----- fps"; tf.selectable = false; tf.background = fillBackground; tf.backgroundColor = backgroundColor; tf.autoSize = TextFieldAutoSize.LEFT; addChild(tf); width = tf.textWidth; height = tf.textHeight; addEventListener(Event.ENTER_FRAME, tick); } public function tick(evt:Event):void { ticks++; var now:uint = getTimer(); var delta:uint = now - last; if (delta >= 1000) { var fps:Number = ticks / delta * 1000; tf.text = fps.toFixed(1) + " fps"; ticks = 0; last = now; } } } }

To add one:

addChild(new FPSCounter());
Also, to keep fps down are you caching as bitmap?

Each flake is a sprite, and as they hit the pile of snow or the bottom of the screen, they are added to a BitmapData instance and deleted.

Currently they are not cached as bitmaps, as I did not encounter any lag. If it starts to lag, I'll do that--I just don't want to sacrifice CPU usage for a few hundredths of FPS optimization.

Response to The Flash 'Reg' Lounge 2010-11-07 11:19:25


At 11/7/10 08:23 AM, Archawn wrote:
At 11/7/10 08:22 AM, Archawn wrote: http://www.newgrounds.com/dump/item/1e7f 75de20d43cafdbc094ec6f6ccad4
Link fail; how did that happen?

Cumulative Snow

It's amazing what you can do with a little ingenuity. I mean, if I was making snow, I would have just made it fall down the stage and get removed, but for it to pile up like that, I can really see it adding to the game's atmosphere. Good luck with that game!

Response to The Flash 'Reg' Lounge 2010-11-07 13:58:16


I win?

The Flash 'Reg' Lounge

Response to The Flash 'Reg' Lounge 2010-11-07 14:41:14


At 11/5/10 08:25 PM, Luis wrote: Ummm if anyone is in dublin next week you should come and hang out!
I have to remind myself that essentially the meets really started here in this forum/thread. And my heart and liver is still here.

wow since when do you have your face instead if the level icon ?
looks cool..


BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-07 15:20:22


At 11/7/10 10:17 AM, Archawn wrote: Code

Thanks, the code works excellently.

And about Luis' icon, he got employed and there was an art contest.

Response to The Flash 'Reg' Lounge 2010-11-07 16:35:28


At 11/7/10 10:17 AM, Archawn wrote: Currently they are not cached as bitmaps, as I did not encounter any lag. If it starts to lag, I'll do that--I just don't want to sacrifice CPU usage for a few hundredths of FPS optimization.

Awesome engine.
Perhaps I'm completely wrong, but if it does start to lag, perhaps blitting would be useful? Speed of cacheAsBitmap with a significantly decreased memory usage!


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

Response to The Flash 'Reg' Lounge 2010-11-07 16:42:11


Snow
Are you doing the "settling" by spreading it out to the sides if there isn't already snow there or is it more than that?


BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-07 17:08:07


1) Ridiculous CPU usage. Iterating over each pixel in the bitmap? You can represent the snow height with a 1d array.

2) FPS counter is coupled to the textbox. The code that does math should be in a separate unit (class) from Flash garbage.

3) Mike: He'll always have 2d arrays over you? Lol.


BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-07 17:33:53


At 11/7/10 05:08 PM, GustTheASGuy wrote: 1) Ridiculous CPU usage. [...]

You don't come around to spread sunshine and joy nearly enough these days

Response to The Flash 'Reg' Lounge 2010-11-07 22:14:18


At 11/7/10 05:00 PM, HDXmike wrote: What does everyone else here spend their spare money on?

Food, or when I get enough I buy an instrument that I can't play...

At 11/7/10 02:41 PM, patu1 wrote:
At 11/5/10 08:25 PM, Luis wrote: Ummm if anyone is in dublin next week you should come and hang....
wow since when do you have your face instead if the level icon? looks cool..

don't be late | Collab101 | Australian Users List | Nayhan's actionScript examples > click

Response to The Flash 'Reg' Lounge 2010-11-08 09:19:21


At 11/7/10 05:00 PM, HDXmike wrote:
What does everyone else here spend their spare money on?

rent and food and internet


the events are merely fictional, written, directed, and acted out by all who create them

BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-08 12:09:38


At 11/7/10 02:52 PM, HDXmike wrote: Making the snow pile up was easy but then I saw how it settled, I think using bitmap data is the one thing you'll definitely always have over me.
At 11/7/10 05:08 PM, GustTheASGuy wrote: 3) Mike: He'll always have 2d arrays over you? Lol.

And you know, being a better programmer, better looking, better accent, nicer person, etc etc.

Response to The Flash 'Reg' Lounge 2010-11-08 15:17:37


How dare you start a new page!

Response to The Flash 'Reg' Lounge 2010-11-08 16:16:33


At 11/8/10 03:17 PM, BoMToons wrote: How dare you start a new page!

Your momma starts a new page.
In my pants.


"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 2010-11-08 18:43:19


What is the best way to draw a sine curve in flash using only code? I don't think my current method will run well on slower computers.

Response to The Flash 'Reg' Lounge 2010-11-08 19:04:40


At 11/8/10 06:43 PM, Chickumbleh wrote: What is the best way to draw a sine curve in flash using only code? I don't think my current method will run well on slower computers.

Any reason you can't do this?

var resolution:Number = (2 * Math.PI) / 360; var m:Sprite = new Sprite(); addChild(m); m.graphics.lineStyle(1, 0xFF0000, 1); m.graphics.moveTo(0, 0); for(var i:int = 0; i < (2 * Math.PI) / resolution; i++){ m.graphics.lineTo(i, Math.sin(i)*10); }
I just multiplied everything by 10 so the wave can be seen.

Response to The Flash 'Reg' Lounge 2010-11-08 19:18:06


At 11/8/10 07:04 PM, Archawn wrote:
At 11/8/10 06:43 PM, Chickumbleh wrote: What is the best way to draw a sine curve in flash using only code? I don't think my current method will run well on slower computers.
Any reason you can't do this?

var resolution:Number = (2 * Math.PI) / 360;

var m:Sprite = new Sprite();
addChild(m);

m.graphics.lineStyle(1, 0xFF0000, 1);
m.graphics.moveTo(0, 0);

for(var i:int = 0; i < (2 * Math.PI) / resolution; i++){
m.graphics.lineTo(i, Math.sin(i)*10);
}

I just multiplied everything by 10 so the wave can be seen.

Wow thanks, I had my waves made of hundreds of circle with radii of 1 px, your method makes much more sense. Thanks again.

Also, is the 10KB game challenge still open?

Response to The Flash 'Reg' Lounge 2010-11-08 19:34:24


At 11/8/10 07:18 PM, Chickumbleh wrote: Also, is the 10KB game challenge still open?

Nah, it ended a while ago and only three of the ten users that joined sent me their source code for the approval process and compilation.

It's a shame. Hopefully if I start something similar in the future, more people will cooperate.

Response to The Flash 'Reg' Lounge 2010-11-08 19:51:51


tada. Archawn's thing looked funny because it was using degree's in the sin function!

sinCurve(100, 5, 4); public function sinCurve(amplitude:Number, frequency:Number, cycles:Number):void { var curve:Sprite = new Sprite(); addChild(curve); curve.graphics.lineStyle(1, 0xFF0000, 1); curve.graphics.moveTo(0, 200); for(var i:int = 0; i < 360*cycles; i++) { curve.graphics.lineTo(i/frequency, 200 + Math.sin(i*2*Math.PI/360)*amplitude); } }

Anyway... I've got a game near complete bar the sounds and I'm having a hard time tweaking the difficulty, flow of the game etc ( Either get overwhelmed to quickly or not enough enemies and its to easy). Wondering if anyone would be interested in taking it out for a test drive!I'll send the link for it on the test grounds. It's an 'into' screen shooter kinda like space harrier.

There's a neat picture in me profile.

Cheers!

Response to The Flash 'Reg' Lounge 2010-11-08 20:05:29


At 11/8/10 07:51 PM, SantoNinoDeCebu wrote: tada. Archawn's thing looked funny because it was using degree's in the sin function!

Yeah, I'm so used to thinking in degrees. Also I'm lazy.

Response to The Flash 'Reg' Lounge 2010-11-08 22:20:29


hey everybody

poop

that is all

Response to The Flash 'Reg' Lounge 2010-11-09 03:04:42


At 11/8/10 10:20 PM, Glaiel-Gamer wrote: poop

Your Mum has poop.
In a cup.


"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 2010-11-09 09:33:13



The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature

Response to The Flash 'Reg' Lounge 2010-11-09 17:15:55


At 11/9/10 03:04 AM, Deadclever23 wrote:
At 11/8/10 10:20 PM, Glaiel-Gamer wrote: poop
Your Mum has poop.
In a cup.

two glaiels one cup