Forums

ForumsProgramming Forum

Steps to learning to program

Posted Apr 1, '13 at 8:09pm

Darkroot

Darkroot

2,875 posts

I've seen alot of question about how to start making flash games but the real underlying problem is that people do not know how to program. I believe this stems from a lack of self direction rather then motivation. Thus I will try my best to provide resources for that struggle and you provide the motivation to learn.

Since this guide is intended to lead you to learning how to make flash games I believe it will be the best if we start out with java since the languages are similar.

Here we go,

1. Learn basic java programming with some basic OOP to boot. Make sure you are not only reading you need to also pratice, pratice, pratice.

2. Congratulation you are now a programmer albeit a beginner, you can solve simple problems and implement simple dynamic programs using basic OOP. Though you probably suck at actually coding in flash and as3. No problem, I got you covered. How to code neatly:
Classes in AS3 part 1
Classes in AS3 part 2
Classes in AS3 part 3
Classes in AS3 part 4

Are you still practicing you programming in as3 and java? Good, if not then pick up the slack...slacker.

3. Wow you can make programs? No longer is your code cheap scrambled spaghetti and is instead prime untangled strands of delicious linguini? Good we can move on. At this point you have all the tools and knowledge to create a game but not much experience so it will be a struggle as you hit all the bumps every programmer before you has hit. Your job is to work though those bumps and head toward the light.
Flash Game University is a decent book on how to make game it assume you can pretty much program and heads into the nitty gritty. I starts out with simple games like matching and then it get more complicated with platformers and more complex games.
The author provide the source files on the game on the website for buyers of the book but there is nothing stopping you from downloading them except your morals. There are tons of other resources for games if you Google them.

Also remember programming is not something you pick up quickly or every stop learning.

I hope this will help a few people, best of luck.

 

Posted Apr 1, '13 at 8:12pm

Darkroot

Darkroot

2,875 posts

I messed up the source file link. So here it is instead.

 

Posted Nov 11, '13 at 4:46am

arnavkumartechno

arnavkumartechno

5 posts

Thank you very much for this helpful post

 

Posted Mar 11, '14 at 7:50am

anubis4567

anubis4567

6 posts

Recently started teaching myself java (very recently, like 3 days into it lol), but came to this forum out of curiosity and figured I'd leave a link to the site I've been using. Been very helpful so far.

http://www.codecademy.com/

 

Posted Aug 23, '14 at 6:56pm

KTStudios

KTStudios

3 posts

I personally think that Java is a great language to start with, however C++ is even better, as it set the foundations of OOP and basically spawned all the other high-level programming languages. True, this is about Flash games, but it is dying out -- and soon will become obsolete, thanks to all the new features of HTML and JavaScript. In fact, some browsers are working on implementing C++ natively into them! (How cool is that!?)

In addition, C++ is the industry standard for games. From my personal experience, learning C++ first and then other languages will make your life a whole lot easier rather than vice versa -- learning Java first is simpler, sure, but when the time comes for you to move to C++, all those concepts will seem very foreign, and you'll quit. (At least for a while, anyway)

One thing is common, however whenever learning programming, wherever you start; practice all the time, as Darkroot mentioned.

Hope I offered some new insight!

 

Posted Feb 16, '15 at 4:30pm

Doombreed

Doombreed

3,952 posts

however C++ is even better

C++ is a great language to start learning but it has a MAJOR drawback: It's capabilities are massive. This sounds good but it is a nightmare for new programmers as the compiler will rarely fix your mistakes this way. Not to mention Logical errors, which will make the debugging process even more of a nightmare than it already is!

Of course it can be circumvented by starting from the beginning (ya know, simple stuff). I don't know about JAVA though.

 

Posted May 13, '15 at 10:48am

Pawe___8164

Pawe___8164

1 post

Doom, do you learn from mistakes better by getting corrected or by seeing the mistake and checking how come it's wrong?

 

Posted May 15, '15 at 10:06am

ChapZ

ChapZ

2,048 posts

It's better to check your code and look for the mistake, normally your mistake it's just a logical error that you will find some minutes later.

If you understand your mistakes, it's easier to undo future mistakes. If you let someone correct for you, even if you understand why it was not working, it's not the same thing.

Programming is like math. You need to practice to get better and better.

 

Posted May 17, '15 at 1:46am

Lysceed

Lysceed

15 posts

I agree with the above two posts. If you can figure out why, it's much better to fix stuff yourself for better knowledge than to let someone do it for you. I mean, it would make learning programming pretty ironic. Then again, there is a balance to consider, because you don't want to waste time learning Assembly to try to make a Photoshop clone.

That said, Java isn't a very good language to start into game programming. For one, its design philosophy doesn't really seem to support it from its basis. There's a reason most games aren't coded in Java. A good example is Minecraft. In this case, it's mostly to do with garbage collection than with actual code design (though I guess they go hand in hand) - Minecraft allocates 100-200Mb/s in memory, and then throws away what it doesn't use after a small period, which is very inefficient and can lead to lag spikes depending on how long that small period is. The author of Optifine, an optimization mod for Minecraft, has a write-up about it here. Of course, this is partially the coders' faults, since they could probably be handling the GC within Minecraft better using Java. If they were using C++, they'd be forced to use GC correctly, and actually, the way they do it now would be hard to try to implement.

I also heard that for the next generation of graphics APIs (Vulkan, DX12, Mantle) are trying to deal with this sort of issue in order to get more performance for users. Typically, in the past they're had a lot of error management (try/catch) to handle potential errors developers might have left in to make it easier for the user. Now they're relying on the developers to get it right, so that the end user has better performance when it actually works. It's hard to say how much of an improvement they'll have in the more popular graphics APIs like DX12 and glNext / Vulkan, but Mantle has already been used in a few cases, with obvious improvements over the alternative, DirectX 11, for the AMD cards.

All that goes to show that sometimes, in the hands of the developers, more freedom to run and frolic at the expense of messing up is better. One of the most common phrases I hear by great coders and electricians is "fail, and fail often." You don't learn anything by doing everything only correct the first time.

And really, logical errors are as important as arithmetic. It's boring, and can even be painful, but if you learn to do it right and do it a lot, it becomes a lot easier for you in the long run. In my Calc classes, my teacher made us do all the arithmetic and algebra in the problems we covered, even in the examples, just to make sure we didn't develop any bad habits along the way. Sure, you could just put it into a calculator, but then again, do you even need to program? You might as well just click a button that almost does what you want.

Programming is like math. You need to practice to get better and better.

Yeah, it is. I would say a big difference is, though, if you get something wrong, you have an incentive to fix it, so that you can get a result you want. With a bad math test, it's easy to put it away and to try not to think about it again.

 
Reply to Steps to learning to program

You must be logged in to post a reply!