New Project

A place where you can keep others updated about your NES-related projects through screenshots, videos or information in general.

Moderator: Moderators

Post Reply
dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

New Project

Post by dsv101 » Fri Jun 17, 2011 6:22 am

2 days ago I began my adventures In Nes Game Development

And today i begin my first project, a space shooter with no save feature ! Yeyyy!! Anyway, i know you are like "look at this noob that thinks hes going to just make a game with no knowledge, typical idiot" I know man, i know. I learn programming best by just digging in and learning as i Go, its just me, that is how i learned AS3 in like a week.

Now lets get to the point, In a year or two, i SHOULD have something similar to this:

-One title screen (Press Start type thing with the title)
-A Ship Sprite That can move horizontally and shoot a bullet
-5 Stages of enemy Waves (enemies shoot bullets too of course)

And that is all that is planned for now. Of course the complete game will have more than 5 Waves, and most likely will have at LEAST 3 boss ships, but adding all of this in a year just seems unrealistic to me. In fact, doing the three things i mentioned in year or two as well, seems a bit unrealistic but i have way to much spare time on my hands, spare meaning greater than 6 hours a day.

Tools
Flat Assembler (Just to write the .ASM file, not to compile)
Notepad ++ (Same as above)
NESASM3 (compiles the. ASM file into a .NES Rom)
Nesread (breaks up the .NES Rom into a .PRG and .CHR file)
YYChar (Chr editor)

Any tips would be nice :)
~Yeah, I Said That

User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Fri Jun 17, 2011 6:32 am

Since you're starting out, I would recommend you go with a different assembler than NESASM3, like say, asm6. That is to say: use an assembler that works better, rather than one that has weird syntax quirks and known bugs (with no updates). The author of asm6 (Loopy) does hang out here on the board regularly.

Be aware that with asm6 (which just builds the actual PRG parts) you'll need to make your own iNES header (16 bytes at the start of the ROM), but that should be a one-time shot. Make the 16-byte file in a hex editor or the like, then do something like (in a "make.bat" or equivalent):

Code: Select all

COPY /B HEADER.BIN+PRG00.BIN MYGAME.NES
...and you'll be good to go. You can add your CHR banks as you go on too (don't forget to update your iNES header!), e.g.:

Code: Select all

COPY /B HEADER.BIN+PRG00.BIN+CHR00.BIN+CHR01.BIN MYGAME.NES
6502 assembly and NES development is significantly different than AS3. There's absolutely nothing "scripty" or object-oriented about the console (like AS3), so put all of that aside. Think bare-bones as much as possible.

Good luck, I look forward to seeing your work in the future!

3gengames
Formerly 65024U
Posts: 2277
Joined: Sat Mar 27, 2010 12:57 pm

Post by 3gengames » Fri Jun 17, 2011 6:41 am

I'd stick with NESASM3 as you'll probably still need to hit up the nerdy nights. Plus what other assemblers offer [Which I haven't found useful besides +/- labels.] is useless right now. I also have a fixed version of ReadNES that you're using, as the readnes program online is broken. Mail me if you want it myscreenname at gmail dot com.

And yeah, assembly is something that even some high-level programmers can't grasp. You have to throw put what you know about standard programming and just think of it a different way.

You can mail me for any questions you don't want to post or just post for more responses. Truthfully though I'd probably say before you start a game, do some mini-projects. Like moving a sprite with the controller before you do anything else. Sounds easy, and it is decently simple, but it'll give you a amazing idea of what programming the system will be all about and give you the best grasp about the NES without doing anything big.
Last edited by 3gengames on Fri Jun 17, 2011 8:01 am, edited 1 time in total.

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq » Fri Jun 17, 2011 7:24 am

Welcome to the community! I think you'll find us very inviting and supportive. We very rarely have any drama around here, at least recently. We're a pretty chill group.

In case you missed the link, we have an extensive wiki featuring hardware and software documentation, example projects and all kinds of reference material. What we don't seem to have is a good instruction set reference, but the one I just linked to is great :wink:

As for choice of assembler I would recommend QASM, which is the assembler I wrote :D If you don't feel comforitable with that, try CA65, but it's got a very steep learning curve.

The reason I recommend these two assemblers is that they both generate source-level debugging files for use with Nintendulator Debug Extensions by TheFox, a board member. This allows you to single-step through your program while looking at your source code, rather than just the raw disassembly. This greatly speeds up the write-compile-test cycle.

QASM also has lexical scoping like AS3 does, so it might make a little more sense to you. I have a very strong JavaScript background and I was trying to make it make sense to me :D

If you do want to use QASM I can post some template projects to get you going. That's not a bad idea anyway...

As for the ROM splitter I've got a Python script that does that. I've been meaning to post it somewhere. I'll have to do that tonight.

User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Post by cpow » Fri Jun 17, 2011 7:58 am

My turn to plug... 8)

If you're into the whole "IDE experience" thing and you're developing your game on a Windows platform (or, soon, OSX and Linux), you could try NESICIDE. It uses the CC65 toolchain, so yeah you'll want to get familiar with that (download it, install it, find an example built using it online), but realistically it's not that complicated. NESICIDE will generate the makefile for you and there are a few good examples of linker configuration files to use (one is the nes.ini included in the above linked package). Add it to your NESICIDE project (in Project Properties, Linker tab), and you're good to start adding source to your new creation. You could even start with the source provided in the above link as a learning tool...change this line of code, recompile, reload, run, see what happens, lather, rinse, repeat.

[ASIDE: Hopefully tepples doesn't mind me using his project as an example, but it's one of the simplest out there for a new dev to start with!]

You can add/edit source files, add/edit CHR-ROM bank configurations (currently using externally-generated graphic data only). NESICIDE will glue it all together for you.

