00:00
00:00
Newgrounds Background Image Theme

Bowtotheman 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

2,914,568 Views | 60,181 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2013-03-05 14:16:18


At 3/5/13 01:56 PM, Rustygames wrote: You might be right, I will add a little man to follow the path and try the 2 methods and we'll see which one is nicest.

If the man only goes 4 directions, yeah, it would be awkward.

Response to The Flash 'Reg' Lounge 2013-03-05 14:21:58


At 3/5/13 02:16 PM, ImpotentBoy2 wrote:
At 3/5/13 01:56 PM, Rustygames wrote: You might be right, I will add a little man to follow the path and try the 2 methods and we'll see which one is nicest.
If the man only goes 4 directions, yeah, it would be awkward.

Yeah no diagonals at the moment. I suppose I should add them, it won't be hard. I just want to remove diagonals which must go through a wall otherwise it could look a little weird


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-05 14:36:02


At 3/5/13 12:33 PM, Rustygames wrote:
At 3/5/13 09:06 AM, Wolfos wrote: Anyone who'd like an RPG engine?
http://wolfos.org/resources/RPGWeb.swf

I'm working on a game and I'll open source the engine.
That's really cool. I was actually working on an isometric engine like this the other day. It's an air app so I could make use of file access and save/load maps.

File save isn't in there yet but I've got file loading. Basically I'm using embed right now but I think I'll use loadurl instead (at least for the editor).
https://github.com/Wolfos/WolfEngine-Flash

Response to The Flash 'Reg' Lounge 2013-03-05 16:30:51


I could use some help on my rhythm game. It would be nice to know if I'm going in the right direction. basically I'm tracking getTimer() every frame, and I representing time in units of beats where

static public var beat:Number;
static public function update():void {
	var t:int = getTimer();
	if (int(t / 60000 * beatsPerMinute) - int(beat) >= 1)
		dispatchEvent(new BeatEvent(BeatEvent.ON_BEAT));
	beat = t / 60000 * beatsPerMinute;
}

Then all of my objects are positioned based on there speed, which is in pixels per beat. so the update will look like:

x = spawn.x + speed.x*(BeatKeeper.beat-spawnBeat);

all of the objects will move linearly.

So, if I have a backing track in a level, will my objects eventually go out of sync with it?

Response to The Flash 'Reg' Lounge 2013-03-05 16:47:24


At 3/5/13 04:30 PM, ImpotentBoy2 wrote: I could use some help on my rhythm game.

forgot to mention. the assets are spawned so that will will reach the player on a specific beat. the level xml will specify which beat they will reach the player, and they spawned to the right of the stage, X amount of beats before their intended impact.

Response to The Flash 'Reg' Lounge 2013-03-05 18:52:52


At 3/5/13 03:46 PM, PSvils wrote:
At 3/5/13 12:29 PM, Rustygames wrote: Hey guys, just grabbed the source for that A* thing I was talking about and added in stairs.

Here is the version without searching for stairs first:
http://www.newgrounds.com/dump/item/4c2cd0743cc06d64adf10e0c 291786ac
You have the heuristic estimate in this first one horribly wrong! It seems like you are treating the goal's x/y as if it's on the same level...

Like I said, the heuristic estimate is the shortest combined distance of start>stair + stair>goal. And then let A* do the rest. Not sure what you're doing right now in the second version though...seems like you're jumping through an unnecessary loop.

P.

Yeah so the first one is using Glaiel's idea of "x distance + y distance + level distance*10". As you can see it yields less than desirable results!

The second one literally finds 2 paths. Start to stair, then stair to end (unless it's single level then it just goes start to end). I like your idea of actually still calculating just the 1 path and using start to stair and stair to end combined as the heuristic; I think it will yield the same result but quicker, I'll try it out tomorrow and let you know how it goes.

Then I better just post the source so everyone can have a play :)


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-06 08:21:25


At 3/5/13 03:46 PM, PSvils wrote:
At 3/5/13 12:29 PM, Rustygames wrote: Hey guys, just grabbed the source for that A* thing I was talking about and added in stairs.

Here is the version without searching for stairs first:
http://www.newgrounds.com/dump/item/4c2cd0743cc06d64adf10e0c 291786ac
You have the heuristic estimate in this first one horribly wrong! It seems like you are treating the goal's x/y as if it's on the same level...

