🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

General discussion about Super Mario Bros. X.

Moderator: Userbase Moderators

Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1661
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts
Pronouns: He/Him

🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby Ness-Wednesday » Fri Aug 01, 2025 5:00 pm

🔧ʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Hello! Welcome to the SMBX Textravaganza, a brand new mini series I'm making!

Here, I'll be covering any tech, glitches, or bugs I found in SMBX. This can range from niche but funny interactions to techniques that you can use in your SMBX levels. Each presentation will be shown through a series of 1-3 minute videos over a select number of days. Best of all, everything I showcase is done with ZERO LUNALUA!

In today's episode, I'll be going over one of my favorite techs that I've used in some of my recent Vanilla/ish levels: Invisible sizables!

For now, I don't have full explanations on how certain interactions work through the source code since I haven't mastered navigating it yet. Any help or feedback is greatly appreciated! The first season is made with tape and glue, but I'd be open to more polished seasons if enough people like it. You can also private message me submissions for future seasons.

Other Episodes:
Epsidode II: Friendly Fire
Last edited by Ness-Wednesday on Sat Aug 02, 2025 12:16 pm, edited 2 times in total.

deice
Rocky Wrench
Rocky Wrench
Posts: 621
Joined: Fri Jul 23, 2021 7:35 am

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby deice » Fri Aug 01, 2025 5:23 pm

Ness-Wednesday wrote:
Fri Aug 01, 2025 5:00 pm
For now, I don't have full explanations on how certain interactions work through the source code since I haven't mastered navigating it yet. Any help or feedback is greatly appreciated!
first of all, this is a fun idea, looking forward to the rest of the videos
second, is there anything in particular you're having trouble finding in the source code? it's quite a clusterfuck, so i don't blame you, but i'd be more than happy to help given how many times i've had to scour it to debug esoteric interactions

Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1661
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts
Pronouns: He/Him

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby Ness-Wednesday » Fri Aug 01, 2025 7:11 pm

deice wrote:
Fri Aug 01, 2025 5:23 pm
first of all, this is a fun idea, looking forward to the rest of the videos
second, is there anything in particular you're having trouble finding in the source code? it's quite a clusterfuck, so i don't blame you, but i'd be more than happy to help given how many times i've had to scour it to debug esoteric interactions
Mainly looking for how blocks, bgos, and mounts are handled. Especially anything related to rendering and whatever's hardcoded. I was only able to find anything regarding NPCs.

Shaktool
2025 Egg Hunter
2025 Egg Hunter
Posts: 491
Joined: Thu Jul 25, 2024 5:34 am
Flair: i have 0 dollars
Pronouns: HIM...

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby Shaktool » Sat Aug 02, 2025 6:05 am

i know one, climables that are generated like projectiles

deice
Rocky Wrench
Rocky Wrench
Posts: 621
Joined: Fri Jul 23, 2021 7:35 am

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby deice » Sat Aug 02, 2025 6:59 am

Ness-Wednesday wrote:
Fri Aug 01, 2025 7:11 pm
Mainly looking for how blocks, bgos, and mounts are handled. Especially anything related to rendering and whatever's hardcoded. I was only able to find anything regarding NPCs.
blocks are unsurprisingly handled in modBlocks. a good way to search for code that handles a specific block is to search ".Type = X" (or other comparison operators like <=, >= etc. (without the quotes)) because similarly to npcs, most of the logic is handled in these winding if statements
background objects don't have their own module, instead backgrounds that have special interactions will have them programmed from the other side (e.g. the code that handles keyhole exits is in the npc module, the key npc is the one that checks for collision), though some of the hardcoded ones like door locks and star warp indicators are partially handled in modMain, if memory serves me right
mounts are handled in the player module, you can check the player type definition in the main module to see all the fields related to mounts/yoshis and then ctrl+f for them in modPlayer, there are a ton of sporadic checks done throughout the different methods so i can't really give any more advice unless it's about a particular interaction

as for "whatever's hardcoded", the answer is that a lot is hardcoded, to the point where it's only really worthwhile to check if something specific is hardcoded or not rather than trying to be systematic about it, simply due to the sheer volume of magic numbers and long if statements that check against them
lastly, 1.3's rendering is done in modGraphics, once again in a messy chain of if statements (though well-commented compared to the other modules i think), but i'm not sure how reliable looking at it is given that lunadll implements its own rendering pipeline which i'm not super familiar with, so there might be obscure quirks that differentiate them (a lot of stuff that's been added/reworked in smbx2 just uses lua drawing anyways so i'm not sure if the bitblt call emulation even matters there)

this is all a bit vague because i do need to stress that the base game has a surprising lack of generic code, and a lot of things will just have some special interaction programmed inside an if statement. i'd be glad to go into more detail about how particular interactions (that i know of) work, but there's too many of them to just start listing them off

Ness-Wednesday
Purple Yoshi Egg
Purple Yoshi Egg
Posts: 1661
Joined: Sun Jun 28, 2015 3:50 pm
Flair: Diverse Scouts
Pronouns: He/Him

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby Ness-Wednesday » Sat Aug 02, 2025 12:15 pm

Episode II: Friendly Fire

Next episode is up! I'll try sticking with noon EST as the release window for now, but this may change.

Today, I'll be going over friendly coin shenanigans. Including what happens when you throw Toad's Boomerang at them or hit a p-switch.
deice wrote:
I assumed that the list of what's hardcoded was much smaller than it is. If there's anything specific that I need, I'll PM you. Thank you so much for your help! I greatly appreciate it!

mariobrigade2018
Rocky Wrench
Rocky Wrench
Posts: 679
Joined: Wed May 24, 2023 7:00 pm
Flair: OK in coding who dreams of making a Mario game
Pronouns: he/him

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby mariobrigade2018 » Sat Aug 02, 2025 4:22 pm

I wonder if there’s a fix for these.

Shaktool
2025 Egg Hunter
2025 Egg Hunter
Posts: 491
Joined: Thu Jul 25, 2024 5:34 am
Flair: i have 0 dollars
Pronouns: HIM...

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby Shaktool » Sat Aug 02, 2025 4:45 pm

These are potential if Science Con 3 ever happens

deice
Rocky Wrench
Rocky Wrench
Posts: 621
Joined: Fri Jul 23, 2021 7:35 am

Re: 🔧ꜱᴍʙx 𝓣𝓮𝔁𝓽𝓻𝓪𝓿𝓪𝓰𝓪𝓷𝔃𝓪🔧

Postby deice » Sat Aug 02, 2025 6:32 pm

mariobrigade2018 wrote:
Sat Aug 02, 2025 4:22 pm
I wonder if there’s a fix for these.
the friendly coin bug can probably be fixed in a couple of ways. the easiest would be to just cancel onNPCCollect, but this would still make the coin movable by boomerangs. preventing that is considerably trickier, as you can look here and see that toad boomerangs simply snap coins to their positions repeatedly. it would require something like storing coin positions at the end of each frame, checking for collision with a boomerang, and then snapping them back to the stored position if they're friendly

the invisible sizables can probably only be fixed by making their graphics transparent and loading them from a separate file, then drawing them manually if they're not marked as invisible (though to begin with you will almost never need to mark a sizable as invisible unless you're trying to recreate this exact bug so y'know)


Return to “General”

Who is online

Users browsing this forum: No registered users and 1 guest

SMWCentralTalkhausMario Fan Games GalaxyKafukaMarioWikiSMBXEquipoEstelari