Be a Supporter!

The Flash 'Reg' Lounge

  • 1,908,042 Views
  • 64,376 Replies
New Topic Respond to this Topic
egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2013-02-26 18:07:07 Reply

At 2/26/13 05:55 PM, Diki wrote: You gotta do what you gotta do. :)

i'm not complaining :P


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
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-02-27 12:35:58 Reply

At 2/26/13 05:08 PM, Innermike wrote:
At 2/26/13 02:59 PM, Rustygames wrote: Let's stop picking on Egg, he made a terrible mistake and we've all had a laugh about it, let's not forget he's still a pretty cool guy and doesn't afraid of anything
You know what you're right, he doesn't afraid of anything!

http://knowyourmeme.com/memes/pretty-cool-guy


- Matt, Rustyarcade.com

Luis
Luis
  • Member since: Apr. 23, 2000
  • Offline.
Forum Stats
Supporter
Level 02
Melancholy
Response to The Flash 'Reg' Lounge 2013-02-27 13:13:37 Reply

At 2/27/13 12:35 PM, Rustygames wrote: http://knowyourmeme.com/memes/pretty-cool-guy

i like the graph showing interest in the phrase


None

Toast
Toast
  • Member since: Apr. 2, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to The Flash 'Reg' Lounge 2013-02-27 13:21:49 Reply

At 2/27/13 01:13 PM, Luis wrote:
At 2/27/13 12:35 PM, Rustygames wrote: http://knowyourmeme.com/memes/pretty-cool-guy
i like the graph showing interest in the phrase

I find it striking that, supposedly, no one ever talked about pretty cool guys before this silly 4chan post.


BBS Signature
Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-02-27 13:35:46 Reply

At 2/27/13 01:21 PM, Toast wrote:
At 2/27/13 01:13 PM, Luis wrote:
At 2/27/13 12:35 PM, Rustygames wrote: http://knowyourmeme.com/memes/pretty-cool-guy
i like the graph showing interest in the phrase
I find it striking that, supposedly, no one ever talked about pretty cool guys before this silly 4chan post.

That's a good point Toast. You tell it like it is and don't afraid of anything.

In other news: earlier I accidentally 32MB of rar files, is this bad?


- 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-02-27 13:39:10 Reply

At 2/27/13 01:35 PM, Rustygames wrote: In other news: earlier I accidentally 32MB of rar files, is this bad?

depends on who was phone


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
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-02-27 16:05:01 Reply

At 2/27/13 01:39 PM, egg82 wrote:
At 2/27/13 01:35 PM, Rustygames wrote: In other news: earlier I accidentally 32MB of rar files, is this bad?
depends on who was phone

Well played sir, well played


- 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-02-28 22:14:14 Reply

Tasksel:
Install ALL the things!

^ my last hour of "productivity"


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

BBS Signature
Fooliolo
Fooliolo
  • Member since: May. 1, 2005
  • Offline.
Forum Stats
Member
Level 11
Gamer
Response to The Flash 'Reg' Lounge 2013-03-01 04:38:08 Reply

Man, fk you deluge of games from xmas + bday.... *sigh*

So back to making a bullet hell in Flash, I took a look at the number of collision calcs being made. Then the "ye olde good idea fairy" had to kick in, and I thought to myself "why not have player bullets counter enemy bullets?" My desktop is pretty beefy, but even 10k calcs is proving to be pretty ridiculous.

A couple days later, I have devised a solution. The worst case scenario would be slightly worse than the default routine, but the best case scenario reduces calculations by 4x. The good news is that I have done something few would consider. The bad news is that I haven't tried it yet. The bad news is that AS3 is making me do practices that would be the opposite of what to do with better applications. The bad news is that it works poorly with large objects.

Nothing to do but to try it now. For great science!


Medal Games in a Nutshell: a general overview of how to earn NG medals!

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

At 3/1/13 04:38 AM, Fooliolo wrote: So back to making a bullet hell in Flash, I took a look at the number of collision calcs being made. Then the "ye olde good idea fairy" had to kick in, and I thought to myself "why not have player bullets counter enemy bullets?" My desktop is pretty beefy, but even 10k calcs is proving to be pretty ridiculous.

i'd recommend quad trees. Flixel allows you to implement them quite easily.


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

BBS Signature
Kirk-Cocaine
Kirk-Cocaine
  • Member since: Aug. 17, 2003
  • Offline.
Forum Stats
Moderator
Level 38
Programmer
Response to The Flash 'Reg' Lounge 2013-03-01 12:07:50 Reply

At 2/27/13 01:21 PM, Toast wrote: I find it striking that, supposedly, no one ever talked about pretty cool guys before this silly 4chan post.

