Be a Supporter!

The Flash 'Reg' Lounge

  • 2,171,921 Views
  • 64,739 Replies
New Topic Respond to this Topic
Sandremss128
Sandremss128
  • Member since: Aug. 22, 2009
  • Offline.
Forum Stats
Member
Level 11
Programmer
Response to The Flash 'Reg' Lounge 2012-06-04 12:22:40 Reply

At 6/4/12 10:08 AM, Tree-SkyLark-BCE wrote:
At 6/4/12 09:29 AM, Sam wrote:
At 6/4/12 07:41 AM, Sandremss128 wrote: You can make a game and compile it as a flash for the web, after that with the same code you can compile for android.
With NO modifications to the code at all?
Using NME, one can target multiple platforms without modifying the source code.

yeah nme is really good at that. When I said the same code I mean the 99% of the logic code and rendering. Its possible that you have to rewrite the input for mobile for example since mouse input won't work for that, as well as some other little things along the way.
It's really powerful and works really well.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-04 15:46:33 Reply

Long live NME.

OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-04 15:46:51 Reply

At 6/4/12 12:22 PM, Sandremss128 wrote:
Using NME, one can target multiple platforms without modifying the source code.
yeah nme is really good at that. When I said the same code I mean the 99% of the logic code and rendering. Its possible that you have to rewrite the input for mobile for example since mouse input won't work for that, as well as some other little things along the way.
It's really powerful and works really well.

Yeah, haXe is brilliant. The only reason I'm not using it right now is that it feels there's not enough support for it out there. Currently the only one who answers questions on the NME forums is the creator himself (or I think he is one of the people who created it, can't be sure). Like I feel there's not enough of a documentation there. There is one but it just lists all the functions and API's, doesn't really tell you what they do or give examples on using them, and because not a lot of people use haXe in the first you'd be hard pressed finding that one guy that wrote a blogpost about that nifty code feature.

Another example is when I made a dummy iPhone app just to see how awesome it would be to compile to iOS with haXe, and it worked. But when I tried using device-specific functions like the iOS's alerts or so there wasn't much on NME saying what to do in that case, and it turns out I had to either find someone who wrote an extension to do that (written in the target device's native language I believe) or write one myself. And since I was using haXe so I can avoid using objective-c that defeated the purpose for me a bit.

So I think haXe is really an easier way to develop cross platform, not a method if you can't otherwise do so. Such that when you come across problems such as this, you can dig into the source code and hack your own solutions.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-04 16:29:01 Reply

At 6/4/12 03:46 PM, 4urentertainment wrote: Yeah, haXe is brilliant. The only reason I'm not using it right now is that it feels there's not enough support for it out there. Like I feel there's not enough of a documentation there.
But when I tried using device-specific functions like the iOS's alerts or so there wasn't much on NME saying what to do in that case, and it turns out I had to either find someone who wrote an extension to do that (written in the target device's native language I believe) or write one myself.

They'll have mobile extensions coming up afaik, for Android and iOS specific stuff.

And if you need support, just get on the #haxe IRC on freenode. Very good place to ask questions.

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge 2012-06-04 21:30:47 Reply

I hear a lot about haxe for a few years now, but why is it I've never seen anyone use it? Are there any real commercial examples of successful haxe games?

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-05 02:57:05 Reply

At 6/4/12 09:30 PM, PrettyMuchBryce wrote: I hear a lot about haxe for a few years now, but why is it I've never seen anyone use it? Are there any real commercial examples of successful haxe games?

Of course! There have been several bigger Flash games made with it, though I can't exactly remember which ones (AFAIK), and for more you can see a showcase:
http://www.haxenme.org/showcase/

'Tis not hard to findeth.

Sam
Sam
  • Member since: Oct. 1, 2005
  • Offline.
Forum Stats
Moderator
Level 19
Programmer
Response to The Flash 'Reg' Lounge 2012-06-05 09:42:54 Reply

At 6/5/12 02:57 AM, PSvils wrote: Of course! There have been several bigger Flash games made with it, though I can't exactly remember which ones (AFAIK), and for more you can see a showcase:
http://www.haxenme.org/showcase/

'Tis not hard to findeth.

You've spiked my interest.

Gonna have to take a look at this now.

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge 2012-06-06 20:54:35 Reply

I updated the example file on my EasyStarAS3 API.
https://github.com/prettymuchbryce/EasyStarAS3

I have a few features I want to implement next.
- Diagonal movement
- Ability to process multiple paths at once
- Revamping the way I handle avoiding additional tiles

I also want to fix up the tutorial in the markdown. I don't know. I'm very open to ideas on how to make this easier to use. Someone suggested that requiring vector.<vector.<uint>>'s might be confusing to some people. I'm not sure how to avoid that. Knowing how to set up a 2D tilemap might be a prerequisite for using the API.

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 2012-06-06 21:11:46 Reply

At 6/6/12 08:54 PM, PrettyMuchBryce wrote: I also want to fix up the tutorial in the markdown. I don't know. I'm very open to ideas on how to make this easier to use. Someone suggested that requiring vector.<vector.<uint>>'s might be confusing to some people. I'm not sure how to avoid that. Knowing how to set up a 2D tilemap might be a prerequisite for using the API.

You could ask for an array and force the user to call a function (or run it during the set method) that loops through the array and gives the values to a new VecVecUint. Type-check each value and throw an error.

OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-07 08:23:23 Reply

At 6/6/12 08:54 PM, PrettyMuchBryce wrote: I updated the example file on my EasyStarAS3 API.
https://github.com/prettymuchbryce/EasyStarAS3

I was going to make my own A* API eventually, but since you're already making one, here's what I was going to do.

The thing about pathfinding algorithms, and I think the reason I can only name a couple of flash games that have some form of path finding, is that most people tend to be intimidated by the fact that their game would need to be all tile-based or they would have to learn how to use tile maps.

But the thing is, you don't need the game to be tile based to get your algorithms working. Even in a heavily art based game where the levels are drawn by hand, you could just let the programmer specify a movieclip or a bitmap that would have the shape of the ground of that level, and you'd just uniformly place nodes in a grid over all the level and remove the nodes that are touching the ground.

It's simple, it's incredibly intuitive, works for all kinds of games and is super easy to use.

Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-09 18:00:47 Reply

I'm looking forward to participating in Game Jam 7 in a few weeks, it'll be my first chance in a long to be productive on things that I actually care about, like programming gaemz. I'm excited.

Also, every single one of you needs to take some Coursera computer science classes. I'm in a machine learning class right now and I love it.

I used to think A* was the shit, until I took a neural network to the knee
MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-09 19:53:39 Reply

At 6/9/12 06:00 PM, Archawn wrote: Also, every single one of you needs to take some Coursera computer science classes. I'm in a machine learning class right now and I love it.

Same thing with Saylor (I haven't used it yet, but hopefully either gives me an edge in my curric :)) <- how do you end a parenthetical with a smiley?

Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 08:34:10 Reply

At 6/9/12 07:53 PM, MSGhero wrote:
At 6/9/12 06:00 PM, Archawn wrote: Also, every single one of you needs to take some Coursera computer science classes. I'm in a machine learning class right now and I love it.
Same thing with Saylor (I haven't used it yet, but hopefully either gives me an edge in my curric :)) <- how do you end a parenthetical with a smiley?

While we're on the subject of free online classes, mentioning Udacity once again seems appropriate. (And come on, who can't resist Sebastian Thrun? :))

I might try starting a team for their "High School Challenge" to get some of my friends more interested/involved in computer science.

Archawn
Archawn
  • Member since: Sep. 9, 2007
  • Offline.
Forum Stats
Member
Level 27
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 09:00:00 Reply

On a side note, when I rolled over my last post and saw this, for an instant I thought Newgrounds had finally implemented an edit button.

But to my disappointment it was only a misplaced "Edit Signature" button

The Flash 'Reg' Lounge

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 10:34:46 Reply

At 6/7/12 08:23 AM, 4urentertainment wrote: by the fact that their game would need to be all tile-based or they would have to learn how to use tile maps.

Since when?

GristlyBear
GristlyBear
  • Member since: Jul. 30, 2011
  • Offline.
Forum Stats
Member
Level 24
Animator
Response to The Flash 'Reg' Lounge 2012-06-10 11:23:49 Reply

Heyoz, I've been kicking around the Flash forums for a while, so I figured I'd say hi!

I'm not all too familiar with AS3 (actually, I've only been learning C++ for about a month, and I'm finally starting to get a hang of AS3... kind of), but maybe I'll pick some stuff up from you guys by... osmosis or something?


BBS Signature
OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 12:06:14 Reply

At 6/10/12 10:34 AM, PSvils wrote:
At 6/7/12 08:23 AM, 4urentertainment wrote: by the fact that their game would need to be all tile-based or they would have to learn how to use tile maps.
Since when?

I've just always noticed the amount of art based games being larger than the amount of tile based games, and most tutorials and beginners start with art based games.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 14:09:13 Reply

At 6/10/12 12:06 PM, 4urentertainment wrote: I've just always noticed the amount of art based games being larger than the amount of tile based games, and most tutorials and beginners start with art based games.

But why does pathfinding need tile based maps? (It doesn't...)

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 14:55:49 Reply

At 6/10/12 11:23 AM, webufs wrote: Heyoz, I've been kicking around the Flash forums for a while, so I figured I'd say hi!

I'm not all too familiar with AS3 (actually, I've only been learning C++ for about a month, and I'm finally starting to get a hang of AS3... kind of), but maybe I'll pick some stuff up from you guys by... osmosis or something?

Or by me telling you everything...

At 6/10/12 02:09 PM, PSvils wrote: But why does pathfinding need tile based maps? (It doesn't...)

Have any of you used NavMesh? I can't find much info about it, and I'm wondering how the path gets drawn considering there are an infinite number of points to go to and for the heuristic to use...What other pathfinding methods are there besides tile- or polygon-based?

I have a zombie thing that uses a few raytraces to avoid obstacles, though it doesn't learn anything from its environment...but zombies are stupid, so ha.

PrettyMuchBryce
PrettyMuchBryce
  • Member since: Mar. 17, 2001
  • Offline.
Forum Stats
Member
Level 06
Blank Slate
Response to The Flash 'Reg' Lounge 2012-06-10 15:33:51 Reply

At 6/10/12 11:23 AM, webufs wrote: Heyoz, I've been kicking around the Flash forums for a while, so I figured I'd say hi!

Hey! Welcome.

At 6/7/12 08:23 AM, 4urentertainment wrote: I was going to make my own A* API eventually, but since you're already making one, here's what I was going to do.

I've just always noticed the amount of art based games being larger than the amount of tile based games, and most tutorials and beginners start with art based games.

I agree with you. Most beginners to flash are getting started in CS5 the tool, and working their way up through that. I think you're completely right, however; I think a pathfinding library in that vein would probably be a separate effort, and a separate codebase. I like the idea.

If anyone ever wants to contribute to EasyStar, just check out the code and do a pull request. Diagonal movement is some pretty low hanging fruit of a feature that anyone could tackle. Then you would be a true open source contributor! Wow! I'm pretty sure ladies would instantly flock to you.

p.s. Anyone doing the AustinBreed gamejam ? I want to do it, but I will be on an airplane / on vacation during the jam. I feel lame that something comes up every time I want to do one of these. Maybe I can try for a solo entry -- that way I don't let anybody down if I can't finish.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 15:35:49 Reply

At 6/10/12 02:55 PM, MSGhero wrote: Have any of you used NavMesh? I can't find much info about it, and I'm wondering how the path gets drawn considering there are an infinite number of points to go to and for the heuristic to use...What other pathfinding methods are there besides tile- or polygon-based?

I'll be working on a polygonal pathfinding map representation for my game probably, it would be really interesting to have, since then the AI also has complete info about where he's allowed to go. But there technically isn't an infinite amount of points, navigating a polygonal map is the same as nodes/edges, you just use the points of each polygon, and also possibly its centroid or midpoints. Then you can also smooth the path afterwards and stuff, etc. etc.
The heuristic is simply the distance.

There isn't any other types, and technically tilebased is a simplification of polygonal representations of maps. I guess a 3rd type of representation is an attractor/repeller map, basically gravity and anti-gravity fields that control AIs. Simple life sim for example would have each fire hazard a repeller, and water patches attractors. And of course other same species could be attractors in certain situations etc., good for stuff that doesn't need a lot of accuracy, and just an overall simple behaviour for lots of objects I guess.

I have a zombie thing that uses a few raytraces to avoid obstacles, though it doesn't learn anything from its environment...but zombies are stupid, so ha.

First misconception in game AI, "pathfinding must always be perfect".
Imperfect approximations in pathfinding and slight errors (nothing too serious obviously) give characters personality/character, and can get a more realistic feel sometimes...or most likely players won't even notice it.

MSGhero
MSGhero
  • Member since: Dec. 15, 2010
  • Offline.
Forum Stats
Supporter
Level 16
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 16:40:15 Reply

At 6/10/12 03:35 PM, PSvils wrote: First misconception in game AI, "pathfinding must always be perfect".

No, it MUST be PERFECT.

So for polys, you just go from midpoint to midpoint or vertex to vertex or whatever? In that regard, it seems like you could just lay down waypoints at those locations and then smooth the path. When I read about polys, it said something like "the polygons define the space that the ai can traverse"; but vertex/midpoint/centroids limit where it checks. What if a straight line is the best path, and your triangles are weirdo scalene with their centroids and vertices all over the place?

OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 16:54:53 Reply

At 6/10/12 02:09 PM, PSvils wrote:
At 6/10/12 12:06 PM, 4urentertainment wrote: I've just always noticed the amount of art based games being larger than the amount of tile based games, and most tutorials and beginners start with art based games.
But why does pathfinding need tile based maps? (It doesn't...)

That's exactly what I'm saying. I've yet to see someone make a pathfinding API that doesn't need (or at least, doesn't imply that) the game needs to be tile based.

PSvils
PSvils
  • Member since: Feb. 3, 2010
  • Offline.
Forum Stats
Member
Level 01
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 17:23:26 Reply

At 6/10/12 04:40 PM, MSGhero wrote:
At 6/10/12 03:35 PM, PSvils wrote: First misconception in game AI, "pathfinding must always be perfect".
No, it MUST be PERFECT.

So for polys, you just go from midpoint to midpoint or vertex to vertex or whatever? In that regard, it seems like you could just lay down waypoints at those locations and then smooth the path. When I read about polys, it said something like "the polygons define the space that the ai can traverse"; but vertex/midpoint/centroids limit where it checks.

You're talking about 2 different things...
Polygons not only hold info for pathfinding, but general AI interactions with the world. The AI in other movements can check with the poly map. Thing is, pathfinding isn't the only thing an AI does. To pathfind you only need vertices, midpoints, and centroids. Obviously you can just set nodes there, but you're just missing an opportunity to give your AI more info.

What if a straight line is the best path, and your triangles are weirdo scalene with their centroids and vertices all over the place?

Hence path smoothing...

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-10 21:05:10 Reply

Just use a graph as the base of your pathfinding

its the same algorithm, and a tilemap can be trivially converted into a graph

JKR
JKR
  • Member since: Jan. 1, 2005
  • Offline.
Forum Stats
Member
Level 29
Animator
Response to The Flash 'Reg' Lounge 2012-06-11 12:18:37 Reply

I used to post in the ol' Lounge a lot back in the day... How's it been?

Just thought while I was here I'd say hello. Doubt any of the old regulars I used to talk to remain, but ah well! I myself have begun the transition from Flash to Toon Boom Animate. In terms of an animation tool, Toon Boom is insanely better. Doesn't have the AS stuff, though. Which works for me, since I want to do animation and not programming.

Anyway, hi everybody. And now I suppose I'll make my exit again...


BBS Signature
alwayssim
alwayssim
  • Member since: Dec. 4, 2011
  • Offline.
Forum Stats
Member
Level 01
Blank Slate
Response to The Flash 'Reg' Lounge 2012-06-12 16:35:00 Reply

I just had that frustrating but satisfying feeling when you solve a problem you've been having for ages and it turns out to be something really stupid.

I've had a problem for literally months with making movieclips rotate towards the direction of the character. My movieclips are stored in an array so they are sharks[0], sharks[1], sharks[2] etc. The issue I was having was that when the sharks rotation went from -180 to +180 it would just stop following the character. It was really frustrating because I wasn't having the same problem when they went from +180 to -180. It been literally months and every now and again I've gone back to it trying to isolate the issue. I tried soooo many different things!

Turns out I had written sharks.rotation instead of sharks[i].rotation in one location. No error message so I never knew anything was up. I'm so satisfied now I've found it, but annoyed that it was something so tiny and stupid.

Anyone else got any annoying stories like this?

ProfessorFlash
ProfessorFlash
  • Member since: Oct. 6, 2007
  • Offline.
Forum Stats
Member
Level 32
Programmer
Response to The Flash 'Reg' Lounge 2012-06-12 16:55:00 Reply

At 6/12/12 04:35 PM, alwayssim wrote: Turns out I had written sharks.rotation instead of sharks[i].rotation in one location. No error message so I never knew anything was up. I'm so satisfied now I've found it, but annoyed that it was something so tiny and stupid.

Anyone else got any annoying stories like this?

What program are you using to write your code? If you call for 'rotation' property on an array, which obviously doesn't exist, you should get an error. Get Flash Develop immediately, would save you from these things :).

But speaking of annoying errors, I had one today. I'm making a game that loads an image from a server, and I made multiple changes to the image and uploaded it to the server again replacing the old one. But my game didn't want to load this new image. I was very puzzled about this, and found out like after an hour trying to figure it out that it was firefox who refused to load the image again. It was pulling the old image somewhere else for some odd reason. Not even ctrl f5 refresh helped the problem. I used to be a supporter of firefox, but after this ordeal Chrome looking much better to me. I still do not quite understand how firefox prevents a swf from loading an image from the server and rather insert the old image somewhere between there.


You can solve pretty much any problem you may have with AS3 by consulting the AS3 Language reference.

egg82
egg82
  • Member since: Jun. 24, 2006
  • Offline.
Forum Stats
Member
Level 05
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-12 17:06:29 Reply

At 6/12/12 04:55 PM, ProfessorFlash wrote: But speaking of annoying errors, I had one today. I'm making a game that loads an image from a server, and I made multiple changes to the image and uploaded it to the server again replacing the old one. But my game didn't want to load this new image. I was very puzzled about this, and found out like after an hour trying to figure it out that it was firefox who refused to load the image again. It was pulling the old image somewhere else for some odd reason. Not even ctrl f5 refresh helped the problem. I used to be a supporter of firefox, but after this ordeal Chrome looking much better to me. I still do not quite understand how firefox prevents a swf from loading an image from the server and rather insert the old image somewhere between there.

Ah, I had this same problem (dynamic loading screen backgrounds) - It's Firefox's cache

Though i'm sure you know this, i'm putting it out there anyway.
A cache helps web browsers load pages faster. If the image is already stored locally, it just grabs the one on your hard-drive (in your temporary internet files) and uses that rather than loading a whole new image.

As to the F5 problem: I think I had the same problem. I can't exactly remember how I fixed it (I think I cleared the cache manually) but F5 doesn't work for some reason, which is odd because it's supposed to be a "total refresh"

As to my stories: I have many, many stories of frustraing code that i've solved. Can I remember one now? No, but I wish.


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

BBS Signature
OmarShehata
OmarShehata
  • Member since: Aug. 1, 2008
  • Offline.
Forum Stats
Moderator
Level 13
Game Developer
Response to The Flash 'Reg' Lounge 2012-06-25 04:36:42 Reply

Man, I had to fish this topic from the third page, ARE YOU ALL DEAD???

Anyway, we've started officially working on Concerned Joe's sequel (I wouldn't call it Concerned Joe 2 because it's more of a spiritual successor, like it doesn't build off the previous game, it just recreates it with a new and vast-er experience)

We even made a website and a devblog!

http://concerned-joe.com/

So I'd like to know what you guys think, maybe if you think the devblog is interesting etc..