How I optimized Portal to run on the Nintendo 64
Vložit
- čas přidán 15. 11. 2023
- 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/lambertjamesd/port... - Věda a technologie
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.
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.
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 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"
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
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!!!
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
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
im more impressed that you passed the puzzle by manually booping the box through the hole instead of just shooting a portal through there.
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.
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) : (
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.
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
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.
bounding boxes! This reminds of an awesome data structure called an R-Tree which is heavily used in GIS applications. (I work in GIS). The data structure itself was invented by a grad student at the time, Antonin Guttman, in 1984. I spoke with Toni years ago and he talked about how the data structure took off. Its great because databases can use this same structure to optimize queries on multiple dimensions (not just numbers, but strings, dates, etc.)
At my old job we had a reference layer of all the streets in PA and half the streets from NY. And we did that same naive approach of looping through all the streets to see if it intersected the screen before sending it to the GPU to render the map. After I implemented the R-Tree in there, we went from measuring in seconds per frame to multiple frames per second. I just want you to know that I appreciate on a deep level the computer science nerdiness of this problem you solved.
Also. WTF, I had no idea this project existed! amazing!
I ran into R-tree while leetcoding. Didn't ever actually implement it but I know it exists if I need it now
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?
I'm so glad I stumbled upon your project, and it looks like now your channel is growing! That's awesome!
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.
Amazing! Awsome to see the project coming along.
This is wild, most projects like this end way sooner and don't make it nearly this far, good job man
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
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.
Comedic AND engineering value of this project is off the charts :D
Awesome work! Nice to see the regular updates. Shared your video on some of the FB pages to hopefully get you more views.
I will never get over how insanely good this looks and runs.
Your work is impressive, good job.
I also love the dobsonian in the back!
Cave Johnson intro absolutely killed me. So blown away by the whole project. Great job.
This could be the first N64 game that can be played in Polish :>
As always, thanks for the cool development updates. And don't give up, I know some day you'll figure out those puzzles!
>turns on compiler optimizations
>Refuses to elaborate further
>portals out
Actually amazing, seeing this project progress month after month is genuinely incredible. Keep it up and can't wait to play! :)
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
Still the coolest coding project on CZcams
Welp
9:26 "Ugh, well, that's a new bug... it's not supposed to be doing that."
Right in the feels
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
Dude people are doing things i would just dreamt of 10-20 years ago
Fantastic work, man. Really. This is inspirational.
Also, I LOVE your Saturn V back there.
Incredible work. Just down right impressive. Well done!!!
"That's a new bug" :D
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.
I’ve been watching this since the project started! Amazing
This is absolutely amazing! Awesome work!
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
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 am extremely impressed by the first slice. You have provided such a great gift to the community, and for that, thank you.
glad you're starting to get more recognition because this project has been simply amazing to follow
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.
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.
4:30 Can we just stop an appreciate the visual quality of this demake?!
such good production value. SOO GOOD
I bet people will try to mod Half-Life or Half-Life 2 on N64 with this
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.
I actually love this, can't wait to give it a try!! Excellent job dude!!!
Just stumbled upon this. Looks amazing. Doing homebrew for old consoles is a dream hobby in the future when I have steady income.
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.
Totally incredible =D Brilliant intro too!
wow, the code optimations are so cool! also the project looks rlly good!
I like how when you talked about being able to not test everything, I was just thinking about BVHs due to an article about how Ray Tracing is accelerated recently and it ended up being that. That's. pretty cool!
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
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.
I love that my view on gaming can be expanded and informed at any given time on YT
wow, great updates, thank you very much! :-)
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?
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.
This is very impressive, Keep up the awesome work. 😺😺❤️❤️
I love the in depth explaination. As someone who hopes to make passion project games all this information is very useful
you used ai for the cave jhonson introduction?
the work you've put into this is absurd
No joke, I've never really understood BVH trees until your excellent explanation. 10/10
Absolutely love the saturn related stuff in the background!
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.
I hate the AI voice but it was worth sitting through for the creativity of the writing. Great job lol
This is turning out really well!
awsome update . real neat that you have gotten sponsore
The Spanish dub is ok, she just sounds weird in portal 1
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 czcams.com/video/kgdcbncPouY/video.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.
Super cool stuff!
But what got my like was the sound effect you made when presenting the rumbling pack 7:54 😂
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
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.
Excited to try this again with these updates! The game worked great when I tested it on my everdrive originally.
Interesting watch, cool stuff!
that AI intro was uncanny in a bad way
cry about it
This is super rad but the actors for a lot of valve games have asked people not to use AI replication of their voices.
What an incredible job you did! Congratulations. This shows that with dedication, any game can be made well, even for outdated hardware.
Man, it's nice knowing that I have to watched CZcams ads and then two of your ads. Thank you! I just love watching ads on CZcams after a long day at work!
wow it's almost like you're being entertained for free.
hell yeah that intro was great
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 insane, can’t wait to see the finished product
broooooooooooooooo i never thought of using cave johnson's voice with stuff like this. i loved the intro :)
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.
bro this is amazing, really eager to check your future projects!
AI voice in intro...
hey! really awesome work. i actually played the game on spanish and i am almost completely certain that is just how glados sounded like. keep up the amazing content.
I just got your ROM into my Raspberry Pi running Retro Pi. So cool playing portal64!
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.