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,083,135 Views | 60,186 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2014-02-02 20:17:43


At 2/2/14 07:21 PM, Diki wrote: If anyone here reads the Programming Regs Lounge thread you'll know that lately I've been doing a lot of tinkering with socket servers and clients, which has mostly been in C++, Python and JavaScript. I recently reinstalled Java, which the Flex SDK requires to compile to SWF, so that I could play around with sockets in AS3. Anyone who has used WebSockets before will know that the WebSocket protocol is very tedious to implement, which is one of the main reasons I opted to play around in AS3 for.

As much as I love C++ I just have to say network code is 6000% easier in a language that has built in reflection like C#. Holy shit. I've been working on my own multiplayer game for the past year (it's coming together, been blogging about it too http://blog.bombernauts.com/)

its... a lot easier than I thought it would be, but certainly has a lot of different challenges compared to single player coding.

Response to The Flash 'Reg' Lounge 2014-02-02 20:26:06


At 2/2/14 07:58 PM, egg82 wrote: UDP IS supported. It's the DatagramSocket class. TCP servers and UDP sockets are only supported in AIR, however. TCP clients work just fine in the regular web Flash player.

And I'm not using or targeting AIR, which is why I said I can't use UDP. I never said UDP isn't supported by AS3, I said it's not supported by Flash Player.

Not that I would want to use UDP even if I could since I need my server to implement TCP.

At 2/2/14 07:58 PM, egg82 wrote: Flash is actually more tedious than most languages in the fact that you need to do some odd security stuff for our client/server communication to actually work beyond localhost.

That would be the trivial policy request message that needs to be responded to with a tiny blurb of XML that I was referring to, which I would not describe as tedious. It takes like four lines of code for my server to handle that. You don't need to use the Security.loadPolicyFile() function (I'm not), though you can if you want to.

If you want tedious try implementing the WebSocket protocol, specifically the opening handshake.

At 2/2/14 08:17 PM, Glaiel-Gamer wrote: As much as I love C++ I just have to say network code is 6000% easier in a language that has built in reflection like C#.

No doubt, but I don't know C#, and C++ is the most powerful language that I know which will be able to handle what I'm going to throw at it. I made a proof of concept in Python (this really, really terrible code [seriously it's awful, be afraid]) to see how well it could handle constantly sending and receiving data via TCP, and it only took more than two clients connected for noticeable lag to appear.

Using the Boost.Asio library makes writing networking code a breeze compared to the OS-specified crap you would normally need to use. It took me a couple days of reading to learn how Boost.Asio works, but now that I know it's easy as pie. Not as easy as writing networking code in Python, but still easy nonetheless. I really love Boost.

Response to The Flash 'Reg' Lounge 2014-02-02 20:41:18


At 2/2/14 08:17 PM, Glaiel-Gamer wrote: but certainly has a lot of different challenges compared to single player coding.

I noticed that while making my proof of concept in Python and AS3. It was only a "game" that had you connect to the server, and gave you a character that was a black square which you could move around with WASD. Anyone else connected could see your box move around in real-time, and they yours. It didn't do anything other than that, but it was enough for me to know that Python isn't even close to powerful enough for what I want to do. I've made client/server relationships before, but never something that required the client to update in real-time, which was an interesting problem to solve.

Nothing as fancy or neat as a functional 3D game, though. I never finished learning 3D math so I tend to screw that stuff up when I attempt it. Took a quick read through your blog and your game looks pretty cool. I'm guessing that there's some Bomberman inspiration in there.

P.S.
I also totally forgot that me and you have the same name. 'Sup, Tyler! I'm Tyler. :)

Response to The Flash 'Reg' Lounge 2014-02-02 21:17:49


At 2/2/14 08:41 PM, Diki wrote: which was an interesting problem to solve.

I'm actually making that very thing :P
except it's real characters instead of black boxes. I've actually got all the netcode worked out for all of it, and it seems to work flawlessly. Er... As flawlessly as UDP can, anyway.

You know, doing netcode is surprisingly a lot of fun. Like, the most fun I've had with programming in a very long time. There's always new challenges to solve like latency or security and it's really great figuring out new things!


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-02 21:33:36


At 2/2/14 09:17 PM, egg82 wrote: You know, doing netcode is surprisingly a lot of fun. Like, the most fun I've had with programming in a very long time. There's always new challenges to solve like latency or security and it's really great figuring out new things!

I have fun programming when I'm not doing UI or cutscene/dialogue stuff. So lots of fun at the start of the rpg, not so much now.

Response to The Flash 'Reg' Lounge 2014-02-02 22:33:53


At 2/2/14 09:33 PM, MSGhero wrote: I have fun programming when I'm not doing UI or cutscene/dialogue stuff. So lots of fun at the start of the rpg, not so much now.

I'm STILL trying to figure out how to get events to fire through Worker threads, it's not going well :/
That's the only thing holding all of this back. Otherwise, client modding's done and I can get the UI out of the way.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-02 22:52:48


Holy crap, get the latest dev version of FD. The continue button is always enabled now, and it runs the current swf in the debugger rather than rebuilding it. Maybe it's only relevant to what I'm currently doing, but it's so convenient wow.

Response to The Flash 'Reg' Lounge 2014-02-02 23:11:39


At 2/2/14 10:33 PM, egg82 wrote: I'm STILL trying to figure out how to get events to fire through Worker threads, it's not going well :/

Multi-threading is a colossal bitch, which is why I'm not using it on my server. I didn't even know that AIR supported threading. Even Flash Player 11.4 supports it, apparently. Not that I can say I would want to mix Flash Player and threading.

What do you need threading for anyway? It's pretty easy to screw that up even if you're not using a language that is built around functions being called asynchronously.

At 2/2/14 10:52 PM, MSGhero wrote: Holy crap, get the latest dev version of FD. The continue button is always enabled now, and it runs the current swf in the debugger rather than rebuilding it. Maybe it's only relevant to what I'm currently doing, but it's so convenient wow.

Which version is that? I have 4.5.2.5 running right now, which appears to be the latest version, but I'm too lazy to download the latest version from the site to find out (and they only have the version listed as 4.5.2 so I don't know what the fuck).