That's because it used to be all about bad dudes.

The Flash 'Reg' Lounge


The water in Majorca don't taste like what it oughta.

| AS3: Main | AS2: Main | Flash Tutorials |

BBS Signature
Fooliolo
Fooliolo
  • Member since: May. 1, 2005
  • Offline.
Forum Stats
Member
Level 11
Gamer
Response to The Flash 'Reg' Lounge 2013-03-01 14:23:46 Reply

At 3/1/13 11:17 AM, egg82 wrote: i'd recommend quad trees. Flixel allows you to implement them quite easily.

Great minds think alike. Except I'm doing everything from scratch for practice and learning, so no Flixel. Yes, even rotatable hitboxes.

But the devil's in the details, and it will definitely take some tuning.


Medal Games in a Nutshell: a general overview of how to earn NG medals!

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2013-03-02 19:30:16 Reply

Tile based map. Path finding. A* implemented, works great. New challenger appears: stairs which go up and down.

Anyone done anything like this before? I figured stairs would just have neighbor nodes which are on the second level, but how to calculate the heuristic? Otherwise it's going to try and go to the floor directly below the target and slow things right down...

Ideas?


- Matt, Rustyarcade.com

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

At 3/2/13 07:30 PM, Rustygames wrote: Tile based map. Path finding. A* implemented, works great. New challenger appears: stairs which go up and down.

Anyone done anything like this before? I figured stairs would just have neighbor nodes which are on the second level, but how to calculate the heuristic? Otherwise it's going to try and go to the floor directly below the target and slow things right down...

Ideas?

You can count it how you want, whether changing altitude = 1 or jumping = 2 and falling = 0 or something. I'm using manhattan (cardinal directions plus jumping) distance as my heuristic, so for me it's just the sum of abs value of row - row, col - col, and altitude - altitude.

But what do you mean by stairs? Like, multiple tiles in a row that are elevated +1 from the previous, or stairs as a between-tile means (equivalent to jumping) to get to another height?

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

At 3/2/13 07:30 PM, Rustygames wrote: Tile based map. Path finding. A* implemented, works great. New challenger appears: stairs which go up and down.

Anyone done anything like this before? I figured stairs would just have neighbor nodes which are on the second level, but how to calculate the heuristic? Otherwise it's going to try and go to the floor directly below the target and slow things right down...

Ideas?

If your talking about pathfinding with stairs, then don't read on and tell me to fuck off because I've never worked with A*.

but this tutorial is amazing, and covers stairs.
Here is a more advanced set of tutorials that were used in the mind blowing game N.

Luis
Luis
  • Member since: Apr. 23, 2000
  • Offline.
Forum Stats
Supporter
Level 02
Melancholy
Response to The Flash 'Reg' Lounge 2013-03-02 21:06:28 Reply

At 3/2/13 07:30 PM, Rustygames wrote: Ideas?

Not to derail your seeking for an answer but that reminded me of a question... so I was working on a skateboarding game with a programmer, and slopes became a major issue. So are slopes actually hard to work with? I mean if just having stairs is giving Rusty a headache, im wondering if the programmer really wasnt just being lazy and it actually is a pain.

<3


None

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

At 3/2/13 09:06 PM, Luis wrote: Not to derail your seeking for an answer but that reminded me of a question... so I was working on a skateboarding game with a programmer, and slopes became a major issue. So are slopes actually hard to work with? I mean if just having stairs is giving Rusty a headache, im wondering if the programmer really wasnt just being lazy and it actually is a pain.

<3

They can be annoying if you aren't using something that handles them. NAPE physics engine will handle slopes automatically. The problem with not using an engine is that you don't know what the slope is (unless you do). So as a programmer with a square, I'd have to check both bottom corners for collision. When one corner hits the ground, there's trig involved for rotation about that point, and no one likes trig. If you know the actual slope beforehand or if the slope is nice when flash rounds the trig values, it'll look smoother.

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

At 3/2/13 09:06 PM, Luis wrote: Not to derail your seeking for an answer but that reminded me of a question... so I was working on a skateboarding game with a programmer, and slopes became a major issue. So are slopes actually hard to work with? I mean if just having stairs is giving Rusty a headache, im wondering if the programmer really wasnt just being lazy and it actually is a pain.

it requires lots and lots of maths. Generally, the programmers that aren't working for big companies aren't very good at "lots and lots of maths."

I want to say slopes requires advanced geom and possibly some trig, but correct me if i'm wrong.


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

BBS Signature
Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-02 22:29:43 Reply

At 3/2/13 09:18 PM, egg82 wrote: it requires lots and lots of maths. Generally, the programmers that aren't working for big companies aren't very good at "lots and lots of maths."

