Be a Supporter!

The Flash 'Reg' Lounge

  • 2,187,200 Views
  • 64,665 Replies
New Topic Respond to this Topic
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-04 12:54:45 Reply

At 3/4/13 11:48 AM, Luis wrote: *edited Heres an actual Flash game I AM working on. It was supposed to be done a month ago! weee.

That looks sick!


- Matt, Rustyarcade.com

Innermike
Innermike
  • Member since: Sep. 11, 2009
  • Offline.
Forum Stats
Member
Level 14
Blank Slate
Response to The Flash 'Reg' Lounge 2013-03-04 15:02:57 Reply

Rusty's game looks pretty interesting in particular but really, everybody seems to be being productive and making cool things.

Jealousy.

nobody

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-04 15:57:02 Reply

At 3/4/13 12:34 PM, Luis wrote:
At 3/4/13 12:31 PM, ImpotentBoy2 wrote:
At 3/4/13 11:48 AM, Luis wrote:
i like the color scheme and facial expressions. NEAT.
I didn't draw these, but yeah my artist draws amazing mouths.

*edited Heres an actual Flash game I AM working on. It was supposed to be done a month ago! weee.
talk about nice color schemes. looks interesting.
who's your artist anyway. im nosy.

His name is Ian. Sorry, I don't generally give out friend's full names on the internet and junk unless I want them raped. Me and him worked as lead game developers at our last job
http://www.pilotside.us/2012/06/04/fp000/

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-04 16:05:39 Reply

At 3/4/13 03:57 PM, ImpotentBoy2 wrote: His name is Ian. Sorry, I don't generally give out friend's full names on the internet and junk unless I want them raped.

bleh, his full name is on the website, so i guess he's not super personal, Ian Merch

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 09:06:07 Reply

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.

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 09:08:47 Reply

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.

Tilesheet will be bigger of course and I'll be putting some scrollbars in there. The performance is pretty good even in extremely large levels.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 12:29:53 Reply

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

My problem is clearly illustrated in that. No heuristic's which just take into account level and not where the stairs to that level are will help.

Here it is with stairs being found first if it detects the goal is on another level
http://www.newgrounds.com/dump/item/bfdf3c16b1f950571d447fca c7b985db

