00:00
00:00
Newgrounds Background Image Theme

Bam76pixon 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,901,461 Views | 60,179 Replies
New Topic Respond to this Topic

Response to The Flash 'Reg' Lounge 2013-03-03 13:55:00


At 3/3/13 01:39 PM, egg82 wrote: ?

Iunno, do you need to use the NG API to save and load SharedObjects?

No, but I'm not using sharedobjs for this. The reference isn't as helpful as I'd like it to be; most of my understanding of the api comes from a readme that came with it. But it only covers loading by clicking inside the provided movieclip rather than getting the files without user interaction.

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


I have to respond to the awesome screenshots.

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.

FlyingColours Don't be so hard on yourself. This looks like a cool little strategy game. I don't think I could do any better. It looks like you're still prototyping. So have at it!

Rusty This looks absolutely epic. When do we get to play it ?

MsGhero I love the artstyle. Did you do the art? I have a soft spot for 16-bit lookin adventurey games with dialogue like that.

Response to The Flash 'Reg' Lounge 2013-03-03 15:03:27


At 3/3/13 01:55 PM, MSGhero wrote: No, but I'm not using sharedobjs for this. The reference isn't as helpful as I'd like it to be; most of my understanding of the api comes from a readme that came with it. But it only covers loading by clicking inside the provided movieclip rather than getting the files without user interaction.

yeah, I want to say the NG API puts an encryption on the SO. For obvious reasons, we can't have the key.
well, either you're using SOs, URLLoaders, or AIR. Those are your options when it comes to saving data with AS3.


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-03 15:23:14


At 3/3/13 02:06 PM, PSvils wrote:
At 3/3/13 01:48 PM, Rustygames wrote: Bingo you got it. That's exactly the problem. Your solution is what I'm going to go for, but if you check my post with the shit MS Paint picture I drew, you'll see there are a couple of problems with that method too.
You get the estimated heuristic by getting the shortest distance, aka, you cycle through all staircases, get the distance from each staircase to your current point, and the distance to the goal on level 2 summed. The shortest distance between all staircases should be your estimated heuristic.
Then proceed as you normally would.
(The more levels you have between the 2 goals, the estimated heuristic calculation will get exponentially longer to calculate: level1Doors * level2Doors * ... * levelNDoors)

P.

It's a good plan. It still won't solve the problem I illustrated where you go up and then down again to get to the target fastest, but I think level design will be the easiest way to solve that. I'll try your suggestion and I expect that will yield better results that my initial thought of splitting the path into 2 for stairs. Thanks for the help dude, I'll let you know how I get on with it :)

At 3/3/13 02:58 PM, PrettyMuchBryce wrote: I have to respond to the awesome screenshots.

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.

FlyingColours Don't be so hard on yourself. This looks like a cool little strategy game. I don't think I could do any better. It looks like you're still prototyping. So have at it!

Rusty This looks absolutely epic. When do we get to play it ?

MsGhero I love the artstyle. Did you do the art? I have a soft spot for 16-bit lookin adventurey games with dialogue like that.

The card game itself is nearing completion, but there is a whole world of pain ahead with all the external API's (Facebook, Kongregate etc) and the "world" around the cards. I really hope to finally get this thing in the hands of the players in a month or two. Thanks for the compliment, I appreciate that :)


- Matt, Rustyarcade.com

Response to The Flash 'Reg' Lounge 2013-03-03 15:28:14


At 3/3/13 02:58 PM, PrettyMuchBryce wrote: Did you do the art? I have a soft spot for 16-bit lookin adventurey games with dialogue like that.

Ha...good one. I'll let the actual artist know you said that

Response to The Flash 'Reg' Lounge 2013-03-03 16:36:13


At 3/3/13 07:16 AM, Rustygames wrote: I will illustrate all of this in a crudely drawn diagram drawn in MSPaint :)

http://www.newgrounds.com/dump/item/fe9ee81a2b058e73af16d812 a7aa8a89

I don't exactly see the problem here, try not thinking of the pathfinding visually like that and just think of it as a bunch of nodes connected together. If you need a heuristic just like, x distance + y distance + level distance*10. Play around with it, if its very unlikely that a path goes between levels then just consider transferring levels as a lot more expensive.

Response to The Flash 'Reg' Lounge 2013-03-03 16:58:23


At 3/3/13 04:36 PM, Glaiel-Gamer wrote:
At 3/3/13 07:16 AM, Rustygames wrote: I will illustrate all of this in a crudely drawn diagram drawn in MSPaint :)

http://www.newgrounds.com/dump/item/fe9ee81a2b058e73af16d812 a7aa8a89
I don't exactly see the problem here, try not thinking of the pathfinding visually like that and just think of it as a bunch of nodes connected together. If you need a heuristic just like, x distance + y distance + level distance*10. Play around with it, if its very unlikely that a path goes between levels then just consider transferring levels as a lot more expensive.