Like I said, the heuristic estimate is the shortest combined distance of start>stair + stair>goal. And then let A* do the rest. Not sure what you're doing right now in the second version though...seems like you're jumping through an unnecessary loop.

P.

Hey,

So I tested using this method instead of finding separate paths and my results are that it's around 2-2.5 times slower. I think this is mostly due to the more complex heuristic estimates for each branch. I'll stick to splitting the path for now


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-06 16:15:18


At 3/6/13 10:41 AM, PSvils wrote:
At 3/6/13 08:21 AM, Rustygames wrote: Hey,

So I tested using this method instead of finding separate paths and my results are that it's around 2-2.5 times slower. I think this is mostly due to the more complex heuristic estimates for each branch. I'll stick to splitting the path for now
Remember that for any ladder>ladder or ladder>goal distances, they can be calculated once before the pathfinding starts. Could speed up a bit by caching that.

Caching routes (or even heuristics) was something I was thinking about, but I think the initial overhead (or the data loading) could be problematic. It all depends on your needs and in this case my needs would prefer a slight runtime performance cost versus a server load cost (or initial "startup" cost).

Would definitely be a benefit if the application in question was for a different purpose.

Thanks for all you help dude, you've been a useful proverbial "wall" to bounce things off, I appreciate it.


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-07 00:10:02


Just a reminder for you jammy types. The 2013 7 day rogue-like challenge starts this weekend.

http://roguebasin.roguelikedevelopment.org/index.php?title=7 DRL_Challenge_2013

Response to The Flash 'Reg' Lounge 2013-03-07 10:25:27


It's a beautiful thing when you don't get any errors after not compiling in the past few hours. Even better when the code works. I got saving to work with NGAPI, but I'm not sure how it works for people who aren't logged in. When I test in loggedoff mode, the author is the API debugger, and it sorts save files by author...so I don't want everyone to be accessing only one file...

Response to The Flash 'Reg' Lounge 2013-03-07 13:23:32


At 3/7/13 10:25 AM, MSGhero wrote: It's a beautiful thing when you don't get any errors after not compiling in the past few hours. Even better when the code works. I got saving to work with NGAPI, but I'm not sure how it works for people who aren't logged in. When I test in loggedoff mode, the author is the API debugger, and it sorts save files by author...so I don't want everyone to be accessing only one file...

Usually this is what happens after coding for hours and then compiling:
http://www.topito.com/wp-content/uploads/2013/01/code-12.gif


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-07 13:46:08


At 3/7/13 01:23 PM, Rustygames wrote: Usually this is what happens after coding for hours and then compiling:
http://www.topito.com/wp-content/uploads/2013/01/code-12.gif

haha, yupp. This is why I unit-test the ever-living hell out of everything as i'm creating it. It's slow, but generally bug-free.


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 2013-03-07 15:28:49


Whatever happened to that community game jam we were talking about?

Response to The Flash 'Reg' Lounge 2013-03-07 16:39:55


At 3/7/13 01:46 PM, egg82 wrote:
At 3/7/13 01:23 PM, Rustygames wrote: Usually this is what happens after coding for hours and then compiling:
http://www.topito.com/wp-content/uploads/2013/01/code-12.gif
haha, yupp. This is why I unit-test the ever-living hell out of everything as i'm creating it. It's slow, but generally bug-free.

The drive for unit testing at my work has increased massively, I've not done it as a rule for every project so I'm not that experienced with it. When you say you unit test everything, do you just mean the business logic behind the code? Because I'm not entirely sure what would even be unit testable in such a graphically rich application (such as a game). Could you give some examples of what you would apply unit tests to?


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-07 16:42:42


At 3/7/13 01:23 PM, Rustygames wrote: Usually this is what happens after coding for hours and then compiling:
http://www.topito.com/wp-content/uploads/2013/01/code-12.gif

Haha, normally that's what happens, but I was in the zone for whatever reason.

At 3/7/13 03:28 PM, Archawn wrote: Whatever happened to that community game jam we were talking about?

I think we voted on having another jam before Tom does his dev tool jams (construct, stencyl, etc). Not sure what happened then. I remember you and I said March 9 and April 20 were good for both of us. The 9th is probably too soon at this point, plus we lose an hour from daylight saving time.

Response to The Flash 'Reg' Lounge 2013-03-07 17:02:43


