I've made a couple flash games, ported one to mobile, and had a job making games in Unity so I have some experience here. Never used game maker myself, but it seems like a good tool for beginners. I actually got started with RPG Maker, which has an event system that taught me the basics of logic and conditional branches that forms the core of programming, and from there went on to edit it's existing scripts here and there and then finally coded a flash game from scratch after years of that. RPG Maker's a bit dated now I think so I'm not necessarily recommending it, just saying how I played around making stuff with it for years before actually seriously programming.
Used a bit of Unity at my old job for around 6 months or so, doing both 3D and 2D stuff, and it's a pretty great tool but I wasn't a fan of the 2D side of it. Coming from flash game programming, it just felt like so much extra overhead to make 2D work with it since Unity essentially a 3D engine, plus it's 2D is still a fairly new and not quite as fleshed out as it's 3D features.
Currently I'm using
HaxeFlixel for its great cross-platform capabilities. You write code in Haxe (very similar to AS3) and you're able to compile it to desktop PC or Mac, a flash game, android, iOS, and a couple others. Most of the targets converts the Haxe code into native C++ code when you compile if I understand it correctly, so performance is supposed to be better than if it's wrapped in some sort of package.
I'd recommend a tool like Game Maker if you're totally new to making games, but if you wanted to try code from scratch, HaxeFlixel isn't too hard to get started with. It has a lot of it's own framework that I think most people use, but I ended up preferring to use Flash's own classes and display tree that I was familiar with which works totally fine.
Also regarding programming practices, I've found that basically every programmer has their way to write syntax that they think is "right," so just go with what you personally like. For example I like to use inline ternary operators inline for simple booleans and do stuff like
if (gamePaused) return true;
on one line where some programmers would go nuts at that and say the only "correct" way would be to have 4 lines of
if (gamePaused)
{
return true;
}
I think the convention of prefixing variables with types like "flMyFloat" may be left over from early programming when compilers and editors weren't as robust and it'd be harder to find errors, so I think it's a bit overkill myself, but if you like to use it go for it. A lot of tiny stuff like that's just a matter of opinion so just go with what you like.