I want to say slopes requires advanced geom and possibly some trig, but correct me if i'm wrong.

it requires 7th grade levels of math

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

At 3/2/13 10:29 PM, Glaiel-Gamer wrote: it requires 7th grade levels of math

isn't that pre-algebra?
can you explain? o.o


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

BBS Signature
PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Supporter
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge 2013-03-03 01:32:31 Reply

I have a proposition.

How about we designate a day of the month or week that we all post screenshots of what we're working on ? It could be a game, website project, school project, whatever. The point is that we're showing what were doing. For some reason it seems like this board has gotten a bit snarky in the last month, which is ok, but maybe we're getting off track. I know you're all smart. You don't have to prove it with each and every post you make. Sometimes you can just chill out. That's why this is a lounge. I am building a little prototype in Unity (screenshot). I'm not sure if it will be fun yet. Other than that, I have been exploring C++ a little bit. I am also sending you all good vibes and positive feeling beams right now.

The Flash 'Reg' Lounge

Toast
Toast
  • Member since: Apr. 2, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to The Flash 'Reg' Lounge 2013-03-03 01:39:54 Reply

Glaiel
I'm sure Glaiel is purposefully making somewhat hyperbolic statements that are not to be taken too literally. Stating how early or late a subject is introduced to students in school could never be a good measure of the difficulty of the subject either way. In this case though, I'm pretty sure basic trigonometric functions are taught somewhere around 8th grade, albeit not very effectively. I recall having stuff about inclined planes taught to us in physics class around the same time we learned about sine and cosine in math.

Ninja chicken pathfinding
Ninja chicken your question doesn't make any sense. You have an extra floor of tiles which you want to link through the stairs. As you said, the stairs node will link to nodes of the upper floor instead of nodes of the same floor. ie: if coordinates [f, i, j] represent a tile on floor f on the ith row and jth column, then a set of stairs on [f, i, j] would link to tiles [f+1, i+1, j], [f+1, i-1, j], [f+1, i, j+1], [f+1, i, j-1] in lieu of the same coordinates on [f, ...] which a regular non-stair tile would link to. It seems to me you answered your own question.

Slopes
Luis the slope problem is unrelated to ninja chicken's stairs. Ninja chicken is not coding physics, the stairs are just an abstraction for a "transporter" from a node to other nodes.

As far as slopes in games go, the N tutorial covers a lot of very important concepts for coding this kind of things. The other tutorial that was linked merely shows how to displace a character walking up a linear inclination such that he doesn't end up "inside" the ground. Following the instructions of this tutorial results in having a character that moves faster when he's going uphill than when he's walking on flat ground. Not great ...

egg I wouldn't disagree that generally programmers who don't work for big companies are not very good at math. If, however, you claim that the converse is true, ie: that generally programmers who work for big companies are good at "lots and lots of math", then I think we will run into a small disagreement :P


BBS Signature
Toast
Toast
  • Member since: Apr. 2, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to The Flash 'Reg' Lounge 2013-03-03 01:52:48 Reply

At 3/3/13 01:32 AM, PrettyMuchBryce wrote: For some reason it seems like this board has gotten a bit snarky in the last month, which is ok, but maybe we're getting off track. I know you're all smart. You don't have to prove it with each and every post you make. Sometimes you can just chill out. That's why this is a lounge.

Eh, I spend the entirety of my offline life being polite to people and pretending they're not mentally set-back. I find it refreshing to come to the internet to rejoice in honest expression without being plagued by social conventions. In fact, just before you posted this, I was thinking about how the reg lounge seems to be getting a bit more fun suddenly, and how long it's been since I'd last seen comments like the one Glaiel made about 7th grade math.

in other words, I miss gust :P

BBS Signature
Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-03 02:54:35 Reply

At 3/3/13 01:39 AM, Toast wrote: Glaiel
I'm sure Glaiel is purposefully making somewhat hyperbolic statements that are not to be taken too literally. Stating how early or late a subject is introduced to students in school could never be a good measure of the difficulty of the subject either way. In this case though, I'm pretty sure basic trigonometric functions are taught somewhere around 8th grade, albeit not very effectively. I recall having stuff about inclined planes taught to us in physics class around the same time we learned about sine and cosine in math.

Slopes require knowing the equation for a line (y=mx+b), don't need to know anything about trig in there. It's fairly simple. Construct that equation for the slope, then plug y and x into it and see if y>mx+b, slope collision done.

Toast
Toast
  • Member since: Apr. 2, 2005
  • Offline.
Forum Stats
Member
Level 09
Blank Slate
Response to The Flash 'Reg' Lounge 2013-03-03 03:04:04 Reply

