NES Code Library
I have been searching for a code library that keeps track of some basic functions but can't find anything. I can find forums that have 1000s of posts of people's questions on how to perform some tasks, but trying to search them can be a pain to get the result you are looking for. I have also found some free to download source code and dug through the code to see how people performed some tasks.
Is there such a library that some one has started to keep track of this? Such a library could include code for making a sprite jump, basic directional movement (I know, it's in Nerdy Nights), or other basic functions that many games use. I have also found many tutorials that some of these functions are covered in the tutorial (outside of NA). I also know many here are very helpful and will help with anything I can't figure out, but I hate to be a burden and constantly badger them as they have their own projects to tend. I also, like to find and figure things out on my own for better understanding.
Thanks!
Is there such a library that some one has started to keep track of this? Such a library could include code for making a sprite jump, basic directional movement (I know, it's in Nerdy Nights), or other basic functions that many games use. I have also found many tutorials that some of these functions are covered in the tutorial (outside of NA). I also know many here are very helpful and will help with anything I can't figure out, but I hate to be a burden and constantly badger them as they have their own projects to tend. I also, like to find and figure things out on my own for better understanding.
Thanks!
Comments
http://wiki.nesdev.com/w/index.php/Nesdev_Wiki
Paul: I have been digging there quite a bit. Lots of good stuff, they have some of what I was talking about, but not to the extent.
MRN: I found that attachment after you posted the message. Great write up on each command, but not quite what I was looking for.
I don't know, maybe I am asking for the moon on this one. I was just wondering if there was a searchable library of coding examples to perform certain actions (jump, run faster, similate gravity, etc). It would be laid out somewhat like MRN posted or in an organized webpage with links to each set of code. If not, no biggie. I just figured I could cut down my questions I keep bothering other developers with when I get stuck. I know most of you are more than happy to help, but I don't want to hinder your progression on your projects for my wee little game.
Sorry if this still isn't clear, I am not the best at describing what I am trying to ask.
Originally posted by: Roth
On that wiki there are a couple of things here: http://wiki.nesdev.com/w/index.ph...
This is on the right path! I've been through that site a bunch and missed this. If they could expand on it, that would be great. I like the layout.
Originally posted by: Aaendi
Even though it's not going to be perfect, I still think it's a good idea to have a code library.
Then you loose the uniqueness between all the games made using those resources. Wouldn't it get a bit boring if every NEW game had the same scrolling style, jump physics, etc. Sure you can keep your OWN library and that can be YOUR style, but chances are most people will want to do things there own way.
There aren't even that many sequels that handle these types of things the same way. Once you make your own game, you will have a list of things you will want to do differently next time.
Most has to be Tailored for the context. You'll be surprised how fast you can write a compression routine the third or forth time you do it... And how much cleaner it becomes.
;Variables
joypad1 rs .1
joypad1_old rs .1
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
LDA joypad1 ;Put this section in the joypad section in the button loop you are checking when released, such as Button A. I usually make it the last piece of code of the subroutine.
STA joypad1_old
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
CheckJoypad: ;Put this in the game playing state of your code
LDA joypad1 ;Check to see if the button on joypad 1 has been released
CMP joypad1_old
BEQ CheckJoypadDone
;DO SOME STUFF HERE
;DO SOME STUFF HERE
;DO SOME STUFF HERE
;DO SOME STUFF HERE
CheckJoypadDone: