tfishell: I went back to trying to do some Actionscript 3, even though it's been over a year since I touched it. I'm working on a platformer right now. (I didn't really want to start from scratch all over again.)
I can
kind of understand parts of it (event listeners to listen if the keys are pressed down or not, setting variable Boolean to false so you can set it to true later/turn it on or off ),
but after line 84/ function mainJump or so, I don't really know what the math means.
johnki: I really, really recommend using
and [url=http://haxepunk.com/]Haxepunk or
HaxeFlixel.
Haxe is almost identical to ActionScript but open source and able to compile to multiple targets, has better speed for the most part, and although it will take some understanding of the command line to get them set up, the move is worth it.
HaxePunk and HaxeFlixel are ports of two game libraries originally written in ActionScript that pretty much allow you to jump straight into programming. HaxePunk has a lot of documentation due to being almost 100% compatible with all FlashPunk tutorials/scripts (exempting the fact that you have to change imports) and HaxeFlixel also has a similar amount of documentation due to Flixel with the main difference being that it's structured differently, though different people work better with different frameworks. You'd probably have to try both.
Reality is, I'm not sure I'll ever be able to fully wrap my head around programming, or at least be able to do it from scratch. (I majored [well, almost done] in graphic design even though I was interested in interactive media.) Even with your explanation (which I very much appreciate), it was hard for me to remember what each line did, or what each section of math really did. I just bring this up in an attempt to try to help you relate to my situation. I simply cannot automatically read something in a programming language and understand what it means, unlike other talented people.
Nevertheless, I'm interested in creating my own games and would like to persevere. Can you provide me with some solid game tutorials for HaxeFlixel? I suppose it might be best to start from scratch with the documentation provided on the site, but the reality is I'm not sure it will ultimately be worth spending the time to read through it all, and I won't be as motivated (unlike if I was working on something - a game - that I knew I would be interested in.)
tfishell: If somebody would be willing to provide a detailed explanation for lines 84 - 114 (or just 100 - 109, perhaps), I would appreciate it.
johnki: http://pastebin.com/H5XtuyyV Did my best to explain it, although when it comes to collisions with actual level objects and all, it will be exponentially easier if you use an existing framework because it's a lot of math dealing with intersections of two objects that may or may not be the same shape and all.
As I said above, thank you for taking the time to do this. Really hard for me to comprehend, but I certainly tried.
I can kind of understand how the character starts at (0,0) and moving up or down brings him into the negatives or positives, but I don't understand why going
up brings him into negatives and down brings him into the positives; I would think it would be the other way around. And I'm not really sure why 75 and 50 were chosen.
Can you link to what you mean by an "existing framework"? Were you referring to Haxe, Haxepunk, or HaxeFlixel?
EDIT: (In the meantime, until I hear back from you, I will continue with my current tutorial.)
EDIT: Downloaded HaxeFlixel, but will still wait to hear back.