Home - Nobonet/sm64-roblox GitHub Wiki

sm64-roblox extended

Huh?

  • This fork aims to add more to the sm64-roblox project by @MaximumADHD, to include gameplay content like Mario's Health, Quicksand, Hangable ceils, Squishing surfaces (e.g thwomps), and so on. I will also add more than just that, such as how you can switch between vanilla code and custom code (e.g. vanilla wall-kicks <--> wall sliding).

Some of these actions are inaccessible by normal means?

  • This time, you're on your own here. More than that, I cannot promise. You'll have to find a way of how and when to activate these.
// Example code snippet from n64decomp, triggering FIRST_PERSON
// https://github.com/n64decomp/sm64/blob/9921382a68bb0c865e5e45eb594d9c64db59b1af/src/game/mario.c#L1385

// if gCameraMovementFlags:Has(CamMove.C_UP_MODE) then
if (gCameraMovementFlags & CAM_MOVE_C_UP_MODE) {
    // if m.Action:Has(ActionFlags.ALLOW_FIRST_PERSON) then
    if (m->action & ACT_FLAG_ALLOW_FIRST_PERSON) {
        // m.Input:Add(InputFlags.FIRST_PERSON)
        m->input |= INPUT_FIRST_PERSON;
    // else
    } else {
        // gCameraMovementFlags:Remove(CamMove.C_UP_MODE)
        gCameraMovementFlags &= ~CAM_MOVE_C_UP_MODE;
    } // end
} // end

Content

  • Surface Classes
    • Learn how to use the provided SurfaceClasses here.
  • Interaction Module
    • To learn how to quickly apply effects to Mario, such as Damage and Knockback (likely from your entity objects as the source) here.

Miscellaneous content

Code FFlags

I have implemented FFlags that switch over vanilla code <--> custom code, plus other settings. You can find the list in SM64.Client.FFlags.

Includes:

  • Code ported from other SM64-related repositories. I've picked SM64Plus, HackerSM64, Rovertronic's BTCM Hack (technically).
  • Code that does otherwise-better implementations for replacing vanilla solutions, such as using continuous movement instead of quarter steps.
  • Code that is a new thing from vanilla, such as implementing airborne inertia for when Mario leaves moving platforms.
  • etcetera