A Simple NES Game

Anything related in any way to game development as a whole is welcome here. Tell us about your game, grace us with your project, show us your new YouTube video, etc.

Moderator: PC Supremacists

A Simple NES Game

Postby Light-Dark on Fri Feb 01, 2013 1:09 pm

So this week I had more free time than usual so a couple of days ago I started on a small side project to learn more about the NES and programming for it. Over the span of the past few days I have learned quite a bit about the NES's custom 6502, it's strange little graphics processor the PPU and it's APU. This is what has come out of it. It's nothing to complex, the title screen explains everything except the fact that you have to keep moving, if you stop for about 5 seconds it will kill you. The graphics were all drawn by me (you can really tell) however the music was not composed by me, points if you can recognize the title screen music!

Also on a side note here are some links for anyone who is interested in getting started developing for the NES:
http://nesdev.com/
http://nintendoage.com/forum/messageview.cfm?catid=22&threadid=7155
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby superLED on Fri Feb 01, 2013 5:51 pm

Pretty nice! I have wanting to make a NES game since I first started programming. Maybe I'm experienced enough now to make something simple.

There is a strange animation when I try to push the character out of the screen.
I guess you draw the character before you check if he's outside of the screen and then change position and animation-frame.
Try to do all the logic and stuff before drawing anything, maybe?

Looks like the whole pattern repeats. Did you yourself decide exactly where and which direction each thing would go, then repeat the pattern?
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
 
Posts: 337
Joined: Sun Nov 21, 2010 12:56 pm
Location: Norway

Re: A Simple NES Game

Postby dandymcgee on Fri Feb 01, 2013 7:25 pm

Video would be cool for those of us (me) too busy (lazy) to install an emulator.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: A Simple NES Game

Postby superLED on Fri Feb 01, 2013 7:30 pm

dandymcgee wrote:Video would be cool for those of us (me) too busy (lazy) to install an emulator.

I'm working on it right now.
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
 
Posts: 337
Joined: Sun Nov 21, 2010 12:56 pm
Location: Norway

Re: A Simple NES Game

Postby superLED on Fri Feb 01, 2013 7:46 pm

Here is the video:


Sorry for the bad quality. Just wanted to quickly put something up there.
The thing in the top left corner is a program I made to visualize controller input (played this game with a SNES controller)
User avatar
superLED
Chaos Rift Junior
Chaos Rift Junior
 
Posts: 337
Joined: Sun Nov 21, 2010 12:56 pm
Location: Norway

Re: A Simple NES Game

Postby Light-Dark on Fri Feb 01, 2013 10:49 pm

superLED wrote:Pretty nice! I have wanting to make a NES game since I first started programming. Maybe I'm experienced enough now to make something simple.

There is a strange animation when I try to push the character out of the screen.
I guess you draw the character before you check if he's outside of the screen and then change position and animation-frame.
Try to do all the logic and stuff before drawing anything, maybe?

Looks like the whole pattern repeats. Did you yourself decide exactly where and which direction each thing would go, then repeat the pattern?


To answer the first part, there is a interupt in the NES , the NMI, which when enabled is called every frame and when drawing you have the drawing at the top of the NMI label and then input polling usually comes next and then logic. But that's not why the flickery animation thing happens when leaving the screen, the reason for that is the original bottom and right border checks were being really annoying and I said fuck it and made it call the move left or move up sub routines.

To answer the second part, yes the projectile's pattern is hard coded but I made it slightly more dynamic, at the end of the cycle it adds the last cycles starting position with the byte that holds the button pressed data ( nes controller convienently has 8 buttons), it then consults a timer to set it's current speed and it's current speed affects which part of the pattern it's at. An example would be at about 5 speed it reverses direction by subtracting instead of adding the speed to the X.

And man if you have enough motivation and patience to read through tutorials and learn the NES's memory system and 6502 assembly go for it! It's one of the more popular consoles to hombrew for and there is actuallly a hombrew platformer series that is commercially available called battlekid by 'Sivak'!
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby dandymcgee on Sat Feb 02, 2013 12:50 am

Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Re: A Simple NES Game

Postby Light-Dark on Sat Feb 02, 2013 4:51 am

dandymcgee wrote:Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.