At 3/3/13 02:54 AM, Glaiel-Gamer wrote: Slopes require knowing the equation for a line (y=mx+b), don't need to know anything about trig in there. It's fairly simple. Construct that equation for the slope, then plug y and x into it and see if y>mx+b, slope collision done.

Hmm, looks like all these years I assumed that a "slope" in terrain just means a change of level, be it linear or not. In that case I wouldn't even say you need 7th grade math to make something move up a slope, all you need is to understand how the coordinate system works in actionscript, and elementary intuition granted by mother nature that every kid should have.


BBS Signature
PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-03 03:30:52 Reply

At 3/3/13 01:32 AM, PrettyMuchBryce wrote: Other than that, I have been exploring C++ a little bit. I am also sending you all good vibes and positive feeling beams right now.

That screeny looks really cool! And even cooler is that you're gettin' down on some C++ :) Would you be interested in joining a game project me and a friend are working on together, except that my friend doesn't seem to have a lot of time. It's a game using Ogre3d (We're not pros, we're just poking and slowly putting it together).

@Glael: I've also never understood the hate of trigonometry in these forums...It should be one of the basics a programmer should be fine to deal with...so fine that he doesn't even think about how it's fine. And the "amount" of math in a solution defines how hard it is? Whaaat?

The Flash 'Reg' Lounge

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-03 03:38:39 Reply

At 3/3/13 03:04 AM, Toast wrote:
At 3/3/13 02:54 AM, Glaiel-Gamer wrote: Slopes require knowing the equation for a line (y=mx+b), don't need to know anything about trig in there. It's fairly simple. Construct that equation for the slope, then plug y and x into it and see if y>mx+b, slope collision done.
Hmm, looks like all these years I assumed that a "slope" in terrain just means a change of level, be it linear or not. In that case I wouldn't even say you need 7th grade math to make something move up a slope, all you need is to understand how the coordinate system works in actionscript, and elementary intuition granted by mother nature that every kid should have.

Well I assumed linear cause I figured he's doing tiles instead of shapeflag-based collision, since if he was doing shapeflag-based collision then you just get slopes for free by coding any collision at all...

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

Hi guys, some really cool replies I was surprised to see so many :)

So just for clarity, this will be a top down map, an isometric world like Habbo hotel. The A* I've nicked from my rather unsuccessful (and of questionable taste, please don't judge), London Riots game. The system is A* and calculates neighbors by casting a ray between each node. I've modified it with ease to be equal square tiles instead and it worked a treat.

I haven't looked into putting in multiple "levels" yet, but I thought I'd be cheeky and get you guys' opinion on it before I began. The main problem is the heuristic. If I simply add 1 cost if the goal is on another level, then the path is going to go underneath the tile, then realize the stairs are miles away and things will get very slow very quickly.

I was going to counter this by splitting into 2 paths. So if I'm on level 1 and the goal is on level 2 then first I will find a path to some stairs, then from there a path to the goal. This leaves the following possibilities unsolved though:
1) What if the nearest stairs don't access an area where the goal is (but some other stairs do)
2) What if the goal is on the same floor, but the shortest path involves going upstairs then back down again.

I will illustrate all of this in a crudely drawn diagram drawn in MSPaint :)

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

I think I'm going to solve this mostly via level design. Don't design anything that will have the problems that come with my "stairs first" approach. I don't think it would be that much of a restriction for what I have planned for this system.

Also RE: the fellow who said we should all post what we're working on; I've been on an MMO for the best part of 9 months now and it's finally starting to shape up :)


- Matt, Rustyarcade.com

OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2013-03-03 07:51:27 Reply

I learned about slope detection from here

http://acidleaf.com/as3-slope-detection-for-non-uniform-terr ains/

I've always thought slope detection was "OMG SLOPES so hard and advanced" but it's really easy, at least with that approach.

As for what I'm working on, I'm still stressed about getting an impressive demo to show for GDC. The "Best in Play" winners were announced. We didn't get anything, but damn there are some awesome looking games:

www.gdconf.com/events/bestinplay.html

Also, if you have an iPhone, search for "Move or Die" in the appstore.

FlyingColours
FlyingColours
  • Member since: Jul. 3, 2011
  • Offline.
Forum Stats
Member
Level 06
Programmer
Response to The Flash 'Reg' Lounge 2013-03-03 08:47:20 Reply

I wonder if you experienced programmers feel the same... Maths in code seems to be much harder than maths in mathematical notation. I mean, lately, I've been working with nothing more than y=mx+c and very basic trig in Flash, but it was enough to give me quite a headache.

It was particularly frustrating when I scratched my head over Math.cos() for a long time, then realised the input was supposed to be in radians, not degrees. :(