Giter Site home page Giter Site logo

chillitom / platformermovement Goto Github PK

View Code? Open in Web Editor NEW

This project forked from neshacker/platformermovement

0.0 0.0 0.0 81 KB

SMB3 Inspired Controls & Movement Demo

License: MIT License

JavaScript 3.13% Assembly 95.86% Makefile 0.75% Dockerfile 0.26%

platformermovement's Introduction

Plarformer Movement

An SMB3 inspired movement and controls demo.

Contributing

Find a bug? Think this could use a feature? Well then fork the repo and make a pull request. For the most part as long as you don't change anything core to the repository or cause the project to deviate from what I covered in the video, then have at it.

Building

Mac

  1. Install Homebrew
  2. Install cc65 using homebrew from a terminal: brew install cc65
  3. Run make from the project root to build the ROM.

Windows 10/11

  1. Download and install GNU Make
  2. Download and install cc65
  3. In powershell, add the cc65 binary path: $Env:Path += "C:\cc65\bin". Note: you can use the "Control Panel" or "System Settings" on Windows to update the path to include the CC65 binary directory.
  4. Run make from the project root to build the ROM.

Linux

  1. Download and install cc65 - How you go about this will be different depending on your distribution. On Ubuntu it should be as simple as sudo apt-get install cc65.
  2. Run make from the project root to build the ROM.

VS Code Dev Linux Container (from any host OS)

  1. Install/configure Docker
  2. Install VS Code
  3. Open Platformer Movement repo folder in VS Code
  4. Install the Dev Containers extension when prompted (If not already present).
  5. Ctrl-P and select Dev Containers: Rebuild and Reopen in Container

Code Style

One of the biggest points of this project is to act as a reference so that folks can follow along with the code and learn. As such, keeping the code nice and clean is important.

If you file a PR with assembly code changes, make sure that the code follows these rules:

Code Format

  1. Indent using spaces, two characters wide.
  2. Do not exceed 80 characters per line.
  3. Don't mix logic in files (joypad code shouldn't go in Player.s, for instance)

Casing

  1. Instructions and registers in lowercase: lsr a
  2. Declare subroutines with .proc using lower_case_piped: .proc update_timer
  3. Tables in lower_case_piped: delay_by_state: .byte 1, 4, 8, 7
  4. RAM Variables in lowerCamelCase: playerLives = $400
  5. Global constants in UPPER_CASE_PIPED: INITIAL_DELAY_FRAMES = 30
  6. Macros, Enums, and Scopes in CamelCase: .scope GoombaController

Number Formatting

  1. Addresses & Fixed-Point in hex: ldx $30, lda #$18
  2. Numeric constants in decimal: START_X = 48
  3. Bitmasks in binary: lda #%10000110

Built-ins

  1. Use PPU macros and constants where available: VramColRow 2, 10, NAMETABLE_B
  2. Use Joypad Constants and macros for logic.

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.