May take a programming course - deciding which one to pick

Started by fellowroot, November 20, 2012, 05:37:32 AM

Previous topic - Next topic

fellowroot

My background:

Math and physics major. Have taken a programming logic and design course and took visual basic, but didn't learn much in visual basic.


What I want:

I would like to be able to create programs like game editors like Lunar Magic. For example I want to make a game editor for Lode Runner 64. I also want to know how to hack and program NES and SNES games.


Here are the courses:

Programming In Pascal

Programming With C

Software Development With Java

Comp Org & Assembly Language

Thanks.


furrykef

In my opinion, you don't need any of them. I did not learn programming in school and do not think I would have benefitted much from it. (Anything I would actually benefit from would likely be more from things such as mathematics, or proper "computer science" as opposed to mere programming. None of that stuff is needed for hacking ROMs or making level editors.) I'm surprised there are places still offering courses in Pascal, a language that is absolutely useless in today's world, even as a "teaching language" in my opinion. C is a good language to know and every serious programmer should learn it. Java is also a good language to know, although I don't personally like it, but I think C is a better option. If you're looking for a computer science degree, by all means take the courses. If you're just looking to learn how to hack games, though, you don't need them; it is quite easy to learn programming in any language on your own.

My personal opinion is go to www.python.org and download Python 2.7.3 for 32-bit Windows (2.7.3 because the 3.x branch is still not ready for prime-time yet; 32-bit because I suspect many packages will require it). Python is an excellent programming language both for newbie programmers and experts alike. There is a tutorial on their website (also included in the help file) which you should be able to follow. Python would be a fine language to use to make a level editor, and the knowledge you gain in learning it will help you learn other things such as 65816 assembly language, which you will need to know to disassemble SNES games. (For Genesis games, you would instead learn M68k, etc. -- but once you've got one assembly language down pat, it's easy to learn any other.)

Good luck and happy hacking!

LostTemplar

I agree that a course isn't actually necessary. Programming can really be learned only by programming yourself anyway, even in a course environment. But out of those, I concur that either the C or the Java one are the most promising; but for your purposes, although it's not my personal favorite, I'd actually pick Java because it's object oriented. If you know Java then it's easy enough to learn C++ or C# as well. Especially with the latter (and Java itself, for that matter) you should be able to easily program level editors etc. You'd practically be confined to Windows with C#, though. In that regard, Java is probably superior. (Note: I personally prefer C++, but to the beginner it certainly is more difficult to build a complex GUI application than with the other two languages.)

As for Python, I always thought it was great for smallish programs, but personally I wouldn't develop large applications with it (and a full-fledged level editor is large, at least for an individual's work). It's of course very possible, though. If you find that you like Python more than the other languages you should definitely give it a try.

For hacking SNES and NES games "Comp Org & Assembly Language" could be a good start, but as with programming, a lot boils down to experience here as well. If you know one assembly language, you basically know them all. The rest comes from how well you know the system (SNES/NES) you're operating on, so it's definitely a good head start if you know how a computer works in general.

doop

You're not confined to Windows if you use C#. C# works on any platform that Mono runs on, which from the latest list seems to be Windows, Mac OS X, Linux, Android and iOS.

LostTemplar

Good to know. I thought Mono still had compatibility issues, that's why I said "practically". But if it works great I'd actually recommend C# over Java.

furrykef

Quote from: Rhys on November 20, 2012, 07:52:14 AMYou're not confined to Windows if you use C#. C# works on any platform that Mono runs on, which from the latest list seems to be Windows, Mac OS X, Linux, Android and iOS.
From what I understand, though, Mono is horribly crippled compared to what you get on Windows. You get enough to run the language but you don't get all the GUI stuff and whatnot.

RedComet

I think you're confusing MonoDevelop with Mono. MonoDevelop is an IDE similar to Visual Studio. True, VS has quite a bit more features, but having used both, I'd say they're both pretty quality products. Especially for a beginner. If you're just starting out, you're gonna be too overwhelmed with learning to program to be concerned with exploiting all of your IDE's productivity features.
Twilight Translations - More than just Dragonball Z. :P

STARWIN

You won't learn to hack by taking these courses, but you can learn, at least, comp org by trying to hack. You can of course take courses for fun anyway, and comp org course can support hacking by introducing various basics to you. If the teacher is good.

