Be a Supporter!

The Flash 'Reg' Lounge

  • 1,583,134 Views
  • 64,284 Replies
New Topic Respond to this Topic
GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Online!
Forum Stats
Supporter
Level 19
Game Developer
Response to The Flash 'Reg' Lounge Mar. 5th, 2013 @ 04:47 PM Reply

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.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 5th, 2013 @ 06:52 PM Reply

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

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 6th, 2013 @ 08:21 AM Reply

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

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge Mar. 6th, 2013 @ 10:41 AM Reply

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.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 6th, 2013 @ 04:15 PM Reply

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

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 12:10 AM Reply

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


BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 10:25 AM Reply

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...

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 01:23 PM Reply

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

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 01:46 PM Reply

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
Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 03:28 PM Reply

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

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 04:39 PM Reply

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

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 04:42 PM Reply

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.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 05:02 PM Reply

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
GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Online!
Forum Stats
Supporter
Level 19
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 05:25 PM Reply

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?

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 05:35 PM Reply

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

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 05:42 PM Reply

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
GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Online!
Forum Stats
Supporter
Level 19
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 06:20 PM Reply

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.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 06:23 PM Reply

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

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 09:10 PM Reply

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


BBS Signature
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge Mar. 7th, 2013 @ 10:09 PM Reply

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 :(

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 12:45 PM Reply

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

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 12:54 PM Reply

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
I-smel
I-smel
  • Member since: Mar. 2, 2006
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 03:17 PM Reply

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.

Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 09:22 PM Reply

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)

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 09:39 PM Reply

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
Mattster
Mattster
  • Member since: Nov. 21, 2007
  • Offline.
Forum Stats
Member
Level 20
Game Developer
Response to The Flash 'Reg' Lounge Mar. 8th, 2013 @ 11:47 PM Reply

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 >_>

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge Mar. 9th, 2013 @ 06:04 AM Reply

At 3/3/13 02:58 PM, PrettyMuchBryce wrote: PSVils This looks really cool. I have heard of Ogre. What do you think of it so far ? I probably don't have enough time at the moment to give you the help you deserve. :[ I'll shoot you a PM if that changes, though.

Talk about a late response!

Ogre3D is super awesome! High-level, easy to setup, really flexible. To enable shadows, all I needed to do was myEntity->setEnabledShadows( true);, and BOOM!
And definitely do see if you can help out! The way we're programming it's really easy to split up jobs, really fine divisions between different functions of the engine, so you could be in charge of something small or little or revamping something. Just if you're interested though! :)

P.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge Mar. 9th, 2013 @ 07:55 AM Reply

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

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge Mar. 9th, 2013 @ 08:05 PM Reply

Since we actually are talking about deployment and automation now, I am not the biggest ANT/Maven fan. I think I would prefer to write a build script on my own with Ruby, or Node. In terms of deployment, I've had good luck with capistrano. :)


BBS Signature
GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Online!
Forum Stats
Supporter
Level 19
Game Developer
Response to The Flash 'Reg' Lounge Mar. 9th, 2013 @ 08:49 PM Reply

Lets not talk about deployment. lets talk about projects we are working on, and fun stuff.
http://www.newgrounds.com/dump/item/4cd9bc6174cb3b5e15102c34 c868a589
Here's my rhythm baseball game that you guys should totally play. just click the random level button, don't worry about the rest.
UP - jump
DOWN - duck under shit
LEFT - swing
RIGHT - break rocks