I have decided that all future questions I shall ask, I will keep in one thread.
My first question is one directed towards NES programmers. Since I had such a determination to program for the NES, ASM was the first programming language I attempted to learn. I've been able to figure out a lot of things thanks to all the tutorials I've read on programming for the NES. I was developing a game, but I halted the process because I'm really not sure where to go and how I'm going to get any farther. Anything I want to do at this point just seems so far out there from what I currently know and have done. It occurred to me what a low level programming language I was dealing with when I explored C++. It seemed like tasks that would normally require several lines of code in ASM could be done in just a few lines in a higher level programming language. This brings me to my question: Would it help my ability to program for the NES if I knew a high level programming language? From what I've seen in these programming languages, it seems like programming for the NES would be easier if I knew a high level programming language alongside of ASM.
Dimeback's Thread of Questions
Moderator: Moderators
Re: Dimeback's Thread of Questions
A good programmer isn't one that knows many programming languages, but one that masters all the logic that makes programs work. The most important things you have to learn if you want to make games is logic and program flow (i.e. math, loops, conditionals, etc.) and data structures (arrays, pointers, lists, stacks, etc.). Once you master that, in whatever language you choose, you'll be equipped to make a game. ASM isn't difficult by itself, after all it's just a language you use to communicate with the system, but there's no point in learning the language if you don't know WHAT you have to say to the system.
Some people are comfortable with learning ASM as their first language, but if you're liking high level languages better, you can certainly learn a lot about what makes games tick with them and go back to the ASM later. ASM will certainly look much less intimidating once you're better acquainted with how programming in general works.
Some people are comfortable with learning ASM as their first language, but if you're liking high level languages better, you can certainly learn a lot about what makes games tick with them and go back to the ASM later. ASM will certainly look much less intimidating once you're better acquainted with how programming in general works.
Re: Dimeback's Thread of Questions
I learned the basics of programming (looping, decision, subroutines, etc.) in Applesoft BASIC on an Apple IIe before I learned 6502 assembly. Back then there were plenty of books in the library on how to integrate assembly subroutines with the BASIC runtime, so I could make part-BASIC, part-assembly programs. Then I learned structured programming (local variables, while instead of goto, etc.) in QBasic and Turbo C, after which point I felt confident enough to write an entire program in 6502 assembly.
Re: Dimeback's Thread of Questions
What tokumaru says is true. Programming is logic. It is about clearly defining the result you want and using the tools available in the language you're using to get that result. Code written by a C++ programmer in C++ and code written in 6502 programmer in 6502 might have a wildly different method to get the same result. But all that matters is that that result is gotten. If you understand how to define a thing that can be programmed, you'll be able to make it in any language by simply looking up how said language accomplishes the basic pieces of programming (math, loops, conditionals, stealing tokumaru's paranthesis, etc.) I've helped many a friend do things in languages I had no idea about 5 seconds before they asked me. Programming skill comes from something above the language.
There's still some weird meta stuff when switching between/learning both, like that branches and if statements are sort of inversed. An if statement runs the code below if true, a branch skips the code below if the branch condition is true. But things like this can be overcome by not getting hung up on reimplementing a way of doing things from high level to low level or vice versa. Think of the result you want, and how to get it with what's there. Don't think about how you got the result in that other thing.
There will be some gotchas if you learn one then attempt the other either way. If you start with 6502, you may wonder where including binaries went in something high level. If you start with something high level, you may wonder where your local variables, multiplication, division and floats went.
For what it's worth, I'd say start with just 6502 assembly language. I started with higher level things, then learned 6502 and it filled so many gaps in my knowledge. I did used to make fairly complex programs despite these gaps... I made my own scripting language/parser. Yet I didn't know about bitwise operators, heh. And I used pointers in a by the book way, but now I really understand pointers, and pointers to pointers and how arrays and pointers are really accessed/stored. Same with classes, and all kinds of other things that used to seem kind of "magic." Learning 6502 will give you true understanding of things that are sort of hand waved in a high level language.
If you plan to make anything complex for NES, you will probably need to learn something higher level eventually, though. I would have gone crazy if I needed to write the things I use for text compression or level creation in 6502. Even worse is laying out the data by hand.
There's still some weird meta stuff when switching between/learning both, like that branches and if statements are sort of inversed. An if statement runs the code below if true, a branch skips the code below if the branch condition is true. But things like this can be overcome by not getting hung up on reimplementing a way of doing things from high level to low level or vice versa. Think of the result you want, and how to get it with what's there. Don't think about how you got the result in that other thing.
For what it's worth, I'd say start with just 6502 assembly language. I started with higher level things, then learned 6502 and it filled so many gaps in my knowledge. I did used to make fairly complex programs despite these gaps... I made my own scripting language/parser. Yet I didn't know about bitwise operators, heh. And I used pointers in a by the book way, but now I really understand pointers, and pointers to pointers and how arrays and pointers are really accessed/stored. Same with classes, and all kinds of other things that used to seem kind of "magic." Learning 6502 will give you true understanding of things that are sort of hand waved in a high level language.
If you plan to make anything complex for NES, you will probably need to learn something higher level eventually, though. I would have gone crazy if I needed to write the things I use for text compression or level creation in 6502. Even worse is laying out the data by hand.
Re: Dimeback's Thread of Questions
Thanks for all the responses. The general answer I seem to be getting from this is to focus on building my current knowledge until I feel comfortable, and with my game not being very far in development, I'll try and see what more I can do from here.