And another aspect that gets harder and harder is profiling. It becomes increasingly difficult to build test cases where you can see the marginal gains, and see their actual effect across all the various gameplay scenarios.
Are you saying you've freed an entire megabyte of RAM? The N64 only has 4MB of RAM. That's 25% more memory for the game to use. This sounds like the absolute largest N64 optimization ever!!
Is it possible for somebody to design a larger memory expansion pack, or is something hard coded to only support the +4MB the OEM expansion pack had? Seems like an opportunity for a larger expansion pack PCBA to be developed and dropped in.
I saw this on Twitter as well. The AllocDeallocPoolState struct you showed on there, at first I thought it had a sub-optimal layout (8 bytes of padding), but then I thought maybe it was like that to align to page boundaries? (32 bytes large) Also, will we get a video about that sine function anonymously emailed to you that managed to out-perform the one SilasLock created?
I wonder if this is the most optimized N64 game ever. By one person, on top of that. And he hasn't even been a programmer for that long, relatively speaking. What I want to say is, I'm very impressed what you've accomplished.
It's worth noting that Kaze chats with plenty of smart people, who have directly given him or helped with the optimizations he's done to the engine, talked with him about how the hardware works, etc. Not to say Kaze isn't smart, but his optimizations aren't just him doing it all on his own in isolation, but a large community effort that ends up implemented in his engine, built from the knowledge from the community
I have several ideas how to utilise this extra RAM. 1) increased texture variety (approximately 100 * 32 x 32px textures fit in 800KB RAM) 2) increase LOD levels from 2 to 3, specifically to reduce triangles at a medium draw distance. 3) increase the variety of player/enemy animations 4) provide enemies with different facial expressions (neutral, angry, sad) using different textures 5) going against your optimisation approach of gradient backgrounds, this would allow for a 512 x 512px skybox at 524KB of RAM.
Let's see if I understood. The optimization in this video is that you better split the memory accesses across multiple memory segments? You were doing that before, but you could not split optimally because the memory allocator implementation that SM64 uses (glibc's malloc?) only allows a single contiguous region of memory? But now you work around that by making your own implementation? Or maybe your implementation also splits allocations across memory segments, and that is an optimization too?
@@KazeClips malloc is a function from the C standard library for allocating memory. glibc is the implementation of the C standard library by the GNU project, which includes a memory alocator implementation, used by the malloc function. I just guessed that SM64 uses the glibc in the game, but I in reality I have no idea.
Very cool! I am kind of surprised that stuff is dynamically allocated, cause couldn't the game just use static arrays for everything? Or is there a downside to that that I haven't thought of?
Mupen64 Plus FZ seems to not have any overclock options available...Any idea how to do that? Are you emulating on PC mostly? I think that is the case, as you mentioned project64 in the past a lot... Whatever the case, yeah, i cant find overclocking in any of the options in settings of m64plusfz...Might be my exynos chipset that is to weak...Your romhacks do tend to hit 40mb margin and up Cheers Kaze! P.S. when is this game going out? You said that your life is quite busy with baby and stuff, but any rough schedule where it can be expected? end of the year, summer 2025? Any ideas?
Mupen FZ DOES have overclocking options Select your game, then go into settings, then go to the bottom of the list and click advanced Then set count per operation to 1 and overclocking factor to 5
@usernamesareweird4880 in my version of the emulator there is no overclocking, nor is there any settings option when i enter the game All the settings i choose, i choose in the main menu of the emulator and then i configure everything...But even here i have no overclocking or anything remotely similar. whatever the case, thanks for the advice Maybe i have the "wrong" version of the emulator...Mupen64plus FZ Pro version does not have anything you are talking about Maybe you can share some link where you downloaded your own version, on discord or something...Again, thanks for the response kind stranger!
You are the slightest bit sharp, but you aren't the sharpest tool in the shed. Tell me, how is Rosalina so popular if all she does is sit around near where Mario is after he comes back from a galaxy? She doesn't speak, she doesn't sweep, and she doesn't eat. No really, she is almost stoic, how is this?
It's crazy that optimization seemingly has no plateau. You never get to the point of "OK, there is literally nothing left".
And another aspect that gets harder and harder is profiling. It becomes increasingly difficult to build test cases where you can see the marginal gains, and see their actual effect across all the various gameplay scenarios.
(Exponential) *Decreasing returns.*
The very end of optimization must be when the code gets just too convoluted and is not manageable anymore
scp 79 but in real life
@@therealjones-o6x the only end is when there is no code
At the current rate of 'huge optimizations,' the mario 64 engine will be running crysis about mid next year.
"But can it run Crisis"... How old is that joke anyway? Feels like yesterday
Unlikely, maybe Far Cry?
Are you saying you've freed an entire megabyte of RAM? The N64 only has 4MB of RAM. That's 25% more memory for the game to use. This sounds like the absolute largest N64 optimization ever!!
i'm using 8mb of RAM since im using the expansion pak, but it's only .8mb or so - so 10% i'd say
@@KazeClips still huge, you're achievements in optimization are amazing nonetheless!
Is it possible for somebody to design a larger memory expansion pack, or is something hard coded to only support the +4MB the OEM expansion pack had? Seems like an opportunity for a larger expansion pack PCBA to be developed and dropped in.
WOW 1 MB is HUGE!
This sounds both sarcastic and serious to me
@@blossomcherrypink I meant it in the context of the N64 so def serious. But in hindsight I see how it can sound sarcastic af ^^
1MB is a million bytes (well, 1024²), so yes it is a lot.
Though Kaze wrote it's closer to .8 MB.
Do the Mario go zoom zoom now?
if rambus go vroom vroom, mario go zoom zoom. so yes, exactly
Mushroom, room.
@@fjhskd34u21h3yayyyy
You love to see another Kaze optimization video
I saw this on Twitter as well. The AllocDeallocPoolState struct you showed on there, at first I thought it had a sub-optimal layout (8 bytes of padding), but then I thought maybe it was like that to align to page boundaries? (32 bytes large)
Also, will we get a video about that sine function anonymously emailed to you that managed to out-perform the one SilasLock created?
You inspire me to learn things about programming I thought were once impossible
That being said I have no idea what is going on
@@tumbleweblmfao
Can't wait to run mario galaxy on the N64
I wonder if this is the most optimized N64 game ever. By one person, on top of that. And he hasn't even been a programmer for that long, relatively speaking.
What I want to say is, I'm very impressed what you've accomplished.
Kaze got to be a savant. It's insane how good he is at coding
@@The111Primagen he's a natural!
It's worth noting that Kaze chats with plenty of smart people, who have directly given him or helped with the optimizations he's done to the engine, talked with him about how the hardware works, etc. Not to say Kaze isn't smart, but his optimizations aren't just him doing it all on his own in isolation, but a large community effort that ends up implemented in his engine, built from the knowledge from the community
@@metroid031993 It's great that there are communities that let people like kaze shine!
@@metroid031993 I'm a programmer and I use the internet too.
Vroom Vroom
Pious Pious
@@TeltStory google translate
I have several ideas how to utilise this extra RAM. 1) increased texture variety (approximately 100 * 32 x 32px textures fit in 800KB RAM) 2) increase LOD levels from 2 to 3, specifically to reduce triangles at a medium draw distance. 3) increase the variety of player/enemy animations 4) provide enemies with different facial expressions (neutral, angry, sad) using different textures 5) going against your optimisation approach of gradient backgrounds, this would allow for a 512 x 512px skybox at 524KB of RAM.
That's like 4x more memory than you had before. That's a HUGE optimization! Congrats dude
Let's see if I understood. The optimization in this video is that you better split the memory accesses across multiple memory segments? You were doing that before, but you could not split optimally because the memory allocator implementation that SM64 uses (glibc's malloc?) only allows a single contiguous region of memory? But now you work around that by making your own implementation? Or maybe your implementation also splits allocations across memory segments, and that is an optimization too?
yeah thats the gist of it. idk what glibc's malloc is though
@@KazeClips malloc is a function from the C standard library for allocating memory. glibc is the implementation of the C standard library by the GNU project, which includes a memory alocator implementation, used by the malloc function. I just guessed that SM64 uses the glibc in the game, but I in reality I have no idea.
@@Rodrigo-xf2oehe was joking about not knowing obviously, it's just that malloc is too general purpose to be fast in SM64
Is this not like the 18th "huge" optimization this y e a r 💀
Are you complaining?
@@trashtrash2169 no no, just... just impressed really
Very cool! I am kind of surprised that stuff is dynamically allocated, cause couldn't the game just use static arrays for everything? Or is there a downside to that that I haven't thought of?
it has to load memory banks in each level, if you can't relocate those, you'd run out of memory fast
Now only held back by the structure of the mario engine itself
finally, mario 65
You’re an inspiration.
Great work kaze!
Great stuff
Someone explain this in TF2 terms
No
Waiting for you to both reverse engineer and remake Super Mario 64 from scratch
That's what the SM64 decompilation project essentially is.
lol omg how much optimizations can you still get out of the n64?
pooling
Mupen64 Plus FZ seems to not have any overclock options available...Any idea how to do that?
Are you emulating on PC mostly? I think that is the case, as you mentioned project64 in the past a lot...
Whatever the case, yeah, i cant find overclocking in any of the options in settings of m64plusfz...Might be my exynos chipset that is to weak...Your romhacks do tend to hit 40mb margin and up
Cheers Kaze! P.S. when is this game going out? You said that your life is quite busy with baby and stuff, but any rough schedule where it can be expected? end of the year, summer 2025? Any ideas?
Mupen FZ DOES have overclocking options
Select your game, then go into settings, then go to the bottom of the list and click advanced
Then set count per operation to 1 and overclocking factor to 5
@usernamesareweird4880 in my version of the emulator there is no overclocking, nor is there any settings option when i enter the game
All the settings i choose, i choose in the main menu of the emulator and then i configure everything...But even here i have no overclocking or anything remotely similar.
whatever the case, thanks for the advice
Maybe i have the "wrong" version of the emulator...Mupen64plus FZ Pro version does not have anything you are talking about
Maybe you can share some link where you downloaded your own version, on discord or something...Again, thanks for the response kind stranger!
You are the slightest bit sharp, but you aren't the sharpest tool in the shed. Tell me, how is Rosalina so popular if all she does is sit around near where Mario is after he comes back from a galaxy? She doesn't speak, she doesn't sweep, and she doesn't eat. No really, she is almost stoic, how is this?
Its because of her story book and mommy aura
Downvote just for trhe unclear title of the video. At least tell us it's for the N64. I don't follow this channel. Give us something :D
you will only get n64 stuff here silly
@@stanb1455 On RUclips.. or the Internet? As I said, I don't follow this channel :)
It takes 12 seconds for him to mention the N64 it's not like he waited halfway through the video.
This applies to every rdram, but im focussed on n64
who do you think you are, my 7th grade english teacher?