How I optimized Portal to run on the Nintendo 64
ฝัง
- เผยแพร่เมื่อ 2 ต.ค. 2024
- Play World of Warships here: wo.ws/47grrw6
Thank you World of Warships for sponsoring this video.
During registration use the code HSF2023 to get for free: 200 doubloons, 1 million credits, 7 Days of Premium Account time, HSF commander Misaki Akeno, and HSF commander Irizaki Mei.
Applicable to new users only.
Here I talk about how I optimized the game, the challenges with rumble pak, and translations
Video edited by Joseph Lambert
Latest Portal 64 ROM Download
github.com/lam...
I like that you're not just making Portal on the Nintendo 64, you're actually trying to make it a good, polished game. That's commitment and you have my full respect.
It's already a good game, and optimizing for old consoles is an important point of any retro port.
@@LutraLovegood Yeah, my point is that where a lot of people might've stopped early on just to make a proof of concept, he's putting the time and effort into making the game as good and fully realized as possible.
@@hangry3102it is, in fact, so good, that it almost doesn’t look like a demake.
@@hangry3102 Ah, true. I see what you mean now.
yes sir!
this guy is a god of n64, like i wanna be for ue1.
It would be so awesome if this got an official steam release supported by valve someday. This is such a cool project
Even though it would never happen, I'd love to see this brought to Switch through NSO as well.
Valve would probably be on board with this, but Nintendo would probably try suing everyone involved in the project, including all of us who watched these videos. Fuck Nintendo!
It would be so cool.
how would that happen? Emulator? Why would you run the game through an emulator? The point of this is to run on the n64, and that (to my knowledge) would be kinda hard to do through steam, no?
(Btw I'm not saying this isn't a cool project, in fact it's an awesome project. Optimization can almost be considered a lost art form at this point. Seeing these kinds of projects is really refreshing to see. Also I'm a homebrew fan)
@@konpet4248 yeah, it would need to be emulated. it wouldn't make any sense to put it on steam lol
The latest version has some nice improvements not shown in this video. The portals are now more rounded and less angular than before. And the Portal Gun looks much nicer.
That's awesome.
I wanted to suggest to him that he increases the portal edge count. If your statement is true it would be awesome!
That's great. I always thought that they looked a little too simple for what N64 games really look like.
cant the portal gun be replaced with a 2D gif?
@@nutzeeerNo offence, but where is the fun in that? Besides, turning the gun into an animated texture will eat into the already limited texture cache.
9:27 RIP to the hours it will take to find the cause of that little bug.
what happened? I'm confused 😂
Visual glitch on the emancipation grill
The timing of GLADOS is incredible at 5:50 😂
"I did it with a naïve approach" followed by "No one will blame you for that"
She says "giving up", not "that"
You are doing some awesome work here my good sir. Seeing an old system like an N64 playing ANY game from that era is just nutty to watch. Can't wait to watch more updates!
I’m not gonna lie to you. The cake is a lie.
In my eyes this is also just a testament to how truly basic Valve games are, especially for being "modern revolutionary titles." They are at their cores, very simple games with simple mechanics that are fitting for a Nintendo 64 game. If you destroy Portal's graphics, sound design and animations, you could easily pass it off as a retro game. What made Valve games a revolutionary standard going forward was pretty much everything besides the core gameplay. FPS mechanics, puzzles, and platforming have all been done well enough before. It was the creative level design/traversal, the immersive "no cut-scenes" narrative that enhances the players personal involvement, and the physics/AI that made the game feel more alive, and of course the graphics. Strip those away and you'd basically have a Nintendo 64 game. And Portal is perfect for that, being one of the most basic Valve games there is. I'm most impressed with how he worked out the portals themselves, that probably would've been a nightmare to program for any og Nintendo 64 game developer at the time.
@@hangry3102 Couldn't agree more to your whole comment.
Having played Half-Life: Alyx, it shows even more.
@@hangry3102 the story as well. I fucking love HL2 man that game is a writer's wet dream
If I remember correctly Portal 1 would have rumble events at certain points where the lights flicker, elevators other scripted events. If you play porta 1 with a controller you could match those events in the 64 version!!
True!!!
RE: The spanish dub, that is how it sounds in the game. What's 'weird' about it is that the original spanis release of portal had a TTS voice that everyone hated so Valve hired some spanish voice actress to re-record the lines.
Huh!!! interesante, sabia que el doblaje español de portal 1 sonaba extraño, pero no tenia idea de que la version con text to speech era oficial, recuerdo haber descargado el juego pirata alguna vez y venia con las voces españolas tts, y creí que era... no sé, una traducción no oficial jajaja
@@BlondLeso si, el primer doblaje oficial fue con Loquendo. Después lo cambiaron.
@@BlondLeso Yo también xD, siempre pensé que era una versión pirata modificada por algún motivo, no tenía ni idea de que originalmente fuera loquendo
I feel like the portal 1 test chambers would lend themselves reeeeeally well to binary space partitioning. If it works, that would be an almost unbeatable culling method
Good idea. Source Engine is entirely BSP-based, actually!
Especially considering Source maps literally already use BSP.
@@TinyDeskEngineer Newer source games kinda ditched it, but I really think it would do wonders on the original portal. I mean, most maps in portal are geometrically simpler than quake maps.
@@SuperSmashDolls In source, the BSP part was only really used much in the older games. Newer games sometimes ditched it entirely. But considering most portal maps are geometrically simpler than quake maps, culling would be supercharged by BSP
@@xernerac Unless you're referring to Source 2, there is literally not a single Source game that does not use BSP. Some newer games like CS:GO usually use significantly more static props over solid brushes in maps than older games, but those newer games still use BSP.
In the regular "retail" version of Portal some subtitles for GladOS are not present (that seems to happen it a voiceline happens too shortly after another one). In your version that doesn't happen, so I guess that you are some steps ahead of Valve!
I wonder if he'll fix the part where GLaDOS says "You will be baked, and then there will be cake" but the caption says "You will be baked [static] ...cake". For that matter, we never did settle which was a mistake, the caption or the voice clip not being edited to include the static.
It was a bug in "1.0" fixed later on by Volvo ;p
@@calmarfps it seems that the bug came back in the "companion" edition (switch) : (
Welp
This update made the game file 3x bigger. It's already bigger than your average 32MB game like Zelda or Perfect Dark. I assume that;s because of the translated audio files?
If the game gets bigger it will probably surpass the biggest N64 games at 64MBs. Not sure if all emulators or everdrive style carts will handle this. Maybe split the translated patches?
10:20 Fantastic! You remained resolute and resourceful in an armosphere of extreme pesimism.
This has got to be the best way to describe making Portal for the N64.
im more impressed that you passed the puzzle by manually booping the box through the hole instead of just shooting a portal through there.
>turns on compiler optimizations
>Refuses to elaborate further
>portals out
As a Spanish speaker, I regret to inform you that unfortunately that is Glados' spanish voice. All Valve games that have a Spanish dub were recorded in Spain, which has a very different accent to the Spanish spoken in United States, Mexico, and most of Latin America. (We also hate it here in Mexico, in fact there is a fan-made mod in the works for a proper Latin American dub)
Can confirm that it's the exact same situation for her russian voice
Maybe it was for the Spanish people in the country the language comes from? Just a thought.
It would be fun to add an "N64 mode" where you reduce the draw distance and turn on depth fog. Make it feel like you're playing Portal on the Turok engine.
Wdym "N64 Mode" ..It's running on an N64
As in classic n64 fog
@MariaFlores-KAII ...I know. Did you read the rest of my post? I'm saying that this game looks decidedly unlike an N64 game because it has a long draw distance and no depth fog. So making a mode that simulates it would be fun(ny).
@@mageenderman read the words directly after "n64 mode" which explains what I mean!
@@memeboy8207 There is no "classic N64 fog". Most good N64 games didn't even have fog, it was only the popularity of the Turok games that created this meme. And similar games on other consoles at the time also had fog/pop-up so it wasn't even a N64 exclusive thing. In fact, N64 games on average had better draw distances than games on PS1 and especially the Saturn.
This could be the first N64 game that can be played in Polish :>
Tiny thing to consider in language selection: Including a separate Spanish translation for Latin America is _awesome_ . But simply calling it "Latam" feels kind of confusing when Brazil is also a part of Latam. They speak Portuguese.
the standardized abbreviations for Latam Spanish and Castellano tend to be spa-419 and spa-ES, which is also kinda confusing.
Awesome indeed, I'm tired of most things conflating Spanishes
Andddd? He could just add Portuguese and called it that, there's also a few countries that don't speak spanish nor Portuguese but since you don't care about them you just make it a: "Brazil it's left out"
@@bbrr12 This is not twitter and I don't hate waffles.
I hate the AI voice but it was worth sitting through for the creativity of the writing. Great job lol
I like how ppl are making games for retro consoles. I have been wishing for this to happen for the last decade now, and here we are. I'd literally purchase newly developed retro games for these old(er) consoles, because I grew up with these machines and like to share the nostalgia with my kids nowadays. Thx!
What you and Kaze do with the N64 is nothing other then amazing. You two should make a collab project and show off whats really possible on the N64. Just insane, i really can't express how impressed i am by your work.
Did the N64 really have lots of untapped potential?
Yes, a lot. It was very powerful, held back by early 3D days and of course the cartridge storage space. I can't wait to see what unfolds from these projects.@@LavaCreeperPeople
@@LavaCreeperPeople Based on what Kaze has done and shown it appears that at least early titles left a lot on the table. The graphics and performance improvements he's made to Mario 64 are insane.
@@LanceThumping EPIC
@@xGMV
Memory was a huge drawback also as far as I remember right? Even with the expansion it was still very megre.
Spanish speaker here, iirc that's just the dubs problem, that is the original one, that is why I played it in English most of the time
Congrats on the sponsor! Listening to other people refactor their own code is nice and cathartic lol
As an electronic musician I know how noticeable a 10ms delay can be so I salute your efforts on minimizing it
So incredible that you did all the translations. I know it's not the most impressive part of this, but it means a lot to so many people. That being said, I have been following this project the whole way and am so excited to see how fast it's running. Keep up the amazing work!
It actually is the most impressive part. Not every retro port comes with extra languages and QoL.
he didn't write all the translations, the game just pulls them from valve's portal VPK files
that AI intro was uncanny in a bad way
cry about it
I love that my view on gaming can be expanded and informed at any given time on YT
If Valve will ever see it and acquired it, this is canon. Optimized for N64 can be great for improving frame rates.
It's great for running on the N64, but PC Portal was already lightweight.
Do you think about how aomething like this would have been accepted if released back in the day? Say 1999? Obviously technically impressive, but the type of game (puzzle) on the N64, with that humour?
Still the coolest coding project on TH-cam
The Spanish dub is ok, she just sounds weird in portal 1
I bet people will try to mod Half-Life or Half-Life 2 on N64 with this
I've always loved this whole thing since it was created, cuz when i was in high school, i used my N64 Controller one day to beat Portal... good times
looking forward to playing this
you used ai for the cave jhonson introduction?
Hey man, I've been following your videos for a while, I'm Brazilian and I can translate anything from English to Brazilian Portuguese. I checked on github but found only "extra" menu files.
I see that the translation in my language is way off (google translated?). How can I help?
Edit, I saw I have to go on github. May I do this over the weekend?
I will never get over how insanely good this looks and runs.
broooooooooooooooo i never thought of using cave johnson's voice with stuff like this. i loved the intro :)
Comedic AND engineering value of this project is off the charts :D
All I know about N64 optimization is that you likely want to optimize for size, because the memory is so incredibly slow and handling anything entirely in cache is a massive win. Talk to Kaze for sure, unless you have already :)
Rambus must go vroom vroom
Not a fan of the AI, would've much preferred a cave Johnson impression even if it was cheesy or bad. Maybe I just hate AI
Get ready for the future then cause you’re gonna hate it lol
This is wild, most projects like this end way sooner and don't make it nearly this far, good job man
This is super rad but the actors for a lot of valve games have asked people not to use AI replication of their voices.
Fantástico e fascinante! É uma sobrevida para o N64 e também uma forma de preservação do console, porque projetos assim exploram além dos limites do que era possível fazer na época da geração do console.
Hey, maybe you should reach out to, like Limited Run Games? It's a crapshoot, for sure, but there is a possibility Valve'd be open to allowing this to exist as an official release!
I have literally never seen someone solve that test chamber that way
twist: He genuinely couldn’t beat that test chamber in the original, and he subtly changed the geometry in his version so that he solve it that way.
Dang, it's sad that it got shot down
"That's a new bug" :D
So why not contact the developer and let them decide if a .z64 version should be commercially available?
Most users of n64 flashcarts won't want to go through this complicated process in creating a compatible rom file.
Despite this, many thanks for your contribution in creating this.
Many Thanks!
Amazing! Awsome to see the project coming along.
Woah how did you get the the aperture science music?
Also can't wait for portal 2 64
Your next project should be porting the already decompiled Ocarina of Time to the Sega Saturn.
This.... THIS... would be legendary.
Could the Saturn handle it? I saw someone recreate SM64’s castle grounds in the 3D platformer they created for the system and it didn’t look as good as it does on the N64. SM64 is probably the more realistic port.
@@protocetid If Tomb Raider works on 32x, I think it's possible.
@@segaboy9894 The way the developer of CubeCat spoke about the trials and tribulations of getting the SM64 map working makes me believe OoT is too tall an order for Saturn. I’m not a developer by any means, I’d like to see an expert weigh in on the matter.
@@segaboy9894 th-cam.com/video/kgdcbncPouY/w-d-xo.htmlsi=1Px_Ru23h6_Y5jIF
@protocetid Well, I'm looking at Portal for N64 right now so... But, I'm with you - I'd like to hear from an expert.
Jesus man, his name is HACKGRID, like... Hagrid, but a hacker not hackergrid
It's crazy to think some madman could have theoretically created Portal 25 years ago
I was thinking that but i doubt it.
@@TheEthanEdge why? The technology was there
Your work is impressive, good job.
I also love the dobsonian in the back!
Dude people are doing things i would just dreamt of 10-20 years ago
Are you going to add the Glados and escape sequence battle or just the normal test chambers?
Play World of Warships here: wo.ws/47grrw6
Thank you World of Warships for sponsoring this video.
During registration use the code HSF2023 to get for free: 200 doubloons, 1 million credits, 7 Days of Premium Account time, HSF commander Misaki Akeno, and HSF commander Irizaki Mei.
Applicable to new users only.
The first spanish dubbing was THAT bad. They did it correctly for Portal 2 and I'm not sure if they re-did Portal 1 or if I've imagined it.
The easy way to complete Chamber 9: Get yourself and the cube up on the platform in front of the orange portal. Shoot the blue portal through the hole above the material emancipation grill. Pick up the cube and walk through the orange portal.
i hope James was joking :D
Funny how another guy who played it did the same thing
@@Muskelhias I hope he was too, but he seemed rather serious in his confusion.
I really think it was a joke in the test being "impossible" according to the GLaDOS dialog.
Rest in Peace
I actually quite liked the Spanish GLaDOS not sounding quite right, like it's a different AI entirely
Of course it's different. It's not an AI anymore...
It's an IA.
as a greek im happy that greek was added as a language, i didnt even notice it when first watching the video!
What do you use to profile the game? Is that on hardware? I'm involved in the N64 decomp scene and would love more technical details about that kind of thing.
You basically just run timers on your different subroutines. Print them to screen or whatever.
First video I've seen on this project and thus far I can only conclude that you are a wizard.
I'm so glad I stumbled upon your project, and it looks like now your channel is growing! That's awesome!
Spanish voice sounds like WOPR computer voice in WarGames film (1983). It's great!!!
IME, at least coding in C on x86/x64 for 30 years, the most common cause of bugs when you disable debugging options (and enable compiler optimizations) is a lack of variable initialization. Usually I'll initially write perfectly fine code, but later I'll come back to some code and add a few things and re-use existing variables that didn't need to be initialized for what they were originally used for, but then I'll insert code before that which re-uses the vars and for some reason, some how, make the assumption that the variable is initialized to zero. This code works fine in debug builds, but causes issues on release builds because those uninitialized vars have random values in them leftover from previous functions manipulating their variables on the stack, and it's always super tricky to track down without debugging enabled.
I’ve been watching this since the project started! Amazing
Cave Johnson intro absolutely killed me. So blown away by the whole project. Great job.
Without a doubt you have done a great job that will surely make many people very happy, including myself since there are still many of us who still play with our consoles, so I congratulate you for it. You have an enormously amazing talent! Thank you very much and greetings wherever you are. 🙏🌟💯
As always, thanks for the cool development updates. And don't give up, I know some day you'll figure out those puzzles!
10:40 that's normal, i have beaten the game multiple times in spanish and it has always sounded like that
The bounding volume check, while in 3d, sounds a lot like the Doom's BSP tree in a nutshell. Very cool approach!
So like Quake ? I think that Valve built upon Quake.
@ArneChristianRosenfeldt quake came from Doom.
Doom used BSP tree hierarchy to determine what needs to be rendered on the screen, which sector is visible etc, same as James' approach here.
I can't say much for quake's rendering as I have less experience/knowledge with quake compared to doom
@@RMDetho It is called B Space P. Doom actually uses B Areas P tree. Quake uses the BSP as described in the academic article John Carmack got it from. I would have been so cool if OpenGL had supported hierarchical z buffer from the start to check if a node is visible.
@@ArneChristianRosenfeldt binary space partitioning, I'm aware, I use the similar approach for some of my development
the original portal uses bsp
This is very impressive, Keep up the awesome work. 😺😺❤️❤️
the work you've put into this is absurd
You look like security guard from fnaf movie
AI voice in intro...
No, what you described is a linker, not a compiler, a compiler just converts your C code into machine code, or in the case of LLVM bite code... (I mean I may be just being a little bit pedantic here, but it is important to remember that even though both clang and LLVM both the automatically invoke their respective linkers unless instructed not to)
Can I kind of rush about how cool LLVM is? It is essentially a language agnostic compiler/linker because instead of compiling down to machine code and linking that machine code, it compiles down to a byte code that it's linker can understand and then the linker creates a binary out of that... Where is normally what happens is the compiler compiles directly to x86 machine code. That makes it So all you have to do to write a binary generator that has all of the same optimizations LLVM for any language is write a compiler that compiles it into that byte code... And if you want to write a linker that links to a odd architecture [say the 6502] All you have to do is write a linker that links from that byte code into that architecture... [This is a very very bad explanation of how LLVM works]
Not gonna lie, having what sounds like an AI Cave Johnson voice at the beginning of the video made me very uncomfortable. This game is awesome, but with this video I'm struggling to get over the AI stuff at the beginning, to be honest.
Yeah that was neat but also gave pause for thought.
Mate if that made you uncomfortable for the entire video life is going to get very very disagreeable for you in the next few years.
i haven't checked in on this project in a while, and... WHAT THE HECK IT JUST LOOKS LIKE PORTAL NOW WTF
It's crazy that you were able to make this, N64 is one of the hardest consoles to develop for and to emulate as well
OK... So, at the start of 2:45 ish, to about 5:47 I LEGIT thought you were being all fancy with what you were wearing, a nice suit n' tie.. I just noticed its not. lol. Nice jacket and shirt, I totally thought it was a Suit. lol.
Nice! This sounds related to the Mario Minecraft mod; I saw SwankyBox’s videos on that mod, involve breaking a massive block to create more blocks that make more blocks, creating a freeze if too many boxes exist.
Have you seen the code optimizations that Kaze Emanuar did for Mario64 for speeding up the Sine, Cosine and a few other functions?
Maybe you could "lend" some of those as well 😄
Still watching but that intro is just amazing! Keep up the seriously amazing work. You and everyone working to bring this together deserve a big round of applause
to me the intro is a turn off.
at first I thought it was just audio pulled from the game but then realized it was custom. Is it just "too much" for you? Curious why you dislike it@@Wtdtd
@@-austinfelts It lands in the uncanny valley for me.
10:10 I have never seen Chamber 09 solved that way before lol 😅
perfectly good skit ruined by ai voices 💀
you can try UB sanitizers to pinpoint potential release bugs
Totally incredible =D Brilliant intro too!
Shouldnt the gun shake when going thru the grid before the elevator ? Or is that simply with the sequel...
Also I wonder if the gun could be slightly more detailed ? Unless not really.
FYI voice actors typically don't appreciate having their voice synthesized with AI and you could get in considerable trouble
I agree, I thought at first that it may've been a cool audio mashup, but was pretty disappointed to see that James had used an AI fake
Glad to hear I'm not the only one who felt very weird about this lol
Can't trademark a timbre.
@@AllahDoesNotExist you seem to be confusing "trademark" for "copyright" first of all, and second - even though as of right now there are no legal reprecussions to using AI replicas of people's voices, this is very likely to change in the future. aside from the law both individuals and companies can act on their own accord and bring consequences to your actions, such as putting you on a blacklist. I don't think valve or the voice actor will appreciate this usage of AI if they became aware of it and it's even less likely they will promote the product associated with this (such as making it a semi-official steam release, as suggested by another commenter)
@@maximpikalev9538 First of all, Allah does not exist.
Therefor copyright laws are unjust.
The Glados voice in spanish is accurate with the actual game. For some reason Valve made spanish glados sound a lot more robotic. But it does sound the same as in the game.
I didn't expect the voice, so I laughed my tail off for several minutes when I heard it. Hola!
hell yeah that intro was great
Who did the J.K Simmons impression for the intro of this video? Because it actually really sounds like him doing the voice. I'm hoping it's not AI synthesized audio.
As much as I love this project, I really don't appreciate the use of AI-generated JK Simmons. I hope you don't refrain from using it in future videos.
Optimization doesn't *create* bugs, it only exposes bugs that are already there but hidden.
Oh, you should've definitely tried the Russian voiseover. The thing is so bad it is just brilliant.
(We only got an actual good voiceover made by fans like last year)
El audio en español s perfecto 0_o