Response to The Flash 'Reg' Lounge 2014-02-02 23:24:02


At 2/2/14 11:11 PM, Diki wrote: Multi-threading is a colossal bitch, which is why I'm not using it on my server. I didn't even know that AIR supported threading. Even Flash Player 11.4 supports it, apparently. Not that I can say I would want to mix Flash Player and threading.

The latest FD also has a panel for active threads, not that I actually need that.

Which version is that? I have 4.5.2.5 running right now, which appears to be the latest version, but I'm too lazy to download the latest version from the site to find out (and they only have the version listed as 4.5.2 so I don't know what the fuck).

4.6.0.45, in sync with the latest github commit. They do continuous building or something so that the commits update the exe and zip. Of course this is the super beta made 5 hours ago version.

Response to The Flash 'Reg' Lounge 2014-02-02 23:27:37


At 2/2/14 11:11 PM, Diki wrote: What do you need threading for anyway? It's pretty easy to screw that up even if you're not using a language that is built around functions being called asynchronously.

Basically you use the Worker, WorkerDomain, and MessageChannel classes.
A worker is literally just another Flash program running in a separate virtual thread. Except it's invisible.

I'm using it for mods. Each mod works on its own thread. Dunno if it's a good idea, but I figure why the hell not? The thing I'm making with it now is just for experimentation and fun, anyway.

At 2/2/14 10:52 PM, MSGhero wrote: Holy crap, get the latest dev version of FD. The continue button is always enabled now, and it runs the current swf in the debugger rather than rebuilding it. Maybe it's only relevant to what I'm currently doing, but it's so convenient wow.

Ooh, that sounds really nice! Are workers still screwed in the dev build?

Which version is that? I have 4.5.2.5 running right now, which appears to be the latest version, but I'm too lazy to download the latest version from the site to find out (and they only have the version listed as 4.5.2 so I don't know what the fuck).

Help->Check For Updates will get you the latest release build, pretty much all you need to know unless you want the dev builds, in which case your browse the FD forums which are on their site somewhere.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-02 23:34:16


At 2/2/14 11:27 PM, egg82 wrote: Ooh, that sounds really nice! Are workers still screwed in the dev build?

Not a clue. FD went up a whole minor version AND there's a panel dedicated to threads that automatically shows up when you run the swf.

Response to The Flash 'Reg' Lounge 2014-02-02 23:48:14


At 2/2/14 11:24 PM, MSGhero wrote: 4.6.0.45, in sync with the latest github commit.

How did you even find that downloads page? The links on their website just go to their forums. Either way I'll probably check it out since a quality debugger is a very handy tool.

