SM64 Decomp Tutorial 4: Basic Object Behaviors

แชร์
ฝัง
  • เผยแพร่เมื่อ 20 พ.ค. 2024
  • Episode 3: • SM64 Decomp Tutorial 3...
    Pastebin with code: pastebin.com/0RWzvQvq
    We create our first behavior which is a 1-Up that gives us an amount of lives we can specify, it also doubles the lives if Mario is ground pounding. This is the first real code episode, and will be followed up with another one implementing more advanced behavior. You can follow along if you don't know C Programming, but I would highly recommend at least learning beginner amounts as it will help you a ton.
    Resources:
    HackerSM64, decomp but with a ton of QoL patches by Reonu: github.com/Reonu/HackerSM64
    Romhacking Mega Document - docs.google.com/document/d/1p...
    00:00 Intro
    00:09 What We're Making
    00:28 Code Explanation
    01:59 Foreword About Code
    02:28 Coding
    04:18 Putting the Object in a Level
    04:43 Possible Issues
    05:00 Adding Ground Pound Code
    05:24 Bonus Info
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 21

  • @walvie
    @walvie 2 ปีที่แล้ว +10

    always nicer to watch a video explaining something instead of reading through a 50 page document

  • @blueyosh43
    @blueyosh43 2 ปีที่แล้ว +13

    Thank Christ for your videos, man. They're very informative and easy to follow. The lack of tutorials on this stuff was very frustrating, you're doing a great service by making these.

    • @dudetheftmay8375
      @dudetheftmay8375 2 ปีที่แล้ว

      They are NOT easy to follow infact you have to pause every 5 minute

    • @mr.cooldude6529
      @mr.cooldude6529 ปีที่แล้ว +2

      @@dudetheftmay8375 oh ya you do better bud the guy tries atleast

  • @Eggnog417
    @Eggnog417 2 ปีที่แล้ว +2

    3 Words:
    You
    Are
    Underrated

  • @PSITheShyGuy
    @PSITheShyGuy 2 ปีที่แล้ว +3

    Love the quick and concise way you explain the topics in these tutorial videos. Might I suggest a video going into detail the different warp types and how they work, more specifically a decomp painting tutorial and how to implement it in your level. I see a lot of people struggling with that and getting accurately-sized painting holes in general.

    • @Bitlytic
      @Bitlytic  2 ปีที่แล้ว +1

      I may cover that in the future, I have a couple episodes planned like models, animations, more code, etc.

    • @retro-meister
      @retro-meister 2 ปีที่แล้ว +1

      @@Bitlytic Mate, plz make more. I'm very familiar with C/C++ and modern game development in engines like Unity, but when first looking at the decomp and figuring out how stuff fits together, it's pretty archaic and hard to follow. This has been super useful. Would love to see tutorials from you on models, animations, etc.

  • @mr.cookies0765
    @mr.cookies0765 2 ปีที่แล้ว +3

    great tutorial, you did a good job going into detail about the code, this is super helpful

  • @babythorgaming2166
    @babythorgaming2166 2 ปีที่แล้ว

    Thanks for the tutorials! It's making it so much easier to try out hacking sm64 for the first time. Currently learning so I can enter in Simpleflip's Crossover hack competition

    • @Zapdos0145
      @Zapdos0145 2 ปีที่แล้ว +1

      same here, good luck my friend

  • @deinemama6303
    @deinemama6303 2 ปีที่แล้ว +3

    Thank you so much for this series. I really hope you continue it. Without you, I still would have no clue, how to do anything in the code. Like I know c (not an expert, but I know the basics and have done some stuff in c) and can understand some of the code, but I'm confused with some of the variables and the structure. Can you make a video next, where you explain the acts? Like I want to add another act into the game, where Mario turns invisible and the camera does stuff and I looked at the sm64.h file but I don't know what the hexadecimal numbers mean after #define ACT_LONG_JUMP 0x0blablabla for example. Also how do I add stuff for the hud. For example an object, that you can collect, and that has a counter on the hud, that increases when you collect said object. Even if you don't cover these topics in the next videos, I hope you will continue the series. I will watch every video. :D

    • @Bitlytic
      @Bitlytic  2 ปีที่แล้ว +2

      The hud one is pretty simple, I would take a look at render_hud() in the file hud.c, I would suggest either adding a var to the marioState object or adding a field in the object_fields to track it, then add a function to render the count and call it in the render_hud() function.
      For acts, I would recommend looking at a tutorial/explanation on bitwise operations in C as that will clear up a lot of the confusion. Acts are defined in a way that makes them easy to get information about them, I'll drop this here for after you learn bitwise, but ACT_LONG_JUMP is defined as the bitwise OR of a few things:
      - The ID of the action (0x088)
      - ACT_FLAG_AIR (0x800)
      - ACT_FLAG_ALLOW_VERTICAL_WIND_ACTION (0x01000000)
      - ACT_FLAG_CONTROL_JUMP_HEIGHT (0x02000000)
      The reason it's done this way is so you can check what properties the action has, for example, if you do ACT_LONG_JUMP & ACT_FLAG_AIR (The & sign means bitwise AND in this case), it will return non-zero, which is C evaluates to true and shows that it belongs to the air group of actions.
      Let me know if that explains any of it or if there are still confusing points.

  • @shoopdahoop2221
    @shoopdahoop2221 2 ปีที่แล้ว +1

    I'm loving this series so far, do you have any idea on when the next episode will come out?

    • @Bitlytic
      @Bitlytic  2 ปีที่แล้ว +2

      I'm spending time away from home for a couple more weeks, but after I get back I have a video in progress

  • @darklitskies
    @darklitskies ปีที่แล้ว

    Awesome! Is it possible to script custom dialogue (like the ones you see when interacting with Toad in the castle?)

    • @Bitlytic
      @Bitlytic  ปีที่แล้ว

      Yeah, if you wanted to take a look at mario_misc.c, the function bhv_toad_message_init is how Toad starts dialog, in that case there is the bonus of spawning a star though. Alternatively, yoshi.inc.c and also the bobomb buddy in bobomb.inc.c are good examples of dialogs. The actual dialogs themselves are defined in dialogs.h (There are one of these for each language, but the one in text/en should be good to use)

  • @deinemama6303
    @deinemama6303 2 ปีที่แล้ว

    When will you upload the next part?

    • @Bitlytic
      @Bitlytic  2 ปีที่แล้ว +1

      There will be a new video up on the channel within the next few days

  • @gunnadahun
    @gunnadahun ปีที่แล้ว

    i dont understand why my code looks so different from yours

    • @Bitlytic
      @Bitlytic  ปีที่แล้ว

      There have been refreshes since that slightly changed the syntax to clear up some code, but it should be mostly the same. What are you seeing/missing?