Portal Demake for Nintendo 64: Portal Gun
Vložit
- čas přidán 5. 09. 2024
- Portal running on real N64 hardware.
In this update I got the portal gun working with recursive portal rendering. I also made some huge strides behind the scene on the game engine. You can download the latest version here.
github.com/lam...
These are the kind of demakes I really like.. ones that actually run on the hardware, not just some shader for Unity :) well done! The textures look great for N64!
I agree, these remakes feel more interesting with actual work put into them plus they help in preserving these games.
Yeah an actual demake
Someone should do a Portal Goldsrc demake.
I agree mainly because I have an n64
I think both have their places. Sometimes you want something that is retro on old hardware, and sometimes you want that retro feel at 90 fps.
Its beautiful
woah
Are you gonna try something with it?
Tbe legend himself!
the man has spoken.
yoo its the mario maker 3 guy
I wouldn't bother trying to optimize the game past a render depth of 7 portals, since that was the default value of the original game. Amazing work!!!
Would be a great power move tho
default value depends on your pc specifications
You can't really see anything past 4 or 5 with the n64's resolution on hardware, but 7 could be good when playing in HD on an emulator.
@@kip258 Yeah but… doesn’t playing this in HD go against the point
@@WalnutOW Does it? I thought the point here was the portals.
I can't believe the N64 can actually run this, great work man!
Thanks! I was surprised how well it runs too. I'm hoping the performance doesn't fall off a cliff as the levels get more complex though.
@@james.lambert In case you have performance issues, maybe you can contact Kaze Emanuar (if you haven't done already), he seems to know a lot about N64 code optimisations.
(at least for Mario 64)
This is incredible. Are you able to do this because of the N64’s unique framebuffer? IIRC, MarioKart64 had a television screen that was easier to render on hardware but emulators struggled with, because of how the N64 framebuffer works.
@@indask8 Kaze is a hack, his stuff cheats and only works on Emulators, not real hardware.
@@alopexau His early stuffs worked only on emulators, but his latest rom hacks are made to work both on emulator and real hardware, he has learned a lot over the years.
This might be the very first Portal demake I ever seen that isn't just a shader in Unity and actually runs on the hardware, good job I hope this project succeeds.
there is a nintendo ds demake
@@im_tem an Apple II one as welll
Don't forget the Minecraft mod that adds portals that completely breaks the gameplay lol
This is amazing.
holy crap
I see that your passion led you here too, fellow gamer
@@mojosulo *passionate gamer
First it was the "Overtime Incedent" and now you're here in the same comment section as popular Super Mario 64 modder Kaze Emanuar, what a time to be alive.
The world's most passionate gamer
When there's a menu of some sorts, it would be cool if the player could switch how many recursive portal layers should render during runtime, like the option that's there in the PC Portal, to influence their frame rate. You could even add more options there like enabling/disabling some of the VI filters or low/high res mode (if high res mode is even realistic - I don't know what resolution you're targeting but I will assume it's 240p just to squeeze that extra frame rate out).
Since this is running on an actual N64 there isn't much need of those settings. The hardware will be the same no matter what. Those kinds of settings are more useful for computers, since the hardware can change.
@@lilyofluck371 It could instead be used to change portal layers based on distance like an LOD, that way it can save performance on larger spaces where it's really needed.
@@Jofoyo That's what I was thinking. But I feel it should be on the fly. not a setting that can be changed by the player. I think that it should change by the things currently loaded into memory (which would increase as you see more things on your screen)
@@lilyofluck371 Sorry that's what I intended to say, but I can see I didn't clarify enough. I agree that it should just remain a static system.
@@lilyofluck371 I think they meant that people would be able to sacrifice framerate a bit for better visuals. Plus lots of people will be running on emulator where frame drops will be a smaller issue
I've seen so many projects like this die before they get anywhere. This is very promising and I hope you continue to work on this.
Unfortunately it died. Nintendo made him stop
As someone who grew up on the N64, it's a bit surreal to see this running at such a smooth frame rate. Impressive work!
From my recent infogestion most games on the N64 were not optimized well for the hardware and even the earliest games were not optimized due to the C++ compiler in use at the time being bugged. So, there is much more power in that little grey box just yet.
@@ikannunaplays If I remember right, for homebrew, it's still reccomended to use the same C++ compiler because the N64 toolset works best with it. If I remember right, you can use a modern compiler, but it;s more tricky and potentially buggy with the N64 SDK, also modern compilers also optimize for modern hardware and cpus which doesnt translate well to an N64 and cartridge. (I could be completely wrong, apoligies if I am)
I do know that the compiler was a big issue but also so were the programmers. The N64 came out when things were moving away from Assembly and C and moving towards C++. Most developers didn't quite understand C++ and didnt see the point of it so they tried to stick with what they knew. Only a handful mostly used C++. It took a while for the industry to switch over to C++ and for devs to gain an appreciation of it, even then, it took a while to understand how to properly and effieicnetly use C++. So it wasn't just compilers but also developers kindo f fumbling around with these new tools and often restoring back to C or assembly in areas because it's what they knew and understood best.
@@ikannunaplays Archaic N64 games weren't written in C++
@@mariocamspam72 GCC my bad
The portals working is great but having just found these the most impressive thing for me is the working cubes.
:O
This is so amazing! 15 portals is definitely overkill but it's good to know you have a lot of wiggle room. Really looking forward to see how far this will go :D
The number of portals probably scales inversely with the geometric complexity of the level, so once you have a "real" level the number of potenital portals goes down. Portal 1 on PC used a depth of 4 IIRC
on pc i think 9 was the max you could choose in the settings 4 might have being the standard setting tho.
@@ymgve 7 was standard on pc
Nice work. If I may offer a suggestion for optimizing/polishing... If you recall back to the portal, there's a bit of inward translucent glow in the portal. If you implement this as a texture in the portal, you can reduce the amount of portals drawn while retaining an illusion of infinite portals being drawn - should create an effective fog effect.
The fact that now there's a demake of Portal on DS, now N64 makes me so happy of how amazing the engine is handled.
as far as i know there is also a demake of portal on the psp (which runs on the quake engine (or at least I thought it did until I found out that there are no quake games on the PSP) + the movement is controlled by the triangle circle square cross buttons due to there being only one stick)
@@andrix7777 i wonder why it wasn't put on gold source considering its a heavily modified quake engine
@@Darachu GoldSrc isn't open-source, so it can't be ported to another platform by a hobbyist
@@prismavoid3764 well it can if you use xash
@@tauon_ Xash is a complete rewrite of/replacement for GoldSrc, not the same thing.
This looks REALLY promising!!! Already looks a lot better than most N64 homebrew games, imo. I wish you luck in furthering the development of this game!
Hearing how happy you were when you got to 14 layers deep was really cool. This is a super cool project, good luck man! I really hope the rest of dev goes smoothly
I laughed so hard at that part. Absolute insanity. It’s so cool!
Love how you randomly just went "14 portals deep!" Excellent work!
Subbed!
I can't say anything about how difficult this might be to program, but knowing how limited the N64 is performance-wise I feel this is actually _quite_ impressive. Nice work! Now that the groundwork is done I feel like the rest is just polish. (Well, "just" polish... Polish is super important, of course.)
If this becomes a finished game that could be released as a physical cart, I'd pay anything for that. Love portal, love N64
I would LOVE if this happened. It would be the only homebrew I've ever bought.
@@cxx23 me too 😂
Portal would actually look pretty amazing on something like the Perfect Dark/GoldenEye engine. Of course that is a team of pros being paid by a major company.
Amyway...this is awesome.
YOOO DUDE THIS IS SICK AF I LOVE THIS
i came in kinda expecting the usual "a few generic retro shaders slapped onto a crappy little Unity game, probably also using rendertargets (inferior to stencil) to render portals", but i was very pleasantly surprised
The number of levels deep your portal recursion can run performantly at will vary with map complexity, leaning heavily on your visibility and occlusion culling algorithms more than anything else.
This was the first thing I noticed about the layer stress test, he was working with very simple layers (floors, walls, cubes) but they can crazy heavy once you have more assets or features involved with the map. It was a good sign that he could hit 14 while also acknowledging that it’s only a couple pixels and therefore can be dialed back because I’d imagine it will require cutting a few layers to save performance after a certain point.
He could keep a reduced, fixed layer value throughout the game or even implement a variable layer value that changes with performance load. I’m pretty excited to see his progress, it looks super cool
I widner if he could fake a layer as well. Use the same method they did for the Jumbo Tron on Mario Kart 64.
Just grab the frame buffer and turn it into a texture. Then reapply it as the last layer.
@@travisschneider3011 I think render-to-texture would be slow because you can't parallelize it: the deepest recursion would need to draw to a texture first, then the result used in the next level up, all the way until you have a chain of render-to-textures that form all the portal recursions for the actual portal in front of you. Doing it geometrically - having basically parts of the screen dedicated to a different camera view - is going to be faster.
I think if he stuck it to 3 maybe 4 layers it'd be good.
7 would be preferable though if possible, that being what the actual game used.
Update in an update in the discussion of how many layers deep you can go was just beautiful
It's amazing it can render so many layers. Can't wait to see what's next!
Prey was originally planned as an N64 title, with portals and everything. in an alternate timeline we would have had portal technology on N64, in an official game release.
they also use the same technique to render high quality reflections
When this is finished I will definitely be getting this on a cartridge. Impressive stuff man!
Portal's system requirements say that you need 512MB of RAM to run the game.
...
...
And then there's this crazy dude, making it run on 4MB (or 8?). I love this thing so much!
This isnt a full port
@@oliverb.8995 it's still a port
This is amazing and thanks to your optimization this may open up the doors for more N64 FPS ports down the line too, I could very well see HL being ported the same way using your tech. Do you plan to lay any ground work for future programmers or even yourself so if someone wanted to take the LambertEngine and make say a HL port that they would have all the resources and documentation to do so?
A half life port would be really cool. If anyone can do I bet this guy can. N64 came out in 96, half life in 98 and portal 07.
I am legitimately impressed with this, really looking forward to seeing where the project goes.
This is really impressive, keep up the good work!
This is beautiful! Amazing job!
My best friend is an N64 addict and we both love the portal series. It would be so awesome to see this get a cart release when it's finished!
I've never owned a N64, never planned to, but if he releases a copy of this on cart, I'd buy one asap
Good shit! I'm an avid portal fan/speedrunner, love seeing the game recreated in new ways. Also love N64s. Subbed!
This is amazing, so cool to see one of my favourite games on one of my favourite consoles. So cool to see untapped potential of the n64
Imagine being a valve dev watching you solve problems they already know the answers to, kind of cool to watch other people solve problems you already have solved. Wish I was a valve dev, I would make portal 3
The biggest surprise is it not running at the framerate of a popup book like most N64 games did. Excellent work!
I was waiting for him to go even higher in the end. And boy was I not disappointed.
As an undergraduate Computer Science major I really share your excitement for this project. Looks great!
Hope you can fully recreate Portal on this console, wish you the best! I tried recreating the Silent Hill P.T. demo for N64 and failed miserably lol you're awesome
Optimization idea: make those little sticky out parts and wire on the gun a png texture on a plane if you haven't already
Heck just prerender it and make it one big plane
@@worthlessfools1 i mean yeah but then lighting will be worse on it
It's probably actually faster to draw an untextured mesh, skipping the whole texture loading and setup process, and would scale better on emulator too.
@@chlorobyte_projects yea vertex coloring is way faster than texturing. This isn't modern hardware, on modern hardware it'd be very fast to do that, but on an N64 loading a texture is kind of a huge ordeal, if you can skip texture wherever possible and just color vertexes, your way better off. Mario64 did this whever possible by mashing textured areas with purely vertex colored areas. ------ Also there's no "png" in N64 to my knowledge (I cuuld be wrong, it's been a while) and any transparent areas are extra work you'd want to avoid if possible.
The stick drift just screams "on real hardware" lmao :'D
So incredible man! I'm just gonna subscribe and hang around just in case I can ever get my hands on a physical rom!
This is insanely awesome. As a lover of portal and the N64, I'd love to play this, if ever something like an actual game will consist of it.
I am not surprised so many portals could be rendered. I don't know, how efficient the code is in the background, but concerning pure graphics capability, there really wasn't much on screen to be stressing the console. Just a hand ful of faces for walls and cube, multiplying this various times doesn't make such a big difference. I guess the gun already had 5 times as many faces as one rendered scene.
Proves plenty of life in these old systems
Absolutely phenomenal work and ingenuity. You're truly unlocking ancient power here!
Would it be possible to program it to use 2 N64 controllers for "twin stick" controls?
He sounds so depressed when just thinking of two portal layers but future him sounds so happy when testing layers 7 times as long
This is probably one of the coolest fricken things I've seen today. Great job man, great job.
I enjoy how you said "15 is the limit, don't do 16" like as if we could even do this lo.
I really enjoyed this video and enjoyed the updates within updates lol.
I'm astonished the n64 didn't burst into flames trying to run this. Must be using one of those fancy expansion packs.
My favourite PC game running on my favourite console? Hugh success!
I'll be keeping an eye on this and of course doing some tests, looks amazing!
can't wait for the community to figure out a pc port for this
can’t wait for this to be decompiled and ported to PC so I can play it natively there
wow. this is incredible!!! what an awesome project!!!!! i'm excited to see where you go from here!!!
these demakes are really cool, throws me back to codwaw modded doom running zombies. It was a spin off by creators but man was it cool for the time
I have been playing portal 2 on my Xbox 360 and it gets pretty hot running it. Making portal run on a n64 this good is very impressive, Good job 👍.
"But there's no since crying over every mistake
You just keep on trying with this Portal Demake"
I'd say somewhere between 5 and 10 portals deep would be about right, only 2 or 3 wouldn't be enough and any further wouldn't be very much of a difference, but the best option would be allowing the player to adjust it in the in-game settings menu
Forget portal on the switch, this is a port I really want to see!
This is the coolest N64 homebrew project I've ever seen. Please keep up the good work!
(Edit: I didn't watch your earlier videos before writing this part of the comment, but you might find some useful information here) I'd love to see rigidbody physics for the cube, if possible. Quite a few n64 games used rigidbody physics, so check those out if you need an example! The best physics that come to mind on n64 (though there could be a better example) is San Francisco Rush 2049. This game hasn't been decompiled or anything, but it is proof that the n64 is capable of doing accurate rigidbody physics!
The original game even had a setting on how many renders are done inside portals, and the range was from 1 to 9 layers. However, even with just 2 layers they got a semi-infinite effect.
What they did is, after rendering a couple layers, copy the result of the render so far and paste it into the inner-most portal's surface. Repeat the process recursively until the visible unpopulated portal is too small to care.
Demakes are the coolest thing I never knew I needed so much
I love the genuineness and enthusiasm!
This is so ace. I subscribed at “please stand by”. Give us as much detail about the nerdy stuff as you want/can as this project goes on. Moar layerz!!1
really cool
making portal on the psx would be more difficuilt since it has way less vram and it doesnt support floats so physics would have to be adapted for fixed point
also imagine if it could load actual source engine assets
2 of some of my absolute things, portal (1 and 2) and the N64. My heart skipped a beat when I saw this :D
Super fascinating to not only see new development for N64 Hardware, but also discovering new techniques and implementing coding standards to nearly 30 year old hardware. To think in an alternate reality, Gabe Newell could have released Portal on the 64 after he joined Nintendo. Great project, love the super cuts of the future updates, if you keep making projects like this I can see a future for your channel.
Absolutely fantastic - an actual, working demake. Will follow with interest!
This literally blows me away... nice job man!
wow this gained a lot of traction compared to your last vids on this, cant wait to see where it goes next!!!
I Would reccomend a revised control scheme for this type of first person game on N64. Instead of walking with the control stick and aiming with the c-buttons, you should do the opposite, walking with the c- buttons and aiming with the control stick. Then the A and B buttons can be used for easily interacting with objects and jumping, while you use the Z-trigger and R for the portals just like currently implemented.
There is also a case to be made for using the rarely used third controller grip option, walking with the d-pad and aiming with the stick instead, since that mimics modern controls more closely. But then it would be harder to seamlessly pick up boxes or jump. Multiple control schemes might be a good idea in the long run.
I agree that there should be an option to move via the C buttons, and aim via the analogue stick. That is the method I always use when playing first person shooters on the N64, and it works brilliantly.
Quake II also had that same control scheme and honestly, it's the only sensible one. There's a reason that on PCs, you use the keyboard to walk.
Very cool. Clicked on this not expecting it to run this good on real hardware. Astonishing.
This is awesome!!
You know the SNES with an FX2 cartridge could run doom (just!)
Next challenge portel SNES demake! ;)
Impressive it can handle even 2 layers. Working with raw N64 code sounds like incredibly difficult work with little reward. Hats off to you I am very curious how far this demake will go. Valve doesn't protect its intellectual Property like Nintendo does so this project has a much higher chance of succeeding. Great job!
Keep up the awesome work man, I can't wait to see this turn into a playable N64 game!
It literally already is
Mind blowing work 🤯 I can't wait to see where this goes, keep it up!
I absolutely love this, huge props to making it open source too
This was a triumph. I'm making a note here to subscribe.
Dude. 🤯
Whaaaat!? How? Just the fact you can see through portals is awesome
Weird seeing the physics on 24 frames. Or any physics at all. Good job! Wonder if you and Kaze would ever work together
It’s not on the same scale as Rocket: Robot On Wheels but yeah it’s cool seeing physics on N64.
Holy shit please don’t stop working on this. Make it a game a mini game
at least. please. I’ll play it over and over again lol
I'm not that aware about what's impressive and not in the coding world, but isn't this kind of amazing in its own right? Because this is what true technological progress should look like!
Taking something from one engine that's very advanced, and stripping it barebones so it's still "BASICALLY" the same thing, but so heavily optimized that it runs on a 20 year old console.
This is impressive, but i can't wait to see what people do with the code itself to then make something of their OWN, that's not based on a portal gun but maybe other mechanics.
Demaking something truly amazing will let people create amazing things with it, for sure.
On N64, 15 layers of portals of a room is incredible.
even if it only rendered 1 deep, it would still be remarkable on n64, cant wait to see where this goes
I'm still waiting for Portal 3 and here he is with Portal 64 😱
It's amazing!
GG, that's a very nice work here!
I'm amazed that the portals can even be done at all considering the hardware.
This is awesome. I am definitely subscribed and following this closely.
Seeing this run on N64 hardware is the cherry on top, imo. Great work James!
This looks really cool, huge props for source code.
Partner with Kaze, you two could make something truly incredible.
The fact that you could even do 3 layers of recursive portal rendering is INSANE to me! Either you are an efficiency master or I'm not giving the N64 the credit deserves! Or a little bit of both, of course :P
Lol that is impressive. The N64 doesn't even like rendering mirrors with most mirrors actually being windows into a clone of the room.
I didn’t even know you could still make games for older hardware. I had thought about it in the shower, but seeing it being real is beyond awesome!
The fact it's running on an actual N64 makes this so much cooler than I expected I didn't know this was even possible on an N64.
This is impressive man! Really awesome stuff. Keep it up!
Portal seems like a good game for a demake. The test chambers are already rather sparse, not due to hardware limitations, but as an aesthetic choice, but this does end up making it easier to run on less powerful hardware (well, until you get outside the test chambers and into the back areas). The hardest part was always going to be the portals themselves. Oddly enough, these two end up complementing each other nicely, as rendering extra copies of the map through portals would drastically increase the load on the system, but the simple aesthetic drastically reduces the load.
Not in a million years would I have thought this is possible. Really impressive.
This is fantastic! I'm amazed how many layers of portals you can deal with.
You should really start doing your testing with much more complex geometry, just so you don't run into any disappointments later on. Stress test early, especially when it comes to rendering. If you're crashing at 16 layers with such a simple room, imagine what's going to happen with 2 or 3 layers and a more complicated one. Cool project, btw. I love seeing hardware pushed to it's limits.
Immediately downloaded and booted on my Everdrive 64 -- so COOL!!!
Wow, I hope to see a finished version some day, because this is just awesome. I remember someone was working on a demake of Half-Life 2 that was meant to make it look like Half-Life 1, but it never got finished. :( Super sad about it.
Regardless, this is impressive!
i have alot of respect for you this is such an interesting thing to do