As you can see the paths are far more efficient (and it's faster to process too).

Anyway just an FYI as I promised I'd let you know how I got on :)


- Matt, Rustyarcade.com

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 12:33:28 Reply

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.

The Flash 'Reg' Lounge


- Matt, Rustyarcade.com

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 13:08:50 Reply

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

My problem is clearly illustrated in that. No heuristic's which just take into account level and not where the stairs to that level are will help.

Here it is with stairs being found first if it detects the goal is on another level
http://www.newgrounds.com/dump/item/bfdf3c16b1f950571d447fca c7b985db

As you can see the paths are far more efficient (and it's faster to process too).

Anyway just an FYI as I promised I'd let you know how I got on :)

That's super impressive. and seems highly efficient considering the low number of tiles checked. I'm a little confused by the random snake patterns that pop up. [below] I choose 2 tiles that are perfectly diagonal to each other expecting a neat staircase from a to b, and I got this wiggly snake pattern. It doesn't matter too much cuz the resulting path is just as efficient, but I counted and my expected neat staircase would have had a smaller total tiles checked(assuming that the white outer tiles are paths not taken). I'm not complaining, I'm just curious as to how you decide which direction to check, are you choosing a random direction first or does it favor the actual direction of your target?

The Flash 'Reg' Lounge

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 13:13:38 Reply

At 3/5/13 01:08 PM, ImpotentBoy2 wrote: I'm just curious as to how you decide which direction to check, are you choosing a random direction first or does it favor the actual direction of your target?

You can add turning to the heuristic to get straight lines if they don't already come out that way. Or add not turning to it to always get a staircase :P

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 13:27:28 Reply

At 3/5/13 01:08 PM, ImpotentBoy2 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

My problem is clearly illustrated in that. No heuristic's which just take into account level and not where the stairs to that level are will help.

Here it is with stairs being found first if it detects the goal is on another level
http://www.newgrounds.com/dump/item/bfdf3c16b1f950571d447fca c7b985db

As you can see the paths are far more efficient (and it's faster to process too).

Anyway just an FYI as I promised I'd let you know how I got on :)
That's super impressive. and seems highly efficient considering the low number of tiles checked. I'm a little confused by the random snake patterns that pop up. [below] I choose 2 tiles that are perfectly diagonal to each other expecting a neat staircase from a to b, and I got this wiggly snake pattern. It doesn't matter too much cuz the resulting path is just as efficient, but I counted and my expected neat staircase would have had a smaller total tiles checked(assuming that the white outer tiles are paths not taken). I'm not complaining, I'm just curious as to how you decide which direction to check, are you choosing a random direction first or does it favor the actual direction of your target?

It's a good question. The algorithm will actually find many paths which reach the same goal, but only bothers returning it if it's shorter. Having a neat stair case is actually the exact same amount of moves. I think it just happens that it's found that one first (and therefore subsequent successes were ignored as they were no better) because the neighbors are in a list from left to right. So first it will check above, then left, then right and then finally below the last tile. That's why it takes a couple of steps to the right first and the rest of the weirdness is making up for that initial decision (while moving it as close to the goal as possible).

I agree it isn't as aesthetically pleasing, but it is equally as efficient as a neat staircase :)


- Matt, Rustyarcade.com

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 13:35:12 Reply

At 3/5/13 01:13 PM, MSGhero wrote:
At 3/5/13 01:08 PM, ImpotentBoy2 wrote: I'm just curious as to how you decide which direction to check, are you choosing a random direction first or does it favor the actual direction of your target?
You can add turning to the heuristic to get straight lines if they don't already come out that way. Or add not turning to it to always get a staircase :P

Yup this is the solution. Could also just generally prefer searches for a tile in the same direction without messing with the heuristic, could work, I'll have to see (in all my wisdom I left the source at work again XD)

I think I'd go for turning being more expensive personally because if my little character running around started doing a crazy stair case walk (assuming he can't walk diagonally as this engine does) I'd feel a little queasy :P


- Matt, Rustyarcade.com

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 13:44:45 Reply

At 3/5/13 01:27 PM, Rustygames wrote: So first it will check above, then left, then right and then finally below the last tile. That's why it takes a couple of steps to the right first and the rest of the weirdness is making up for that initial decision (while moving it as close to the goal as possible).

that's where I'm confused. if it was up,left,right,down respectively I'm surprised the path I got wasn't r,r,r,r,r,r,r,d,d,d,d,d.

I agree it isn't as aesthetically pleasing

quite the opposite, I find it organic.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 13:48:51 Reply

seems legit


Programming stuffs (tutorials and extras)
PM me (instead of MintPaw) if you're confuzzled.
thank Skaren for the sig :P

BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 13:56:14 Reply

At 3/5/13 01:44 PM, ImpotentBoy2 wrote:
At 3/5/13 01:27 PM, Rustygames wrote: So first it will check above, then left, then right and then finally below the last tile. That's why it takes a couple of steps to the right first and the rest of the weirdness is making up for that initial decision (while moving it as close to the goal as possible).
that's where I'm confused. if it was up,left,right,down respectively I'm surprised the path I got wasn't r,r,r,r,r,r,r,d,d,d,d,d.

r,r,r,r,r,r,d,d,d,d,d,d wouldn't be as optimal in terms of the heuristic because the heuristic is a straight line. It will try and go as straight as possible, but it favors certain directions where it makes no difference (in this case up, then left, then right then down).

I agree it isn't as aesthetically pleasing
quite the opposite, I find it organic.

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.


- Matt, Rustyarcade.com

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 14:16:18 Reply

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.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 14:21:58 Reply

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

Wolfos
Wolfos
  • Member since: Jan. 19, 2008
  • Offline.
Forum Stats
Member
Level 25
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 14:36:02 Reply

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

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 15:46:50 Reply

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.

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 16:30:51 Reply

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?

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 20
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-05 16:47:24 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
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-05 18:52:52 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
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-06 08:21:25 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 2013-03-06 10:41:47 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
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-06 16:15:18 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 2013-03-07 00:10:02 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

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-07 10:25:27 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
Supporter
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-07 13:23:32 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 2013-03-07 13:46:08 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 2013-03-07 15:28:49 Reply

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