At 3/7/13 04:39 PM, Rustygames wrote: The drive for unit testing at my work has increased massively, I've not done it as a rule for every project so I'm not that experienced with it. When you say you unit test everything, do you just mean the business logic behind the code? Because I'm not entirely sure what would even be unit testable in such a graphically rich application (such as a game). Could you give some examples of what you would apply unit tests to?

well, I don't generally have just one test I run through my entire game. While i'm building functions, I test out different oddball parameters that can go into it or use different variables it takes from the class. Then I stress-test and optimize some. After the class is done, I put it in some real-world scenarios and then stress-test with some extreme scenarios. I try to put in anything I think could possibly break it or spit out weird shit. Throughout the process of creating a small class i'll have run it roughly 20 times, depending.

Once a state is finished, I run it and click ALL the things.

I apply unit tests to anything I can. If it takes input in any form, i'll change to make sure it doesn't break or do something weird later on. Sometimes testing means throwing in different parameters, and sometimes it means letting it run for a few minutes, cycling as fast as it can without crashing.

As an example, I developed a file for generating pseudo-random numbers. I stress-tested the seed values as well as let it run at top speed for several minutes, trying to find duplicates or seeing if it crashes when not finding an unused number.
Turns out, inifnity's pretty big, so I didn't have to worry about crashes.


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 2013-03-07 17:25:10


At 3/7/13 03:28 PM, Archawn wrote: Whatever happened to that community game jam we were talking about?

I love game jams, one of my best peojects was for the Global Games Jam. Blueberry is my favorite.

At 3/7/13 04:39 PM, Rustygames wrote: The drive for unit testing at my work has increased massively

Idiot here; what is unit testing?

Response to The Flash 'Reg' Lounge 2013-03-07 17:35:52


At 3/7/13 05:25 PM, GeoKureli wrote:
At 3/7/13 03:28 PM, Archawn wrote: Whatever happened to that community game jam we were talking about?
I love game jams, one of my best peojects was for the Global Games Jam. Blueberry is my favorite.

At 3/7/13 04:39 PM, Rustygames wrote: The drive for unit testing at my work has increased massively
Idiot here; what is unit testing?

Automated tests you run on a function or class. You should write the tests first then write the code to pass the tests, it's called test driven development and it's a way of ensuring your code is as bug free as possible and stays that way (any time you change anything you can just run the suite of tests again)


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-07 17:42:32


At 3/7/13 05:35 PM, Rustygames wrote: Automated tests you run on a function or class. You should write the tests first then write the code to pass the tests, it's called test driven development and it's a way of ensuring your code is as bug free as possible and stays that way (any time you change anything you can just run the suite of tests again)

unit tests don't necessarily need to be automated, but they generally are.
Thing is, with games it's very hard to create a suite of tests and run the game through them because it's so dynamic. You pretty much just need to do it the "old fashioned" 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 2013-03-07 18:20:01


At 3/7/13 05:35 PM, Rustygames wrote: Automated tests you run on a function or class. You should write the tests first then write the code to pass the tests, it's called test driven development and it's a way of ensuring your code is as bug free as possible and stays that way (any time you change anything you can just run the suite of tests again)

Ok, I usually have a test project that I use to debug new features I'm implementing into an engine, unless it's really small, then I'll just add it to the main constructor of my current project along with the traces.

Response to The Flash 'Reg' Lounge 2013-03-07 18:23:30


At 3/7/13 05:42 PM, egg82 wrote:
At 3/7/13 05:35 PM, Rustygames wrote: Automated tests you run on a function or class. You should write the tests first then write the code to pass the tests, it's called test driven development and it's a way of ensuring your code is as bug free as possible and stays that way (any time you change anything you can just run the suite of tests again)
unit tests don't necessarily need to be automated, but they generally are.
Thing is, with games it's very hard to create a suite of tests and run the game through them because it's so dynamic. You pretty much just need to do it the "old fashioned" way.

Yup. You can use stuff like selenium (not sure if it has flash API's, but I'm sure you could do something similar) for graphical testing, but this is only going to work for a few cases in the average game, most of it will have to be tested by humans (imo)


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-07 21:10:44


Oh my god. Are we discussing TDD in here ? Is this the enterprise software engineering forum now. What's next ? Wanna talk about deployment and automation strategies ? :P

Response to The Flash 'Reg' Lounge 2013-03-07 22:09:22