You can make an editor after you know what the bytes in the game mean, basically. Which programming language you use for making the tool doesn't necessarily matter so much, people have different preferences.

C is a relatively simple language to understand, a "high-level" assembly language in that it is portable and more efficient to write, and you have some basic library functions (like writing/reading from a file). I'd say C is a good language for learning to think in an organized manner, but involves more writing and reinventing the wheel (which is good for learning though). C provides no nice way to create a GUI for your editor, however. You'd have to use some third party library for that.

Some of the more complex languages most likely have tools for writing a GUI included. They also tend to check your code more, and complain if you do something that you don't intend to (C won't - so it can take a longer time to notice a bug). But many of them have 1. more concepts for you to understand and 2. massive basic libraries, that may overwhelm your comprehension (looking at java..).

If you don't "have" your first language yet, it can take some time to find one that you like.. or that you can get to work. Setting the environment up first time can be frustrating sometimes. You might prefer languages that can be easily compiled at command-line, if such frustration occurs. But this point may not be so relevant if not using third-party libraries though.

doop

Mono goes up to .NET 4, there's a couple of frameworks left intentionally in implemented (WPF for one), but in terms of core language functionality, Mono is completely up to date. It's a far cry from crippled that's for sure. You're probably thinking of how Mono was in 2006-7. Things have changed a lot since then :P

furrykef

Quote from: RedComet on November 20, 2012, 10:01:49 AMI think you're confusing MonoDevelop with Mono. MonoDevelop is an IDE similar to Visual Studio.
No, no, by "GUI stuff" I mean stuff to make GUI apps with. I don't care about IDEs and in fact I do my coding in a program called Notepad2 (which is pretty much Notepad, but with syntax highlighting and several other important additions).

It's quite possible my information on this is out of date, though, as I don't use .NET at all, nor do I currently use Linux (aside from running a web server).

Garoth Moulinoski