It's one tactic, but that will encourage the path to get off the level as soon as possible which, as in the example with some "blocked" second level paths (where a set of stairs leads to a part of the right level which cannot reach the goal) could slow things down a lot. Depending on the size of the map and the level design this could be fine of course.


- Matt, Rustyarcade.com

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


At 3/3/13 04:58 PM, Rustygames wrote: It's one tactic, but that will encourage the path to get off the level as soon as possible which, as in the example with some "blocked" second level paths (where a set of stairs leads to a part of the right level which cannot reach the goal) could slow things down a lot. Depending on the size of the map and the level design this could be fine of course.

I really don't think you'll run into any speed issues with this unless your map is like, 100 levels of 1000x1000. Is your goal static or does it move around a lot / does the map change a lot?

Also, increasing the cost of moving up stairs means it will check the stairs later, not earlier

Response to The Flash 'Reg' Lounge 2013-03-03 18:39:47


At 3/3/13 06:03 PM, Glaiel-Gamer wrote:
At 3/3/13 04:58 PM, Rustygames wrote: It's one tactic, but that will encourage the path to get off the level as soon as possible which, as in the example with some "blocked" second level paths (where a set of stairs leads to a part of the right level which cannot reach the goal) could slow things down a lot. Depending on the size of the map and the level design this could be fine of course.
I really don't think you'll run into any speed issues with this unless your map is like, 100 levels of 1000x1000. Is your goal static or does it move around a lot / does the map change a lot?

Also, increasing the cost of moving up stairs means it will check the stairs later, not earlier

You said have a high cost for being on a different level. That would mean it goes up stairs earlier.

I don't know if you've used grid based path finding much in the past, but if you're using it every time the player clicks, and you're on say, a 25x25 grid (x2 levels), with minimum walls, the calculation times start to add up. Of course it will always find the path, I'm just pondering the quickest way to do that. Maybe I'm worrying too much


- Matt, Rustyarcade.com

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


At 3/3/13 06:39 PM, Rustygames wrote: You said have a high cost for being on a different level. That would mean it goes up stairs earlier.

That would be high priority, high cost is the opposite.

Response to The Flash 'Reg' Lounge 2013-03-03 20:01:57


also if 25x25x2 is causing noticeable slowdown for you, you might want to go take a look at hour you're using your data structures, since I can usually brute-force a tilemap that small without much performance cost at all.

Response to The Flash 'Reg' Lounge 2013-03-04 07:36:21


If everybody's posting their projects, I'll go ahead. I'm making a rhythm baseball game. I don't have any screen shots yet as I have only been working on it for 2 days. so here's the character sprites.

I actually think I can get a playable demo today.

the animations respectively are: run[1-8] duck[9,10] slide[11,12] jump[13] swing[14-18].

The Flash 'Reg' Lounge

Response to The Flash 'Reg' Lounge 2013-03-04 11:44:07


omg you work for newgrounds

Response to The Flash 'Reg' Lounge 2013-03-04 11:48:11


At 3/4/13 11:39 AM, Luis wrote:
At 3/4/13 07:36 AM, ImpotentBoy2 wrote:
i like the color scheme and facial expressions. NEAT.

Havent been doing much Flash stuff lately. I've been wrapping my head around streamlining a mobile version of this website. here's an unrevealing landing page.

*edited Heres an actual Flash game I AM working on. It was supposed to be done a month ago! weee.

The Flash 'Reg' Lounge


None

BBS Signature

Response to The Flash 'Reg' Lounge 2013-03-04 12:31:41


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.

Response to The Flash 'Reg' Lounge 2013-03-04 12:34:25


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.


None

BBS Signature

Response to The Flash 'Reg' Lounge 2013-03-04 12:54:45


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

Response to The Flash 'Reg' Lounge 2013-03-04 15:57:02


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/

Response to The Flash 'Reg' Lounge 2013-03-04 16:05:39


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

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


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.

Response to The Flash 'Reg' Lounge 2013-03-05 09:08:47


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.

Response to The Flash 'Reg' Lounge 2013-03-05 12:29:53


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

Response to The Flash 'Reg' Lounge 2013-03-05 12:33:28


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

Response to The Flash 'Reg' Lounge 2013-03-05 13:08:50


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

Response to The Flash 'Reg' Lounge 2013-03-05 13:13:38


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

Response to The Flash 'Reg' Lounge 2013-03-05 13:27:28


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

Response to The Flash 'Reg' Lounge 2013-03-05 13:35:12


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

Response to The Flash 'Reg' Lounge 2013-03-05 13:44:45


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.

Response to The Flash 'Reg' Lounge 2013-03-05 13:48:51



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-05 13:56:14


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