Code Monkey home page Code Monkey logo

monkey's Introduction

monkey

Main website for the game

NES port of the Wall Kickers mobile game

Download: monkey.nes

Open monkey.nes in an NES emulator; Mesen is the best one out there

Credits:

  • Kumobius for making the original game; I copied and modified a lot of the graphics over
  • famitone2 is the sound engine used

Programs I used:

  • VSCode | my main editor, w/ a 6502/dundalk syntax highlite extension I wrote
  • Visual Studio 2022 | my editor for dundalk
  • yychr | used to layout the CHR memory
  • Aseprite | for creating the graphics
  • Mesen | my go-to emulator, but others I tested in were I think FCEUX, JNES, Nestopia, Nintendulator
  • FamiStudio | for creating all the sound effects
  • For laying out the background tilemaps in the title/in-game I used a WPF/C# graphics editor I wrote for another NES project

Syntax of the code is 6502 assembly for use with the NESASM3 compiler, but with some minor additions I've added via a pre-compiler I wrote called dundalk:

  • class <name> ; all vars, consts and labels will be unique to this class and can be invoked elsewhere in the codebase with dot notation:
class monkey

var [1] x
Spin:
  ...
  rts
class obj

var [1] x
lda obj.x
sta monkey.x
jsr monkey.Spin
  • var [#] <name> ; # = number of bytes to allocate to this label, <name> = name of label. dundalk will allocate a spot in zeropage RAM for this label with # bytes.
  • const <name> <value> ; dundalk will replace all occurences of <name> across codebase with <value>.
  • idset <name> { } ; dundalk will replace each occurence of every label inside the idset across the codebase with its index inside the idset. e.g. with the following idset:
idset STATE {
	IDLE
	JUMP
	BFLIP
}

dundalk would replace occurences of STATE.BFLIP with 2.

  • using vars and consts underneath a global label e.g. TurnAround: will cause those vars and consts to be local to that label, which is very useful for function parameters, and can be invoked by dot notation:
class monkey

DoSomething:
  ...
  lda #$ea
  sta TurnAround.newX
  jsr TurnAround
  ...
  rts

TurnAround:
  var [1] newX
  ...
  rts

in another file:

lda #$ea
sta monkey.TurnAround.newX
jsr monkey.TurnAround
  • > ; dundalk will create a unique local label for this and the next occurence of >; useful for branching over a only few instructions frequently

Running dundalk on an assembly file, which serves as a starting place and which should .include "..." files such that all files in your codebase can be reached by an .include tree, will compile the whole codebase into one -dlk.s file, e.g. "main-dlk.s", which shoud then be sent through NESASM3. If you're wondering about anything else pertaining to how dundalk works just look at that file and reverse engineer it.


Acquiring a binary for NESASM3 is not simple so I've just included one in the repo.

To build you should just be able to run build-and-run-game.ps1 in PowerShell. It assumes you have an emulator set as the default program for .nes files.

monkey's People

Contributors

taylorplewe avatar tbplewe avatar

Stargazers

eightbithero avatar  avatar François avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.