Suggestion for good ca65 game source code to read?

Are you new to 6502, NES, or even programming in general? Post any of your questions here. Remember - the only dumb question is the question that remains unasked.

Moderator: Moderators

Post Reply
User avatar
ericandrewlewis
Posts: 17
Joined: Wed Jan 16, 2019 9:13 pm
Location: Lower East Side
Contact:

Suggestion for good ca65 game source code to read?

Post by ericandrewlewis » Mon Jan 28, 2019 2:48 pm

I've been able to read through rainwarrior's basic checkerboard program and understand how it's working, which has been a good learning experience viewtopic.php?t=11151

I started reading NovaSquirrel's Game Of Life source code, which is a bit above my reading level https://github.com/NovaSquirrel/NESLife

Do you have any suggestions for game source code to read for a beginner/beginner-intermediate that is written in ca65? It should probably be code that you think is well written, which is subjective but I will appreciate code that meets your definition of that.
Last edited by ericandrewlewis on Mon Jan 28, 2019 3:51 pm, edited 1 time in total.

User avatar
pubby
Posts: 542
Joined: Thu Mar 31, 2016 11:15 am

Re: Suggestion for good ca65 game source code to read?

Post by pubby » Mon Jan 28, 2019 3:02 pm

https://github.com/pubby/Ralph-4 is pretty simple code and has lots of comments, but it was my first game so not everything was done how I would do it now.

User avatar
ericandrewlewis
Posts: 17
Joined: Wed Jan 16, 2019 9:13 pm
Location: Lower East Side
Contact:

Re: Suggestion for good ca65 game source code to read?

Post by ericandrewlewis » Mon Jan 28, 2019 6:50 pm

pubby wrote:but it was my first game so not everything was done how I would do it now.
Any specific things you would do differently now compared to how you did it then?

User avatar
pubby
Posts: 542
Joined: Thu Mar 31, 2016 11:15 am

Re: Suggestion for good ca65 game source code to read?

Post by pubby » Tue Jan 29, 2019 1:25 am

A few instructions I misunderstood. For example, I thought plp/php was necessary inside interrupts (it's not; it's done automatically), and I thought bit shift instructions only had one addressing mode.

"levelload.s" appears overly complicated and the level format is inflexible. It's not terrible, but I'd probably aim for something simpler nowadays.

"player'.s" could probably be simplified a bit too.

User avatar
slembcke
Posts: 170
Joined: Fri Nov 24, 2017 2:40 pm

Re: Suggestion for good ca65 game source code to read?

Post by slembcke » Tue Jan 29, 2019 10:31 am

Lizzard's assembler source is on Github.
https://github.com/bbbradsmith/lizard_s ... c_demo/nes

I also have my little Pixler library on Github, but it's not that well commented.
https://github.com/slembcke/critical-ma ... lib/pixler

Post Reply