At 2/2/14 11:27 PM, egg82 wrote: I'm using it for mods. Each mod works on its own thread. Dunno if it's a good idea, but I figure why the hell not? The thing I'm making with it now is just for experimentation and fun, anyway.

If it's just for experimentation then there's certainly nothing wrong with that. Personally I would never use multi-threading unless I absolutely needed to. They really are a wily beast.

Though I can answer the question "why the hell not?" by saying: because multi-threading is a pain in the ass. :)

Response to The Flash 'Reg' Lounge 2014-02-02 23:57:26


At 2/2/14 11:48 PM, Diki wrote: How did you even find that downloads page? The links on their website just go to their forums. Either way I'll probably check it out since a quality debugger is a very handy tool.

Forums > main > latest dev version. I think they linked to it on twitter or something idr.

Response to The Flash 'Reg' Lounge 2014-02-03 00:14:45


At 2/2/14 11:57 PM, MSGhero wrote: Forums > main > latest dev version. I think they linked to it on twitter or something idr.

I'm not seeing any immediate differences other than the fact that it's using a blinding white color scheme rather then my usual charcoal grey.
Threads panel either doesn't work the way we think it should or is currently broken because when loading ~10 mods on the server it shows only the main thread. (Should be one thread per mod)

This is all in an AIR app, though, so keep that in mind. It might be that you just need to re-compile AIR stuff all the time.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-03 00:20:46


At 2/3/14 12:14 AM, egg82 wrote: I'm not seeing any immediate differences other than the fact that it's using a blinding white color scheme rather then my usual charcoal grey.

Certain system things like giving permission for an exe to run cause flux to turn off for a second or two. In those seconds at this time of night, my eyes are in intense pain.

Response to The Flash 'Reg' Lounge 2014-02-03 00:30:38


Before you sleep or go to lunch or tea or whatever time it is, this video of sorting algos is amazing.

Response to The Flash 'Reg' Lounge 2014-02-03 12:10:51


Now runs on Starling... next up: 3v3 CTF multiplayer, really wish I had an artist though :P

Bandwidth goal: ~45kb p/minute

http://www.newgrounds.com/dump/item/3fb64aa28655a3c52a0db72aaa01c16d

Response to The Flash 'Reg' Lounge 2014-02-03 20:47:40


At 2/3/14 04:13 AM, Innermike wrote:
At 2/3/14 12:30 AM, MSGhero wrote: Before you sleep or go to lunch or tea or whatever time it is, this video of sorting algos is amazing.
Dat bogo

bogobogosort is better http://www.dangermouse.net/esoteric/bogobogosort.html

Response to The Flash 'Reg' Lounge 2014-02-03 20:55:53


At 2/3/14 08:47 PM, Glaiel-Gamer wrote: bogobogosort is better http://www.dangermouse.net/esoteric/bogobogosort.html

Hahahaaaa!

Now O(n!n-k) is much better than your guess of O(n!n!), making bogobogosort even more attractive.

Response to The Flash 'Reg' Lounge 2014-02-03 22:30:51


At 2/3/14 08:47 PM, Glaiel-Gamer wrote: bogobogosort is better http://www.dangermouse.net/esoteric/bogobogosort.html

That was the most hilarious thing I've ever read that none of my friends will understand any of :D


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-05 00:01:37


At 2/3/14 08:47 PM, Glaiel-Gamer wrote:
At 2/3/14 04:13 AM, Innermike wrote:
At 2/3/14 12:30 AM, MSGhero wrote: Before you sleep or go to lunch or tea or whatever time it is, this video of sorting algos is amazing.
Dat bogo
bogobogosort is better http://www.dangermouse.net/esoteric/bogobogosort.html

Wow, dat sig...

Response to The Flash 'Reg' Lounge 2014-02-05 00:12:37


Apparently my laptop fan heard me smack talking it so now it's making a grinding noise. If I hit it, it stops for a while. I actually spent a while taking the whole thing apart to clean the fan (I literally have to take everything out except the speakers to reach the fan), but that didn't help.

On the bright side, I learned what the inside of a laptop looks like. And it still works.

Response to The Flash 'Reg' Lounge 2014-02-05 01:20:47


At 2/5/14 12:12 AM, MSGhero wrote: Apparently my laptop fan heard me smack talking it so now it's making a grinding noise. If I hit it, it stops for a while. I actually spent a while taking the whole thing apart to clean the fan (I literally have to take everything out except the speakers to reach the fan), but that didn't help.

On the bright side, I learned what the inside of a laptop looks like. And it still works.