At 3/7/13 09:10 PM, PrettyMuchBryce wrote: Oh my god. Are we discussing TDD in here ? Is this the enterprise software engineering forum now. What's next ? Wanna talk about deployment and automation strategies ? :P

This is the everything forum :)

Side note: my writer sent the cutscene stuff over today, and tbh I'm kinda bummed that I know how the storyline goes. It's been a surprise up until now, and I didn't get to experience it by playing the game :(

Response to The Flash 'Reg' Lounge 2013-03-08 12:45:11


At 3/7/13 09:10 PM, PrettyMuchBryce wrote: Oh my god. Are we discussing TDD in here ? Is this the enterprise software engineering forum now. What's next ? Wanna talk about deployment and automation strategies ? :P

Actually now you mention it, does anyone use any automated build processes here?
I've been using a simple ant script to do a few bits and bobs for my current project


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-08 12:54:29


At 3/8/13 12:45 PM, Rustygames wrote: Actually now you mention it, does anyone use any automated build processes here?
I've been using a simple ant script to do a few bits and bobs for my current project

aside from using pre-made compilers, all I do is create flexible classes that I can use later. That's as automated as I get.


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 2013-03-08 15:17:48


I know this is kinda the game dev thread, but on the topic of Newgrounds Flash I just stumbled across this panel with hotdiggedydemon and egoraptor.

I am obssessed with Arin, but I am abhorrently, grotesquely obssessed with Max. He's a fucking giant prick in this video, and Arin's especially nice, which is hilarious.
Everyone says they love arin and hate max, and it's TRULY HEARTBREAKING TO WATCH!
If I was there I'd give them shit for not posting on Newgrounds any more.

Speaking of Newgrounds I've got a post about why Newgrounds is the best flash game site in the chamber, and I MIGHT enter the "make a Newgrounds ad" contest.

Response to The Flash 'Reg' Lounge 2013-03-08 21:22:09


At 3/8/13 12:45 PM, Rustygames wrote: Actually now you mention it, does anyone use any automated build processes here?
I've been using a simple ant script to do a few bits and bobs for my current project

I've been using Java quite a bit for robotics stuff and it got to the point where generating and distributing code/documentation between collaborators (even with the help of GitHub) became a pain. I modified the ANT build script for our project to call a shell script to generate and publish our javadoc and commit and push our code every time we compiled and downloaded to the robot. Very useful, I'm getting into scripty-type things and they're a blast to play with. (plus they certainly make life a whole lot easier)

Response to The Flash 'Reg' Lounge 2013-03-08 21:39:10


At 3/8/13 03:17 PM, I-smel wrote: Speaking of Newgrounds I've got a post about why Newgrounds is the best flash game site in the chamber, and I MIGHT enter the "make a Newgrounds ad" contest.

Ad contest? Where?


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 2013-03-08 23:47:33


At 3/8/13 09:39 PM, egg82 wrote: Ad contest? Where?

http://www.newgrounds.com/bbs/topic/1328768

At 3/8/13 09:22 PM, Archawn wrote: I modified the ANT build script for our project to call a shell script to generate and publish our javadoc and commit and push our code every time we compiled and downloaded to the robot.

Interesting. I think I will consider looking into something like this in the future. That is something I have always found tedious is remembering to actually push the code to git >_>

Response to The Flash 'Reg' Lounge 2013-03-09 07:55:40


At 3/8/13 09:22 PM, Archawn wrote:
At 3/8/13 12:45 PM, Rustygames wrote: Actually now you mention it, does anyone use any automated build processes here?
I've been using a simple ant script to do a few bits and bobs for my current project
I've been using Java quite a bit for robotics stuff and it got to the point where generating and distributing code/documentation between collaborators (even with the help of GitHub) became a pain. I modified the ANT build script for our project to call a shell script to generate and publish our javadoc and commit and push our code every time we compiled and downloaded to the robot. Very useful, I'm getting into scripty-type things and they're a blast to play with. (plus they certainly make life a whole lot easier)

I'm using it for a similar thing really, I've got some server side java stuff, a couple of xml files and a flash. One ANT script compiles and uploads everything I need to test and also pops up a little firefox window with a couple of swf's set to auto login. It used to take me 5 minutes to do all that every time I wanted to run the code, so a 5 second script was a huge productivity boost for me :)


- Matt, Rustyarcade.com