NESICIDE will also generate the .nes and debug information files and allow you to source step through your code, watch symbols, set breakpoints, etc. It has a built-in emulator and lots of handy debuggers. But since it exports the .nes and debug information you can take that and run it wherever you want, also.

It is an evolving IDE and its author [me] is constantly adding new stuff.

tepples
Posts: 22056
Joined: Sun Sep 19, 2004 11:12 pm
Location: NE Indiana, USA (NTSC)
Contact:

Roulette plays YOU!

Post by tepples » Fri Jun 17, 2011 8:44 am

cpow wrote:If you're into the whole "IDE experience" thing and you're developing your game on a Windows platform (or, soon, OSX and Linux), you could try NESICIDE. It uses the CC65 toolchain, so yeah you'll want to get familiar with that (download it, install it, find an example built using it online), but realistically it's not that complicated.
[...]
[ASIDE: Hopefully tepples doesn't mind me using his project as an example, but it's one of the simplest out there for a new dev to start with!]
Go ahead; it's perfectly fine by me. I'm glad someone has found a use for what has been called a disappointingly text-based game.

User avatar
qbradq
Posts: 951
Joined: Wed Oct 15, 2008 11:50 am

Post by qbradq » Fri Jun 17, 2011 8:50 am

Oh yea, I forgot about NESICIDE. That's definitely a great choice for a first-timer. You should have no trouble at all creating a space shooter with it and YYCHR.

Good work cpow :D

dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

Thanks for the replies!

Post by dsv101 » Fri Jun 17, 2011 10:34 am

Thank you all for the extremely quick, thorough, helpful replies guys. 'Tis a good way to welcome a n00b!

I did however decide to stick with my current setup using NESASM3 and readnes. If i have any problems with readnes, i will ask you guys.

@everyone that said AS3 is nothing like ASM
i was just using AS3 as an example of a language i learned, not comparing it to ASM

@everyone
thanks again, wish me luck!!!

Also, i am starting just by adding a sprite to the screen, then adding controls (left and right OR up and down depending on which i choose after concept drawings). And then i'll commit suicide trying to add in a title screen and enemies!
~Yeah, I Said That

User avatar
cpow
NESICIDE developer
Posts: 1097
Joined: Mon Oct 13, 2008 7:55 pm
Location: Minneapolis, MN
Contact:

Re: Thanks for the replies!

Post by cpow » Fri Jun 17, 2011 10:58 am

dsv101 wrote:And then i'll commit suicide trying to add in a title screen and enemies!
Haha that reminds me of the tagline I came up with:

"Why just ROM hack when you can commit NESICIDE?!"

Anyone else come up with catchy phrases for their tools?

<MOD: splitz!>

Drag
Posts: 1325
Joined: Mon Sep 27, 2004 2:57 pm
Contact:

Post by Drag » Fri Jun 17, 2011 12:20 pm

Make sure to give your game a controversial name, like "Shoot Your Load", or "Double Penetration". :V

In all seriousness though, to get you started, an NES game will need subroutines for the following things:
  • Reading the joypad
  • PPU data pipelining (Storing PPU data to a buffer that gets uploaded to the PPU during Vblank)
  • Waiting for the Vblank NMI
  • Sprite mapping (taking several 8x8 or 8x16 sprites and assembling them into a larger metasprite)
  • Collision detection
  • Actors (actors are the underlying "beings" that you represent with sprites.)
Those last two points are usually where people get stuck, so make sure you ask if you need help with those.

dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

Post by dsv101 » Fri Jun 17, 2011 12:29 pm

thanks man :)
~Yeah, I Said That

dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

A Sprite already!?!

Post by dsv101 » Fri Jun 17, 2011 8:48 pm

I managed to display a sprite with a custom palette! check it out ---> http://dl.dropbox.com/u/7898392/nes_shot.png

Its a full resolution picture so its a bit big to post :)

Anyway, now i just have to figure out what the heck i did. I have two questions, since this is pretty much nerdy nights week 3 you can refrence that.
-Where do i set which 4 bit palette to use from the 16 bit palette set, im having trouble finding this saddly :(
-Where do i decide which sprite to use, like i use sprite 0 from my char file, how do i set this to use sprite ?

Thanks :)

dsv101
Posts: 36
Joined: Fri Jun 17, 2011 5:16 am
Location: United States
Contact:

Sorry for that last post

Post by dsv101 » Fri Jun 17, 2011 9:02 pm

Im an idiot, i will not ask stupid questions like those again, i promise :)

BTW, TRIPLE POST PWNAGE!!!!
~Yeah, I Said That

User avatar
Memblers
Site Admin
Posts: 3885
Joined: Mon Sep 20, 2004 6:04 am
Location: Indianapolis
Contact:

Post by Memblers » Fri Jun 17, 2011 9:12 pm

The palette is the lower 2 bits of what would be $0202 in that code. Also to select one of the 256 tile numbers, that would be the byte at $0201.

My first 'original' NES game project was a space shooter too. It was "Attack of the 3-Eyed Space Nazis". :)

BTW a warning with NESASM, there are some undocumented bugs in the assembler. It's happened to me (it was the first assembler I used) and other people as well, where it can create a bad ROM but not give an error or warning. Does seem to happen to everyone, but it can be extremely annoying if it does. It can be spotted when it happens by disassembling your code (usually helpful to do that if you're having a problem anyways).

User avatar
koitsu
Posts: 4218
Joined: Sun Sep 19, 2004 9:28 pm
Location: A world gone mad

Post by koitsu » Sat Jun 18, 2011 5:35 am

Drag wrote:Make sure to give your game a controversial name, like "Shoot Your Load", or "Double Penetration". :V
Why not just name it Rape Games 2? ;-)

Post Reply