Do you by any chance have a hp Pavilion Laptop??? My roommate had the same problem. The noisy fan became apart of the apartment family and I called him Greg. He always had something to say, until my roommate would flick him with his finger. Then he would be quite for a little while.


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-05 02:54:00


At 2/5/14 12:12 AM, MSGhero wrote: Apparently my laptop fan heard me smack talking it so now it's making a grinding noise.

I tried to record my piano playing using a microphone and an old ASUS laptop. There was nothing I could do to remove the fan noise form the recording, no matter what distance from the microphone to the laptop.

Response to The Flash 'Reg' Lounge 2014-02-05 09:26:37


At 2/5/14 01:20 AM, swishcheese wrote: Do you by any chance have a hp Pavilion Laptop??? My roommate had the same problem. The noisy fan became apart of the apartment family and I called him Greg. He always had something to say, until my roommate would flick him with his finger. Then he would be quite for a little while.

Of course it's an issue with pavilion >.> My warranty just expired or is about to expire soon. Dod he ever fix it or did he have issues at all? I found a video of the same noise and the guy put grease in the fan bearings. I'll just bring it somewhere so I won't have to take it apart again.

Response to The Flash 'Reg' Lounge 2014-02-05 10:11:28


At 2/5/14 02:54 AM, kkots wrote: I tried to record my piano playing using a microphone and an old ASUS laptop. There was nothing I could do to remove the fan noise form the recording, no matter what distance from the microphone to the laptop.

You could filter it out if you have any decent audio editing software (e.g. Adobe Audition) by taking a 5-10 second recording of just the background noise, and then applying it the recording of your piano. Might make the recording sound a little bit "off", but it will remove most of the background noise.

At 2/5/14 06:33 AM, PSvils wrote: Em...you mean static noise probably coming from your sound card?

However, if it's being caused by that, or your microphone, then you can't do anything about it.

Response to The Flash 'Reg' Lounge 2014-02-05 10:31:57


At 2/5/14 06:33 AM, PSvils wrote: Em...you mean static noise probably coming from your sound card?

Nope. The wrRRRROOOOOOoommmmm..... *silence for a bit* ....wwwrrrRRRROOOOOOOMMmmmmmm..... *silence for a bit* *repeat*. This noise is actually coming from the laptop. I really found it funny, how I'm playing something in the recording, then there I can hear this wwwrrrRROOOOOOOooomm in the background, it's damn funny.

Response to The Flash 'Reg' Lounge 2014-02-05 11:45:11


At 2/5/14 06:33 AM, PSvils wrote: Em...you mean static noise probably coming from your sound card?

Could be an issue, which is why I use USB instead of relying on my internal card. Using a professional mic also helps.

At 2/5/14 10:11 AM, Diki wrote: You could filter it out if you have any decent audio editing software (e.g. Adobe Audition) by taking a 5-10 second recording of just the background noise, and then applying it the recording of your piano. Might make the recording sound a little bit "off", but it will remove most of the background noise.

40% reduction or 60% reduction is ideal, depending on various situations.


Programming stuffs (tutorials and extras)

PM me (instead of MintPaw) if you're confuzzled.

thank Skaren for the sig :P

BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-05 13:38:49


At 2/5/14 09:26 AM, MSGhero wrote: Of course it's an issue with pavilion >.> My warranty just expired or is about to expire soon. Dod he ever fix it or did he have issues at all? I found a video of the same noise and the guy put grease in the fan bearings. I'll just bring it somewhere so I won't have to take it apart again.

Lol. He took his apart too. We all being Computer Science Majors. But he couldn't fix it because it was something inside the fan. Not something blocking it like dust or something. He put it back together and still worked. Then over winter break sent it in to get fix and built his own desktop. When he got the Pavilion back it was fixed, but he said for some reason they replaced the motherboard too. Idk, if they F'd up trying fix fan and had to replace motherboard because of it. Or it was just old and was not the best. But he still has all his files which was the important thing for him.


BBS Signature

Response to The Flash 'Reg' Lounge 2014-02-05 14:21:21


At 2/5/14 01:38 PM, swishcheese wrote: When he got the Pavilion back it was fixed, but he said for some reason they replaced the motherboard too. Idk, if they F'd up trying fix fan and had to replace motherboard because of it. Or it was just old and was not the best. But he still has all his files which was the important thing for him.

The fan is attached to the motherboard, so it's possible it got messed up when trying to fix/replace the fan.