Post subject: How to create a working nes rom?
Joined: 12/10/2007
Posts: 260
Location: Oregon
Well i've been interested in making my own video game for a while now, and i don't know how to go about it. I've searched the web far and wide and have come up with nothing. I know i have to code a game somehow (i only know about .1% of C++), but with what tools. So my question is, how do i go about making any videogame, not just an nes game. What program languages will i need to learn, and what programs will i need?
Joined: 5/2/2006
Posts: 1020
Location: Boulder, CO
There is a lot involved, but C++ compilers can create an executable. That is almost cirtainly what you will be looking for in that department. As far as making a working rom goes, it would proove extreemly hard. People can modify existing ones with little trouble, but making one from scratch mgiht not be terribly possible.
Has never colored a dinosaur.
Editor, Active player (297)
Joined: 3/8/2004
Posts: 7469
Location: Arzareth
Once you learn programming, you realize how to apply it to create games. Start from simple ones, i.e. text based ones such as "I'm thinking a number from 1-100, guess what it is ... smaller/bigger". Once you learn graphics, try creating a simple tile-based game. Here is a screenshot of one of my earliest such games. In this game, the tiles are procedurally created (i.e. by drawing different colored lines and pixels). The movement is as crude as in Boulderdasher. Basic rules are created: gravity, collision checks, enemy AI, bonus items, exits, level loading, death. If you think you can get the rotation and collision checks right, you can try to create a Tetris clone. Here's a screenshot of my first Tetris clone. It operates in text mode. Creating such game is certainly teaching for a beginning programmer. Going that route, you can start tackling more and more difficult challenges as you go. The important question is not "how are games created". The important question is "what is programming". Games are not special in any way. It is just an application of programming theories; a rule set given to the computer, that the computer obeys, to produce an expected behavior. And, do not aim to create a game for some console. Leave that to the experts. If you go that route, you can discard all the easy tools you have for PC, and have to start learning the intrinsic hardware details on that particular console, and program in a way not unlike building a house by piling peas one by one. Once you're not a beginner, you'll pile bricks one by one instead of peas, but that's not really much an advancement in methology. So, forget consoles.
snorlax
He/Him
Joined: 5/20/2007
Posts: 174
Location: Wisconsin
I can't believe you embedded something without your permission Bisqwit.
P.JBoy
Any
Editor
Joined: 3/25/2006
Posts: 850
Location: stuck in Pandora's box HELLPP!!!
If you really really badly want to make a NES game, then you'll have to learn 6502 assembly. It will help to have a NES debugger (such as FCEUXDSP). You'll need to make graphics and sound aswell, which means you'll need to learn the sound format aswell. This same sort of stuff applies to other platforms aswell, the only difference is the assembly type. 65c816 for SNES, THUMB (and ARM) for GBA, Z80 for GBx, 68000 for Genesis, R3000 for N64
Joined: 10/15/2007
Posts: 685
Bisqwit wrote:
And, do not aim to create a game for some console. Leave that to the experts.
Quoted for truth. I wouldn't even bother trying to create NES games, unless you find you have a natural affinity for Assembly, and thereby don't mind programming in little amoeba steps. But if that's your ultimate goal, I do suggest at least starting out with specialized ROM editors, just for the sake of taking your first steps in a more friendly environment.
Kirby said so, so it must be true. ( >'.')>
Joined: 10/3/2005
Posts: 1332
Well i've been interested in making my own video game for a while now, and i don't know how to go about it. I've searched the web far and wide and have come up with nothing. I know i have to code a game somehow (i only know about .1% of C++), but with what tools.
It's vague. The answer depends on what kind of project you're doing. If it's a class thing where you have a week to do it, I'd suggest Ruby. It's free, cross-platform, and comes with OpenGL bindings out of the box, which is damned convenient. Gets no easier than that, AFAIK.
Editor, Player (69)
Joined: 6/22/2005
Posts: 1050
Wow, I didn't expect some of you guys to be so discouraging. dartht33bagger: If you're interested in programming for the NES, take a look at NESdev and/or Romhacking.net. They have a lot of documents and tools that will probably be helpful.
Current Projects: TAS: Wizards & Warriors III.
Joined: 12/10/2007
Posts: 260
Location: Oregon
Thanks for all of the fast replies! I've decided to put off console games until im good at creating games on the computer. I have a compiler named codeblocks, and i have python. Are either of these the programs i need to code a simple game? Another question: Where would you suggest for me to go to learn how to code? I've been looking at tuts on this site but i don't know if its what i need to learn:http://www.cprogramming.com/
Joined: 10/15/2007
Posts: 685
Whenever I felt like my classes were holding me back, I just browsed definitions at cplusplus.com for quick examples, and pieced things together myself. The website for Ruby also has an interactive demo that teaches you the basics of the language right off, just enough to be dangerous. Going back to C++, you can find a #C++ on most large IRC networks, usually with experienced users willing to help you out. They tend to be generous with their knowledge, as long as you appear to be willing to learn and expand. A formal education in the field doesn't hurt, either, but I know that can be an expensive venture (mainly because I'm sinking 30k/year into it at the moment, but I digress).
Kirby said so, so it must be true. ( >'.')>
Joined: 12/10/2007
Posts: 260
Location: Oregon
Formal education is not an option for me, i have to learn it online or from books because im only 15. So should i just learn off of a website?
Joined: 10/15/2007
Posts: 685
Depends on whether or not you want to pursue a formal education in the future. If you jump into it where you are now, college professors will likely fight to make you unlearn what you've learned, and do things their way at the core level. If this sounds like a risk you're willing to take, then by all means, browse tutorials to your heart's content. You're not going to go horribly wrong on your own with trial error, but that doesn't mean someone won't want to bend and mold you to suit their will later on.
Kirby said so, so it must be true. ( >'.')>
Joined: 12/10/2007
Posts: 260
Location: Oregon
That would be fine with me, considering id be easier to learn their way when i already know the code instead of knowing nothing. I don't really consider being a computer programmer when i get older though, im looking into being a computer hardware engineer.
Active player (436)
Joined: 9/27/2004
Posts: 650
Location: Canada
Using this site I, with zero understanding of anything to do with anything even remotely required to make games, managed to make a working rom that played a song. Horray.
Joined: 12/10/2007
Posts: 260
Location: Oregon
Nice find! I'll have to check that out.
Post subject: Re: How to create a working nes rom?
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
dartht33bagger wrote:
(i only know about .1% of C++)
Do you know that little about C++ in particular, or about programming in general? There's a big difference.
So my question is, how do i go about making any videogame, not just an nes game. What program languages will i need to learn, and what programs will i need?
Assuming you have near zero experience about programming, I would say that you can right away forget about making NES games. If you want to make simple games (of the type tic-tac-toe, connect-5, simple tetris) some high-level scripting language will be more than enough for that. People have used things like javascript to make such games in webpages, although standalone games would need some other language (but the language would need to have some support for graphics and mouse reading or, alternatively, unblocked keyboard reading). One very good alternative is the ActionScript of Flash, which can be used to create the flash games you can see all over the internet (although that doesn't mean that making such games is simple or easy). Don't expect it to be easy because it won't be, regardless of the language you choose. To make a bit more advanced games Java could be considered. It has standard GUI and graphical libraries which can be used for creating games. There are many examples of Java games or game applications out there (cgoban2 comes to mind as a good example). In the Windows side of the world you could also consider C#, although its problem is that it's not portable. While personally I love C++, I can't deny that C++ is a beast. It's not a good language for beginners, and it doesn't have standard graphical libraries. There exist quite many good (and even platform-independent) graphical libraries for it though (such as wxWidgets or SDL). But, again, that doesn't mean that creating a game with them is easy. Again, in the Windows side of the world there exist many free C++ libraries which make creating small games (ie. of the casual game type) easier (such as HGE and PopCap). The advantage of C++ and these libraries is that they can be used to make more advanced (and more efficient) games than you can do, for example, with Flash ActionScript. Anyways, creating a game is not easy. It requires years of programming experience. Creating something visible on screen, even something which is interactive (ie. something which can be controlled eg. with the mouse or the keyboard) is relatively easy. However, the larger the game becomes, the more the beginner programmers stumbles across his own inexperience at programming, and the code becomes an unmaintainable mess which is really hard to enhance.
Joined: 3/7/2006
Posts: 720
Location: UK
You mentioned python! Hooray! I can personally guarantee that python is a suitable language for games programming (unless you want heavy 3d stuff). In conjunction with SDL (check out pygame.org), it is possible to rapidly program games by checking feedback straight away in the interpreter. I translated a C++ raycaster into Python yesterday, and it runs at a paltry 12-50fps inside a 100x100 window. I haven't tried compiling it, but that usually makes it run a bit faster. First, you really need to pick what sort of game you want to create. Bad ideas for a first time programmer: FPS, RTS. Your first game will probably be some kind of Puzzle game. Clone something else (like Tetris, as Bisqwit suggested), or make up something you haven't seen before, but keep it simple. Once the simple bit is done, you can keep adding bits to the game until it isn't so simple anymore, and you have gained valuable experience for tackling bigger projects. You'll encounter bits that will be difficult to modify from your original program, and that will tell you what to look out for in the future. Feel free to badger (PM) me for more specifics. The world needs more competent programmers, instead of goddamn companies full of content designers for Source.
Voted NO for NO reason
Brandon
He/Him
Editor, Player (191)
Joined: 11/21/2010
Posts: 914
Location: Tennessee
Bump. I'm really interested in this as well, and have been trying to find a reliable resource. This tutorial seemed promising, but it only has one part. While searching for more resources, I found this, which much to my surprise shows how to make a simple hello world in a fraction of the lines used in the previous tutorial. These are the only resources I've found regarding programming NES games in C, and I'd prefer to use C over assembly, but I would try either if necessary. I already know regular game programming, so I specifically want to do NES.
All the best, Brandon Evans
Banned User
Joined: 3/10/2004
Posts: 7698
Location: Finland
C is a pretty commonly used programming language in small embedded systems. However, the NES is quite a really small embedded system, especially compared to modern embedded systems for which programs are typically written in C, even if they are limited eg. in the amount of RAM (a typical "very small" embedded system will usually have at least 64 kilobytes of RAM to play with, usually more, while the NES has only 2 kilobytes IIRC). I can perfectly believe that C can be used to write NES programs, especially if you have a competent optimizing compiler. However, I bet it requires quite significantly taking into account the limitations of the system (both the very limited amount of RAM and CPU speed). 2 kilobytes of RAM is not a lot to work with. (At least the program itself can be much larger. I think there are some NES games that approach the 4-megabyte barrier.)
Player (246)
Joined: 8/6/2006
Posts: 784
Location: Connecticut, USA
I've been able to grasp a lot of basic programming concepts from experimenting with lua scripting for my runs for the site (and for other research I've done). If you can learn how to do something like write any enemy's HP above their sprite, you probably know how to effectively use variables, memory reading, if statements, for loops, and screen output, which is a good start. I'm taking a intro to Java class at the moment, and about 95% of what's been taught so far is stuff I already know. The syntax is different but very similar, and lua really helped me conceptually with the basics.