Thank you, I think my next project with the NES will be a little more ambitious, a platformer. Now i'd just like to say one thing when it comes to programming for the NES or programming in any really low level language. Diagrams and/or pseudo code help tremendously when planning out how you're going to write say a meta tile compression/decompression system which brings me to my next point when doing this your chances of writing good error free code are higher and thus it possibly eliminates a couple frustrating hours of debugging assembly and let me say something there is nothing more satisfying than seeing something working properly the first or second time :)
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby eatcomics on Mon Mar 18, 2013 3:37 pm

Light-Dark wrote:
dandymcgee wrote:Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.


Thank you, I think my next project with the NES will be a little more ambitious, a platformer. Now i'd just like to say one thing when it comes to programming for the NES or programming in any really low level language. Diagrams and/or pseudo code help tremendously when planning out how you're going to write say a meta tile compression/decompression system which brings me to my next point when doing this your chances of writing good error free code are higher and thus it possibly eliminates a couple frustrating hours of debugging assembly and let me say something there is nothing more satisfying than seeing something working properly the first or second time :)

Having been toying with the gameboy, I completely agree with you. And good work man :D
Image
User avatar
eatcomics
ES Beta Backer
ES Beta Backer
 
Posts: 2664
Joined: Sat Mar 08, 2008 9:52 pm
Location: Illinois

Re: A Simple NES Game

Postby Light-Dark on Fri Mar 29, 2013 1:20 pm

eatcomics wrote:Having been toying with the gameboy, I completely agree with you. And good work man :D


Thanks man! I wish you luck with your gameboy endeavors!
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby Falco Girgis on Fri Apr 19, 2013 5:58 pm

dandymcgee wrote:Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.
You sadistic fuck.

It already has no floating point numbers... Emulating trig functions is going to be rape.
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10690
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: A Simple NES Game

Postby Light-Dark on Fri Apr 19, 2013 6:18 pm

Falco Girgis wrote:
dandymcgee wrote:Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.
You sadistic fuck.

It already has no floating point numbers... Emulating trig functions is going to be rape.


Ahahaha yeah, you're WAY better off just programming a sine-wave-like pattern yourself, it's certainly possible as shown by the Medusa heads in Castlevania.
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby Falco Girgis on Fri Apr 19, 2013 6:23 pm

Light-Dark wrote:
Falco Girgis wrote:
dandymcgee wrote:Thanks for the video, this is really cool! Music is awesome and game is great for a first go. Would be cool to some more movement patterns like sine waves or spirals.
You sadistic fuck.

It already has no floating point numbers... Emulating trig functions is going to be rape.


Ahahaha yeah, you're WAY better off just programming a sine-wave-like pattern yourself, it's certainly possible as shown by the Medusa heads in Castlevania.
Agreed.
"So what happens if the Elysian Shadows Kickstarter fails?"
Image
User avatar
Falco Girgis
Elysian Shadows Team
Elysian Shadows Team
 
Posts: 10690
Joined: Thu May 20, 2004 3:04 pm
Location: Studio Vorbis, AL

Re: A Simple NES Game

Postby Light-Dark on Sat Apr 20, 2013 9:19 pm



I was bored so I decided to implement a sine-wave-like pattern into "Avoid The Square" it increases in speed each time it finishes a "wave cycle" and when it reaches a certain speed it resets the speed.
<tpw_rules> LightDark: java is a consequence of inverse moore's law: every 18 months, the average program will be twice as slow. therefore, computers always run at the same percevied speed. java's invention was a monumental step

Image
User avatar
Light-Dark
Dreamcast Developer
Dreamcast Developer
 
Posts: 315
Joined: Sun Mar 13, 2011 8:57 pm
Location: Canada

Re: A Simple NES Game

Postby dandymcgee on Sun Apr 21, 2013 10:37 am

Light-Dark wrote:

I was bored so I decided to implement a sine-wave-like pattern into "Avoid The Square" it increases in speed each time it finishes a "wave cycle" and when it reaches a certain speed it resets the speed.

Haha, nice work dude. Thanks for the video too!
Falco Girgis wrote:It is imperative that I can broadcast my narcissistic commit strings to the Twitter! Tweet Tweet, bitches! :twisted:
User avatar
dandymcgee
ES Beta Backer
ES Beta Backer
 
Posts: 4911
Joined: Tue Apr 29, 2008 4:24 pm
Location: New Hampshire

Next

Return to Game Development

Who is online

Users browsing this forum: No registered users and 2 guests

cron