If there's any advantage to taking any programming courses, it'll be that you could pick up some "good practices". Comment your code, use proper indentation to signify scoping (some languages make you use this, like F#), and make your code modular. I've seen many self-made programmers write some of the ugliest, bizarro copy-and-pasted code. That doesn't mean "University learned" programmers are any better, but at least they should know better.

I would take Computer Org & Assembly Language or Programming with C. Can never go wrong with C... until you tell it to do something it shouldn't. The results could then range from harmless segmentation faults to "HOW DID THIS HAPPEN?!?" (Specially if you end up writing kernel code and you screw up. Kernel Panic!) Mind you, I ended up taking both because I had to :P

Also, last I heard, Mono was horribly unstable on OSs other than Windows. This was around a year and a half or so ago (in school, I normally did Java/C but now for work I do PHP/Javascript).

I never tried to make a hacking tool, though so yeah. But you should learn about opcodes and registers and that good ASM stuff in the Assembly class. Ask, though, before you register. I don't think microcode will do you any good, although it may look a little similar to ASM. Also, ASM is hardware dependent. If you do take the Assembly class and it's ASM (and not microcode), you may end up learning ASM for the Little Computer 3 (or whatever iteration they're on now).

IDEs are good not just for syntax highlighting, but also code completion. They're not necessary, but they can provide small shortcuts. I have a friend who has plugins for Emacs which provides him with code completion among other things. It comes with syntax highlighting by default (if I remember correctly). I'm not sure if there's Emacs for Windows, though. I mainly use Linux for my programming stuff (and sorta, general use).
Who will quote me next?
Disclaimer: If it sounds wrong, I may have been posting while asleep.

doop

That's interesting, I've found it perfectly fine, I guess the changes were a lot more recent then :P

In terms of UIs, Mono has GTK bindings for cross platform interfaces, and GTK is what MonoDevelop's made with.

FAST6191

I kind of went when the OP previously asked the question in the game programming discussion but I reckon I will go again.

On programming courses- I have little to add to what the others have said other than various places have put entire lecture series' online with some of the stuff from MIT and http://www.youtube.com/watch?v=hE7l6Adoiiw&feature=BFa&list=EC6B940F08B9773B9F being among my favourites.

On python- I agree I would probably not consider it first for a nice graphical level editor instead opting to use it for format conversion but looking around various people that do the high level game editors (pokemon, fire emblem, advance wars, some later final fantasy titles, golden sun and such) more than a few of those are coded with various amounts of python. C# is also quite popular from what I have seen for the nice high level program, C and C++ still get used often enough (usually mainly by those that have been around a while) but they are not a prominent as they once were. I can not speak to the relative merits of the various IDE and states of development vis a vis different platforms so I should probably end this line of thought here.

As for ASM as others said it is quite a different skillset to that which makes a nice GUI level editor and I also agree that once you get a rough idea of what goes as far as instructions available, what common concepts like DMA are and can build basic functions and decode others it is normally a matter of sitting down with a CPU and register listing, a set of hardware specifications (memory map, anything resembling a coprocessor and such) and spending some time to figure out what you can not do off the bat (are you allowed to read from memory in every instruction, is there a divide instruction, can you have an immediate that fills an entire register with FFFF (or FF or FFFFFFFF or.....) or will you have to generate such a pattern (stick in FF, shift it to make FF00 and then add FF for instance).
Links though
http://www.plantation-productions.com/Webster/
http://stuff.pypt.lt/ggt80x86a/asm1.htm
http://www.coranac.com/tonc/text/asm.htm - less guide than the above two but a no less valuable thought exercise
It gets very odd once you get into the higher levels of modern intel/AMD stuff (masses of pipelining, branch prediction and what have you) but so very few people ever have to deal with that in a real sense nowadays.
Others hinted at it but where C and maybe C++ will leave you with some idea of what goes on at the lower levels (you might not have to set memory addresses but you will have to manage buffers "in your head" so to speak else spend half the time doing bounds checking) the others will not do it as a matter of course. It does make the latter languages somewhat nicer to program in though and java certainly has support for some of the nicer concepts you can play with (various types of linked lists for instance).

Edit- for the sake of another link
http://www.greenteapress.com/thinkpython/

furrykef

Quote from: Garoth Moulinoski on November 20, 2012, 12:47:53 PMIf there's any advantage to taking any programming courses, it'll be that you could pick up some "good practices". Comment your code, use proper indentation to signify scoping (some languages make you use this, like F#), and make your code modular. I've seen many self-made programmers write some of the ugliest, bizarro copy-and-pasted code. That doesn't mean "University learned" programmers are any better, but at least they should know better.
Any self-taught programmer will still learn that you should do these things. I'm self-taught and I'm nearly obsessed with these things. In my high school programming classes, other people would try to get me to fix their program, and it was invariably an unreadable mess. I never wrote code like that even in my earliest days (and believe me, I was no programming savant). I always told them to make it readable first and went back to my computer.

(If you've been paying attention, you'll notice I said I didn't learn programming in school and now I'm saying I had programming classes. These are not contradictory. In all four years, the only thing I learned in class that I didn't already know was Pascal, which we only used the first year, so it contributed to only a tiny fraction of my programming knowledge.)

LostTemplar

Quote from: furrykef on November 20, 2012, 11:08:57 PM
Any self-taught programmer will still learn that you should do these things.

Looking at some source code that's floating around the internet (for example, or especially, emulators) I'd say this assumption is false. Everybody should learn to program properly, but a lot of people don't, be it in class or self-taught. I also think code can be aesthetic or ugly, which, I admit, depends alot on personal preferences though.

Garoth Moulinoski

#15
Quote from: furrykef on November 20, 2012, 11:08:57 PMI'm self-taught and I'm nearly obsessed with these things.

That's good! I wish more people were like you. :'(

Quote from: furrykef on November 20, 2012, 11:08:57 PM
(If you've been paying attention, you'll notice I said I didn't learn programming in school and now I'm saying I had programming classes. These are not contradictory. In all four years, the only thing I learned in class that I didn't already know was Pascal, which we only used the first year, so it contributed to only a tiny fraction of my programming knowledge.)

Yeah, I did notice that. But it does make sense. At least you did some sort of programming in High School. For me, Programming I and II were just the name. The reality was that it should have been called "Unreal Tournament Fest" or "Rise of Nations Fest" We even had a guy once bring a Gamecube and Super Smash Bros. It sucked. I did manage to do some stuff in Visual Basic, before I succumbed to the masses (because I kinda liked Rise of Nations... I 'won' both times I played). But yeah, Visual Basic. I did a few games on it, actually, including a GBC like reproduction of the Dragon Quest battle engine.

But before that, I was doing stuff in RPG Maker when I was in Middle School, and not just RPGs, either (I made a fighting game and a racing game)! I may still have the fighting game lying around. Considering what I used, they both sucked, but hey, I made RPG Maker do something it wasn't designed to do!

... and I rambled on... Sorry about that.

Quote from: LostTemplar on November 21, 2012, 03:30:47 AM
Looking at some source code that's floating around the internet (for example, or especially, emulators) I'd say this assumption is false. Everybody should learn to program properly, but a lot of people don't, be it in class or self-taught. I also think code can be aesthetic or ugly, which, I admit, depends alot on personal preferences though.

Yeah, I think I already said it, but even some of my peers from school ignored the proper programming practices. "HEY, I NEED A VARIABLE, LET'S CALL IT $x AND CALL IT A DAY HUH!" Seriously, I hate it when I see a variable called a single letter. I actually go a step further and add the data type, so I have variables like $intPositionOfFirstA or $strArticleText*

*PHP is the freshest language in my mind right now.

Edit: Something I forgot. In school, you also get algorithms spoonfed for you. Again, it's not something you can't learn or even pick up on your own, but it's given to you and you're asked to play with it in order to practice it. You also get taught about speed and code optimization, which can also be picked up, but in school, it's given to you. I've seen a lot of would-be programmers have a whole equation in a loop's condition statement where a simple value could have taken its place, like



$strText = "Hello World!";

...

while (strlen($strText) != 0)
{
    //do something that would make $strText's length shrink until 0
}


instead of



$strText = "Hello World!";
$intTextLength = strlen($strText);

...

while ($intTextLength != 0)
{
    //do something that would make $strText's length shrink until 0
}


Specially when you end up dealing with a gigantic array, you'll want to make sure you're making the computer do the least amount of work as you can. The above may be a little excusable in ASM as you don't always have the amount of registers as you'd like, but in high level languages... No excuse.
Who will quote me next?
Disclaimer: If it sounds wrong, I may have been posting while asleep.

furrykef

Quote from: LostTemplar on November 21, 2012, 03:30:47 AMLooking at some source code that's floating around the internet (for example, or especially, emulators) I'd say this assumption is false. Everybody should learn to program properly, but a lot of people don't, be it in class or self-taught. I also think code can be aesthetic or ugly, which, I admit, depends alot on personal preferences though.
I don't disagree. What I meant is that all programmers are taught to write well-written, documented code. Whether they actually bother to do so is another matter.

Quote from: Garoth MoulinoskiI actually go a step further and add the data type, so I have variables like $intPositionOfFirstA or $strArticleText
I don't like this convention. I think ideally a variable's name will give a good indication of its type. For instance, $article_text already strongly suggests a string; the "str" is superfluous.

I'm also perfectly fine with one-letter variable names when the context makes its use very obvious. This usually means for loop iteration variables (though these do sometimes benefit from longer names and I try to use them in such cases) and x/y coordinates. Pretty much anything else gets a descriptive name.

QuotePHP is the freshest language in my mind right now.
*shudder* PHP is a pretty poor programming language. Here's why.

InfamousKnight

I kinda like proving my teacher wrong! I didn't learn ANYTHING in computer programming 1 in 10th grade since I learn all my programming at home. Probably the only thing I learned was checking a range of numbers... that's it. I was really upset that I couldn't figure out a bouncing ball program. I have done MUCH MUCH MUCH more advanced.. That is like tamed to what I can do these days. And apparently I couldn't figure it out that quickly :P I was making stupid mistakes because I really wasn't trying :P

BRPXQZME

Quote from: Garoth Moulinoski on November 21, 2012, 10:38:48 AM


$strText = "Hello World!";
$intTextLength = strlen($strText);

...

while ($intTextLength != 0)
{
    //do something that would make $strText's length shrink until 0
}

This would be an infinite loop, wouldn't it? Operations in a condition check are A-OK as long as they make paradigmatic sense and aren't terribly expensive.

I'm also okay with one-letter variables being used for obvious and transient purposes. Saves typing time, confuses nobody.
we are in a horrible and deadly danger

furrykef

You pasted the wrong code snippet. But yeah, that would be an infinite loop unless you modified the string in every iteration -- which you could certainly do, though.

The main problem with that idea is that you'll probably want to process the string starting at the beginning, not at the end, and removing a character from the beginning of a string might not be an O(1) operation. If you are doing this regardless, though, then using strlen() in the condition would be superior to using a counter variable, because you know that the variable will never be out of sync with the size of the string no matter what you do to the code inside the block.