A truly 2D game isn't what you think it is...

  Рет қаралды 19,953

NivMiz

NivMiz

Күн бұрын

Hey folks! It's been a while, and I'm back with a pretty different type of video that my previous ones! In the video, I talk about my journey to create a simple 2D renderer, from a first-person perspective. It's a pretty unintuitive concept to understand in the first place, much less actually implement in code, but I'm very proud of the result I ended up with! I also spent a lot of time and effort working on the video itself, visualizations and all, so I really hope you enjoy it. I really do think this is my best video yet.
I was also very inspired by ‪@SebastianLague‬ & ‪@CodeParade‬ in making this video, so if you enjoyed it, be sure to check out their channels as well.
Support me on Patreon (and get access to the source code of this project) - / nivmizgames
Join my Discord - / discord
Buy my commercial game, SINGULARIUM - store.steampowered.com/app/26...
Play my small games: nivmizzer.itch.io/
Video was made with Motion Canvas - motioncanvas.io/
Chapters:
0:00 - Intro
0:37 - What Does First Person Even Mean In 2D?
2:14 - Ray Marching & SDFs
5:21 - Different Shapes & Fog
7:17 - Fixing Our Performance Issues
9:29 - Fixing the Strange Flickering
11:14 - 3D Illusion
11:59 - Adding Gameplay
12:23 - Outro
#GameDev #codingadventure #maths #unity #indiegamedev #devlog

Пікірлер: 200
@SebastianLague
@SebastianLague 22 сағат бұрын
Nice work! :)
@nivmiz0
@nivmiz0 14 сағат бұрын
Thank you very much Sebastian! I'm a huge fan of your videos! I took a lot of inspiration from your own raymarching code for this project, it was a big help in getting everything to work properly haha
@whimbur
@whimbur 7 күн бұрын
- first person 2d game - look inside - wolfenstein 3d
@RenderingUser
@RenderingUser 6 күн бұрын
This game is still 2d tho
@TheJas-vr2vr
@TheJas-vr2vr 6 күн бұрын
@RenderingUser Wolfenstein 3d is also technically 2d, the difference to this is the height of each screen column is dependent on distance from the player
@4Kslimy
@4Kslimy 6 күн бұрын
@@TheJas-vr2vrSo just like Doom it’s 2.5D because it uses some 3D aspects but it has some 2D parts as well
@ErdrickHero
@ErdrickHero 5 күн бұрын
​@@4Kslimythis is very uninformed way of looking at this. There's no such thing as half a dimension. Wolfenstein 3D is actually a 2D game with a 3D renderer. DOOM is actually a 3D game, as the game logic actually accounts for all three dimensions. The 3D renderer is rather limited, hence the simple level geometry and objects rendered as sprites. But objects actually do move in 3D space, i.e., movement up and down is possible and accounted for. This is not the case in Wolf3D, where the game all takes place in two dimensions and then projects a 3D image to the screen.
@ErdrickHero
@ErdrickHero 5 күн бұрын
​@@4KslimyThis is closer to Wolf3D, but if Wolf3D only ever printed one pixel (or a single coloured vertical line) for each horizontal position on-screen.
@darkfire_ninja
@darkfire_ninja 7 күн бұрын
How to make 1D game Step 1: take one row of pixels from a 3D game Step 2: stretch the row of pixels to be visible Step 3: add fog You have now made a 1d game!
@jayyusi
@jayyusi 7 күн бұрын
that's pretty much exactly what i thought would be done lol
@Uni_974
@Uni_974 2 күн бұрын
Step 4 give 2D being a GUN
@darkfire_ninja
@darkfire_ninja 2 күн бұрын
Oh no, i edited the comment and the heart i got from it got deleted :(
@Sterligs
@Sterligs 7 күн бұрын
Holy hell man the editing on this is crazy. The entire video is really high quality, and overall it’s great. Everything is explained well, edited well and it’s awesome. Props to you.
@nivmiz0
@nivmiz0 7 күн бұрын
Thanks so much! It took like 10x longer than my other videos to make, glad it seems it was worth it!
@LebatrowAndSqueak
@LebatrowAndSqueak 2 күн бұрын
@@nivmiz0 What is your strategy?
@cosmiccoruption5145
@cosmiccoruption5145 7 күн бұрын
this editing is phenomenal! gives me 2 hour youtube documentary about something you have no idea about vibes.
@nivmiz0
@nivmiz0 7 күн бұрын
Lmao, that's basically how it felt making it. Massive deep dive into a SUPER niche subject
@Mikee512
@Mikee512 6 күн бұрын
We had to read Flatland in high school. I had very low expectations: 1: it's old 👵 (1884), and 2: it's a math book 🥱. Turns out it reads in a surprisingly modern way, and is written in an engaging "storytime" sort of way. I recommend checking it out if any of that seems remotely interesting.
@nivmiz0
@nivmiz0 5 күн бұрын
I absolutely fell in love with it! Cool to hear you did too (:
@capnqueso
@capnqueso 7 күн бұрын
Time for speedrunners to find a glitch to go into the third dimension... WHY YOU GOTTA MAKE MY JOB HARD
@Uni_974
@Uni_974 2 күн бұрын
Nuh there going to glitch walk perpendically instead
@lavuy6744
@lavuy6744 7 күн бұрын
the section at 11min where u talk about it being a 3d illusion looks pretty similar to how we originally did the first 3d games.
@nivmiz0
@nivmiz0 7 күн бұрын
I had that thought to actually! reminds me of Wolfenstein & Doom
@yoavsaporta7348
@yoavsaporta7348 7 күн бұрын
Dude this video is amazing, I never would have known how much thought needs to go into something that sounds very simple - rendering some 2D shapes and walking around. The editing and explanations were also top tier, and have massively improved since you've started posting. Definitely one of the better videos you've made!
@nivmiz0
@nivmiz0 7 күн бұрын
Thank you so much yoyo
@tackalexander
@tackalexander 2 күн бұрын
I love how most of the comments i see either have a creator comment or a creator like, and it shows the actual passion that he must put into his community. i think that deserves my subscription
@nivmiz0
@nivmiz0 2 күн бұрын
I appreciate that so much!
@tackalexander
@tackalexander 2 күн бұрын
@nivmiz0 I love the way you portrayed this topic I've seen it done before but never quite as well as you have like it answered some questions that had been left unanswered before or undressed so I hope I get to see more of this quality content you are making and please keep up the most amazing work.
@steelwasp9375
@steelwasp9375 7 күн бұрын
I think the fog and colors can be tweaked a bit, no, a lot, to make it more readable. Fog could be the loss of saturation to an extent, going to blackness only at an extreme range, or if there's no source of light. Try adding sources of light, cause why not. It's confusing when the shadows move when you move, light and fog should be different. How about expanding FOV using the thickness of the line to represent what's in front and what's peripheral vision? Try to make a building, like the one in the Flatland cover. To balance it so the objects, sizes and stuff make sense. Make a kind of boundary around the camera/eyes of the character, so you can't or it's obvious when you stick your face in something making the visibility null. Kind of like inverse fog or a character's visual or non-visual sense for distance. Using Y axis and patterns, perhaps like a checkered transparent pattern of increased intensity for the object too close. Or add a second eye, making parallax possible. Run it cross-eyed, or... It's still a 1d game, even if you need 3d setup to run it with parallax.
@nivmiz0
@nivmiz0 7 күн бұрын
Thanks for the suggestions! These are really interesting. If I make a follow up I'll for sure look into them!
@HowdyYT
@HowdyYT 7 күн бұрын
Brother basically created doom
@4Kslimy
@4Kslimy 6 күн бұрын
Doom is 2.5D
@noob-killer
@noob-killer 5 күн бұрын
​@4Kslimy Doom is fully 3D. Just limited. Dont believe me?: kzbin.info/www/bejne/kIqqe4SnnbKBZ7csi=0GS7_rNc6hjIqBNw
@noob-killer
@noob-killer 5 күн бұрын
​ @4Kslimy Doom is 3d but limited. Theres a video on this on yt but i cant send the link here
@Uni_974
@Uni_974 2 күн бұрын
A 1D fatality would be kinda dope though
@valedesardi6252
@valedesardi6252 4 сағат бұрын
''We viewing a 2D world with a 1D view on a 2D screen in a 3D world through a 2D viewpoint'' I love it😂🔥
@SecretZoneGames
@SecretZoneGames 6 күн бұрын
I got this recommended and watched through the whole video without realizing it's not a million views video from a huge channel. Good job, It was super interesting and informative! You gained a follower :)
@nivmiz0
@nivmiz0 6 күн бұрын
Thank you so much! That's such high praise (:
@Uni_974
@Uni_974 2 күн бұрын
Yeah seeing more 1D content does put a smile on my face :)
@legend644
@legend644 4 күн бұрын
I've seen a million videos were people randomly talk about ray marching, but this is the first time the explanation actually hit me correctly. Congrats man, this is actually a great explanation of it The thing that snapped me out of it, was the explanation of signed distance functions. It finally makes sense that the proportional distance motion is actually computationally good, this is very cool.
@nivmiz0
@nivmiz0 4 күн бұрын
You have no idea how happy I am to hear that! Thank you!
@samucereal
@samucereal 7 күн бұрын
All of this is really cool, ngl, and the fact our brains can comprehend it is impresive as well
@nivmiz0
@nivmiz0 7 күн бұрын
I really agree! It's pretty insane that we can just use these simple tools to pretty accurately simulate living in a different spatial dimension!
@ack7
@ack7 7 күн бұрын
well I mean, 2D and 1D are fairly simple, and we're built to understand the comparatively more complex 3D. However, it is impressive that we're able to understand the vastly more complex 4D
@Amit180s
@Amit180s 7 күн бұрын
This was super interesting! The editing and graphics really helped me understand this better (because it was *really* hard to grasp when we talked about it lmao).
@Garfield_Minecraft
@Garfield_Minecraft 4 күн бұрын
the line is too flat for our eyes but if you add some height it will just feel like Doom. and Doom is technically 2D first person it uses ray casting for rendering, the space itself is 2D but graphic looks 3D that's just illusion
@bl4ckk
@bl4ckk 7 күн бұрын
Godly editing style, good job
@nivmiz0
@nivmiz0 7 күн бұрын
Thanks man! Appreciate that.
@finminder2928
@finminder2928 2 күн бұрын
Now do a 1D game from the point of view of a non one dimensional creature
@pfannkuchengesicht42
@pfannkuchengesicht42 6 күн бұрын
Using SDFs for this feels like shooting sparrows with cannons. Ray-casting would be way more efficient giving you the same results. Nice video though.
@diegocolmenero8696
@diegocolmenero8696 7 күн бұрын
This is crazy, loved the video
@JakeDownsWuzHere
@JakeDownsWuzHere 5 күн бұрын
this is great! i bet sebastian lague would dig it
@fedo18
@fedo18 6 күн бұрын
Reminds me of a scratch tutorial I watched once, they also used raycasting but the final effect was „3d“
@cyberneticsquid
@cyberneticsquid 5 күн бұрын
When NivMiz mentioned rays my immediate thought was "I've used a simple version of that in Scratch!" haha
@Yalest09
@Yalest09 6 күн бұрын
Wow this video is incredible!!
@jonwatte4293
@jonwatte4293 6 күн бұрын
Or you could render standard 3d but don't allow up/down pan and only display the center scan line...
@m.hosseinmahmoodi
@m.hosseinmahmoodi 11 сағат бұрын
Did you fix the fisheye effect? Because of the perspective, it's hard to be sure, but there were a few times that it looked fisheye-ee. Without fixing the fisheye effect, it's possible to see a bright spot in the middle of an edge and think that there is a vertex in that bright spot.
@somesthings
@somesthings 7 күн бұрын
This is so interesting and easy to understand. Kinda reminds me of the of Doom engine.
@nivmiz0
@nivmiz0 7 күн бұрын
Thanks a lot! Yeah the final product turned out reminiscent of those classic "3D" games
@DaylightDev
@DaylightDev 6 күн бұрын
Cool information illustation, and now I finally know of a way of doing that myself, thanks for the link
@nivmiz0
@nivmiz0 6 күн бұрын
That's really cool to hear, good luck with your own implementation!
@KingJAB_
@KingJAB_ 6 күн бұрын
Bro is going to be the next mashpoe
@Uni_974
@Uni_974 2 күн бұрын
Can't wait for 3D miner 😎
@flameofthephoenix8395
@flameofthephoenix8395 5 күн бұрын
11:06 Ah, I just figured that you would have a strange fog look.
@Romashka_Sov
@Romashka_Sov 3 күн бұрын
If i had a coin each time i see a video about creating FPS game in a 2D space, i would have 2 coins. Which isn't a lot, but strange that it happened twice
@KingJAB_
@KingJAB_ 2 күн бұрын
Mashpoe
@spygun21
@spygun21 7 күн бұрын
Man, who would knew that making a 2d game with a 1d perspective would take this much time
@nivmiz0
@nivmiz0 7 күн бұрын
The video took AGES
@kbkmn
@kbkmn 6 күн бұрын
you could just use tall 3d models with base of needed shape and apply depth buffer in shader. the result would be the same if not smoother gradient for rounded shapes and much more performant. also mask could be applied to control players visibility
@nivmiz0
@nivmiz0 6 күн бұрын
Yeah, but what would be the fun in that? I was trying to make a true 2D/1D engine, not to fake it! If I was trying to make a GAME in this perspective, I'd probably lean more towards your idea, but that really wasn't the goal here haha.
@kbkmn
@kbkmn 6 күн бұрын
​@@nivmiz0 hehe. can't remember who exactly said it: "we are not in a business of making engines, we are making games". anyway video was super entertaining
@ezram.4484
@ezram.4484 7 күн бұрын
As someone who read flatland in my physics class, this is cool
@gweltazlemartret6760
@gweltazlemartret6760 2 күн бұрын
Next step is to keep only the center pixel. This way, you get a glimpse of the pov from a 1d viewer about a 0d scene. 😅 And that’d be awesome!
@Uni_974
@Uni_974 2 күн бұрын
You my man are truly think in 1D
@holymonke2703
@holymonke2703 7 күн бұрын
NEW NIVMIZ VIDEO LETS GOOO 🔥🔥🔥🔥I DONT GET HES TALKING ABOUT BUT LETS GOOOO 🗣🔥🗣🔥🗣🔥💯💯
@barakzary4528
@barakzary4528 7 күн бұрын
Wow, I can't phrase how much i appreciate this channel for making such high-quality videos and aspiring to grow better every time!! #thefogiscoming
@nivmiz0
@nivmiz0 7 күн бұрын
The fog is coming.
@wermaus
@wermaus 6 күн бұрын
ok 2 cameras in 2D to get 2D binocular vision vision using 3d glasses
@user-em4up8do4k
@user-em4up8do4k 4 күн бұрын
It's a cool project. I think you should make a game out of it. For example, a FPS with wall-like covers and AI enemies, that use pathfinding. I also recommend adding a multiplayer.
@Uni_974
@Uni_974 2 күн бұрын
2D Doom 🔫
@flameofthephoenix8395
@flameofthephoenix8395 5 күн бұрын
There are actually plenty of 1d rendering engines that already exist, moreover, these 1d rendering engines are actually used to render 3d graphics, raytracing is commonly used for this, for each X coordinate send out a ray then depending on how long it took for that ray to hit something change the height of the vertical line for that x position, however, this is 2d, or is it? Realistically, the height is irrelevant, it's just there to help portray the ray length, you could easily replace it with something like brightness, brighter colors are closer darker are further. Also, this notably means that you could theoretically portray a 4d environment through the same method, however, in both cases this does a little bit of trickery, in the 1d case all it's really doing is swapping the y axis out for a z axis which makes the game appear 3d when in fact it just traded one axis of movement for another, and in the 2d case it'd be doing the same thing but to achieve the illusion of 4d graphics, and of course it's actually swapping more than just one axis of movement, it also sacrifices the color element to achieve this, color isn't typically thought of as an axis of movement but in a sense it really is, technically making all 2d games 5d due to red, green, and blue components of color, all of this adds up to make this idea a little funky.
@DavidJCobb
@DavidJCobb Күн бұрын
interesting. it's cool to see people experiment with spatial dimensions like this. reminds me of SCP-3966, which iirc also took inspiration from Flatland one thing im curious about is why you're using ray marching at all. would it not be easier to, for each pixel, perform a ray/object intersection test against every object in the scene, remembering which one is nearest? though i suppose SDFs might not be usable that way; you'd need a unique ray/intersection test for each shape or, failing that, a ray/edge intersection test used once per edge per object. hm... math was never my strong suit anyway, fascinating project
@Krebzonide
@Krebzonide 6 күн бұрын
Rather than a thin line you should stretch it to fill the whole screen but each column of pixels is a single color.
@nivmiz0
@nivmiz0 6 күн бұрын
I talk about that illusion later in the video! I left it as a thin line for a lot of the video because I feel it's probably more faithful to the book, but stretching them totally makes a really cool effect!
@CreativeNommonsCommonsLemmons
@CreativeNommonsCommonsLemmons 5 күн бұрын
Really Really Impressive to me, just before the end i was actually just thinking, what if he stretched the entire window's height? and also the bullets thing which i swear i actually tought he was gonna add that before i reached to the end, but still impressive work!
@Uni_974
@Uni_974 2 күн бұрын
Having a 2D gun is a staple in most 1D games 🔫
@mayronen9643
@mayronen9643 7 күн бұрын
the video looks amazing! it feels quite close to a Sebastian Lague video
@nivmiz0
@nivmiz0 7 күн бұрын
Thanks a ton! It was very inspired by his stuff, so I'm glad you think that!
@SquaredNES
@SquaredNES 4 күн бұрын
as 3d pixels are called voxels (volume pixels) the display pixels for this type of game should be called lexels (length pixels)
@lunarvoidvr
@lunarvoidvr 6 күн бұрын
i love how i had this idea for a vr horror game
@krajsyboys
@krajsyboys 6 күн бұрын
Very nice to see more people branching out to make games in other dimensions. But I'm curious, why did you use raymarching for your rendering?
@nivmiz0
@nivmiz0 5 күн бұрын
Thank you! I think different dimensions are an amazing mathematical concept and I've always been interested in visual representations of them. As for why I used raymarching, I've wanted to experiment with the algorithm for a while, and I felt like using it in this context would give it my own unique twist! It was a really fun project to make, and an interesting coding challenge. Plus, it's an excellent system for rendering! It works great, it's quite fast when run on the GPU, and it can render many more shapes than most other techniques, with minimal performance difference. There are of course many other ways to solve the problem I solved here, but I really do think my implementation is a pretty good one.
@ryleestatler7067
@ryleestatler7067 6 күн бұрын
I think you should have the pixels stretch to fill the screen since that's easier to see and more like what a flatlander would see
@AssasinZorro
@AssasinZorro 6 күн бұрын
It's strange that you recreate the Doom which is 2,5D game that shows the 2D world in 3D and you have chosen an algorithm that struggles to render a single line. It is an interesting experiment that reminds of an 7D indie game that I played years ago. It uses simpler rendering to orient yourself more accessibly The developer of the game is Marries van de Hoef, the game was called Seven Dimensions and was developed during 7dFPS about 10 years ago. I was unable to find it now
@nivmiz0
@nivmiz0 6 күн бұрын
Haha, a lot of people have made the comparison to Doom, but under the hood it's a pretty different implementation iirc. Either way, I'm not sure why you say that my algorithm struggles! The game runs at a pretty consistently high fps on my pretty bad computer, though of course when recording clips for the video the recording software lowered performance a bit, so it might seem laggier than it should be in the video. I'll look into that 7D game! That sounds super interesting.
@cashkurtz5780
@cashkurtz5780 3 күн бұрын
Having 2 eyes can also give depth perception.
@Uni_974
@Uni_974 2 күн бұрын
Or they could be a cyclops
@Awesomelot
@Awesomelot 3 күн бұрын
extrude the row upwards than divide the height by the distance of said pixels for a doom like 3d effect, I've used this for 3d in scratch
@akalex770
@akalex770 6 күн бұрын
I really liked that experiment. But im really glad that there are 2d and 3d games and no 1d games Xd
@Uni_974
@Uni_974 2 күн бұрын
Nuh‚ keep them 1D games coming __________________
@SquaredNES
@SquaredNES 4 күн бұрын
You should try porting this to 3ds, the need for fog would be mostly eliminated.
@ITR
@ITR 5 күн бұрын
Would be interesting to see an alternative version where distance was shown as height, even if that's not true 1D projection
@nivmiz0
@nivmiz0 5 күн бұрын
That's a really cool idea! I've seen comments here saying that's a similar approach to what Wolfenstein did back in the day, I might have to try it out and see!
@ITR
@ITR 5 күн бұрын
@@nivmiz0 Ah, true, I guess that is just basic perspective. Though they had textures ofc.
@RealTal.
@RealTal. 4 күн бұрын
Good vid
@coyo_t
@coyo_t 6 күн бұрын
5:16 if im reading this right (havent read sources) youre actually doing a panoramic projection of the scene, not a planar one so the shapes are distorted and bendy. its harder to tell because 1d but if you were to add tops/bottoms to the "walls" like wolf3d then youd be able to see it
@HomeofLawboy
@HomeofLawboy 4 күн бұрын
Can't you sum up the ray step lengths to figure out the distance to the camera?
@nivmiz0
@nivmiz0 4 күн бұрын
That's actually a great idea! I'll have to check it out to see if it improves performance in any way.
@_linkou1881
@_linkou1881 6 күн бұрын
can you create Mario or Flappy Bird with vertical line renderer with Mario or bird's point of view. I mean, now that you've made a top-down game with a horizontal renderer, can you make a side-view game with a vertical renderer?
@nivmiz0
@nivmiz0 6 күн бұрын
That's a really good idea!
@AmaroqStarwind
@AmaroqStarwind 6 күн бұрын
Don’t forget to look at Mashpoe’s 1D game as well, it’s similar to this implementation. He also has a stereo anaglyph mode for it!
@sewreman
@sewreman 7 күн бұрын
Damn, cooking once again
@Hyperboid
@Hyperboid Күн бұрын
ah yes, a compute shader for rendering. what could go wrong?
@aqwek
@aqwek 6 күн бұрын
I can imagine a 1D fps game
@unusualfabrication9937
@unusualfabrication9937 7 күн бұрын
please continue this one!
@mumblety
@mumblety 6 күн бұрын
Have you ever heard of Wolfenstein 3D and the raycasting method it used to build it's "3D" environments? basically what you did, but the pixel's height is dependent on it's distance to the camera. Also you might want to consider shading one side of the shapes darker than the other to help with readability.
@Bluegooose62
@Bluegooose62 6 күн бұрын
Why not only look for the corners of the shapes and stretch a colour from each point? Ray marching feels a lot harder on the device.
@lh8841
@lh8841 4 күн бұрын
What ist that Song/piece at 11:37 called 😃
@nivmiz0
@nivmiz0 4 күн бұрын
It's called Allégro by Emmit Fenn (:
@RealTal.
@RealTal. 2 күн бұрын
make it into a game yessss!
@James2210
@James2210 6 күн бұрын
I think it would be a bit better if you used the distance to the shape to smooth it out a bit more
@oliverdowning1543
@oliverdowning1543 6 күн бұрын
It's totally possible to remove that edge distortion from high FOV. It's a solved problem for raycasters and it involves either spacing out the rays unevenly so they land on the view plane with an even spacing, or emitting them from a view plane (although this would presumably harm perspective projection).
@Uni_974
@Uni_974 2 күн бұрын
Or you could get a 2D brain works too
@oliverdowning1543
@oliverdowning1543 Күн бұрын
​@@Uni_974 maybe, maybe not. Ultimately what really matters is how used our brain is to that particular projection. Since it differs from the projection we're used to seeing it looks weird, really we'd need a brain with eyes that worked like that. Not a necessary or sufficient trait of being 2D.
@gguy9398
@gguy9398 6 күн бұрын
Damn, these are some thicc ass pixels
@Nugget11578
@Nugget11578 4 күн бұрын
Why not use raycasting lol. This is just wolfenstein but with a vertical resolution of 1. Really cool though
@woekin
@woekin 4 күн бұрын
isn't doom93 technically 1d for shooting then, if you only display the center horizontal pixels.
@nivmiz0
@nivmiz0 4 күн бұрын
Sort of! It's a 2D game, which you play in first person! However, because it uses sprites and such to display things on screen, I wouldn't say it's exactly a Flatland-like accurate representation of a 2D character's view.
@research417
@research417 7 күн бұрын
I've seen this type of representation for 2D a couple of times and there's one thing that doesn't sit right with me. Your renderer aligns to what a character in a top-down world would see (e.g. Binding of Isaac). However, wouldn't it make more sense from a gameplay perspective to do a side-view inspired rendering system, similar to what Mario would see? The camera would be vertical rather than horizontal, and you would be able to look up and down. You could move forward and back, and you'd be able to jump. You could even allow the character to flip vertically and turn around like Mario can, if you want the player to be able to see where they're going when they move backwards. With that type of world, you could actually implement gravity, and consequently, a physics system. You'd be able to represent many games more easily. You could also place your 2D character in a 3D world and add back in left and right mouse movement, and it would translate to that medium easier than with a flat plane system.
@nivmiz0
@nivmiz0 7 күн бұрын
Yep, that's another legitimate interpretation of "First-Person 2D". But I think you may be slightly overlooking the problems of turning around, getting past objects in front of you and parsing the view to understand what's going on. This view is, at least in my opinion, a more intuitive way to explain the concept. However, I still think your version is interesting! I may make an implementation of it in a follow up video.
@research417
@research417 7 күн бұрын
​@@nivmiz0 You'd have to rethink the way depth is represented because you can't really feel out objects in the same way. I think a fog effect or something like that would work. Objects far away are dark/foggy and as you get closer they become brighter. I can imagine you'd be able to at least do Mario style parkour like that. And jumping would help a player feel out the level too as you can reveal more/less of an object by viewing it from lower or higher positions.
@raffiepro
@raffiepro 6 күн бұрын
No, depth is actually determined by looking at the distance of the same point through both eyes. Silly!
@Mikee512
@Mikee512 6 күн бұрын
Stereoscopic vision aids in depth perception, but it is far from the only trick the brain has for estimating depth.
@raffiepro
@raffiepro 6 күн бұрын
@@Mikee512 I know but the brain merely falls back on those, if you have two eyes than your brain will use them
@nivmiz0
@nivmiz0 5 күн бұрын
That's not really true! Mike is right when he says it's only a part of the puzzle. An easy way to show this is by simply closing one eye and looking around. Can you tell, generally, how far away things are? Does it feel like it takes more effort to do so? It probably doesn't, meaning you're perceiving depth without using your stereoscopic vision.
@raffiepro
@raffiepro 5 күн бұрын
@@nivmiz0 Yes, but your brain has to guess more if you don't use both eyes 👀👀👀, it's only really guessing and you can't trust it, it also makes you have only half the fov you normally have. But what you say is partly true, even though it is harder to perceive depth and see with one eye. But I guess this doesn't really apply to your project as it is 2D so maybe it makes more sense to have one eye instead of two for depth perception
@rulonoboev1783
@rulonoboev1783 6 күн бұрын
This reminded me of FEZ 2
@BARCINO-du4dg
@BARCINO-du4dg Күн бұрын
you want to know why we can see past objects in a 2d game? its because a 3d being just can. same applies 4thd object
@justinsemple7454
@justinsemple7454 6 күн бұрын
You could recreate the pentagon shaped house on the cover of flatland.
@nivmiz0
@nivmiz0 6 күн бұрын
Totally! That's the power of SDFs, you can make practically any shape you want.
@NoVIcE_Source
@NoVIcE_Source 6 күн бұрын
I would ACTUALLY play a game like this !!! Stretching the screen isn't cheating imo, when it comes down to perception who is to say that a 2d creature wont see it like this? Also is there a reason why you're not just using raycasting tho?
@RealTal.
@RealTal. 2 күн бұрын
NIVMIZ MORE LIKE NORIZZ LOOOOOOOOOOOOOOOOOOL
@flameofthephoenix8395
@flameofthephoenix8395 5 күн бұрын
10:16 Oh, I thought you were just simplifying it up until now to avoid going into more detail about how it would use the minimum distance from the ray and an object to step forwards.
@post_rot
@post_rot 2 күн бұрын
"no cost to performance"
@JayDayMay
@JayDayMay 7 күн бұрын
1 and a half weeks too late buuuuuuut very good👍 good job niv the miz
@nivmiz0
@nivmiz0 7 күн бұрын
uhhhhh better late that never?
@JayDayMay
@JayDayMay 7 күн бұрын
@@nivmiz0 better late than never.
@uselessdeadonez
@uselessdeadonez 6 күн бұрын
i remember this
@oyoplayer
@oyoplayer 7 күн бұрын
wolfenstein 3d but with only 1 line of pixel
@nivmiz0
@nivmiz0 7 күн бұрын
Yeah it ended up pretty similar to those classic 3D games
@LizardWizard444
@LizardWizard444 6 күн бұрын
so what wolfenstine?
@Johan-rm6ec
@Johan-rm6ec 8 сағат бұрын
It's about 2D movement not about the visual aspect of a game.
@RealTal.
@RealTal. 2 күн бұрын
nice rober music lol
@thepizzacarpizza1056
@thepizzacarpizza1056 19 сағат бұрын
fun fact: this is a 3d game because time
@nivmiz0
@nivmiz0 14 сағат бұрын
Lol
@biphonic
@biphonic 6 күн бұрын
this is a lubly jubly video.
@anixias
@anixias 6 күн бұрын
Curious what ray tracing would look like in this perspective.
@nivmiz0
@nivmiz0 6 күн бұрын
Hahaha, I think it might be completely unreadable to be honest All those reflections and light bounces would fill everything with a bunch of colors It's a really cool idea though, I might have to implement a version
@nanto6865
@nanto6865 20 сағат бұрын
Wait so I wasn't the first person to think about this? Huh 🤔
@nanto6865
@nanto6865 19 сағат бұрын
The difference between you and me is that you failed, I didn't wait no it's the opposite woopsie
@post_rot
@post_rot 2 күн бұрын
u can get the fog from the depth buffer
@nivmiz0
@nivmiz0 14 сағат бұрын
Well, in a traditionally rasterized game you would have a depth buffer, but when doing my own rendering with the ray marching algorithm that's just not available!
@post_rot
@post_rot 13 сағат бұрын
@@nivmiz0 oh right lol
@PeacockLover127
@PeacockLover127 6 күн бұрын
my brain doesnt get how to tell what shape it is
@nivmiz0
@nivmiz0 6 күн бұрын
It's trippy, isn't it? Haha.
@BakinKoljac
@BakinKoljac Күн бұрын
in the end, every game is 2D. because 3D games are still flat images on a flat surface. and by trying to create a 2D first person game, you just created a 3D game again
@Wojtek_1777
@Wojtek_1777 6 күн бұрын
This is a raycaster this is a pseudo 3D game
@ExzaktVid
@ExzaktVid 5 күн бұрын
Hate to say it but someone in gd did the same rendering first (dim by serponge) the only difference is that dim is taller.
@Uni_974
@Uni_974 2 күн бұрын
So‚ the more the merrier
@sabriath
@sabriath 6 күн бұрын
uhh, why use raystepping? That's entirely unnecessary and loops way too much. All you need to do is calculate from each point on the polygons to the camera, which will give you the distance, and therefor the color at that point along with the angle....then you interpolate the color between each 2 points in the polygon, ignoring drawing any negative direction (back culling) along the polygon list (also ignoring any angles outside the field of view). For circles (or any polygons above a certain threshold), you only need to find the 2 tangent and change the interpolation for color to that of a curve. So if you have 20 triangles, that's only 60 calculations per frame, not thousands. If you store the distance for each pixel as you draw it in a parallel array, then you have a z-buffer that you can check against when drawing to ensure you are not overwriting pixels of further objects on top of closer objects. If you put a height to the pixel based on the distance, you will have something similar to wolfenstein. congratulations, welcome to the 80s
@user-rg7fx6yc1s
@user-rg7fx6yc1s 6 күн бұрын
just make it a raycaster and ur done
@Cytoferus
@Cytoferus 4 күн бұрын
Is it time for the flatland rpg?
@nivmiz0
@nivmiz0 4 күн бұрын
That'd be super cool! I might have to try to make something of that nature in a follow up vid haha
@Uni_974
@Uni_974 2 күн бұрын
​@@nivmiz0You totally got to add a 2D finisher to your game 😂
I Tried Turning Games Into Text
18:18
Acerola
Рет қаралды 246 М.
5 DEVS Make a GAME without COMMUNICATING! (Bug edition)
14:24
Blackthornprod
Рет қаралды 109 М.
你们会选择哪一辆呢#short #angel #clown
00:20
Super Beauty team
Рет қаралды 30 МЛН
A clash of kindness and indifference #shorts
00:17
Fabiosa Best Lifehacks
Рет қаралды 25 МЛН
That's how money comes into our family
00:14
Mamasoboliha
Рет қаралды 9 МЛН
Why do Lasers in Games Look Like That?
8:09
NivMiz
Рет қаралды 6 М.
What is the Smallest Possible .EXE?
17:57
Inkbox
Рет қаралды 241 М.
He Said I Couldn't Make A Parkour FPS Game... So I Made One!
5:52
Hayden Johnson
Рет қаралды 3,6 М.
I 3D Printed a $1,224 Chair
23:56
Morley Kert
Рет қаралды 513 М.
10 Minutes vs. 10 Years of Animation
19:29
Isto Inc.
Рет қаралды 586 М.
The moment we stopped understanding AI [AlexNet]
17:38
Welch Labs
Рет қаралды 454 М.
Improving My Game With Tester Feedback
17:49
AngeTheGreat
Рет қаралды 173 М.
Adobe is horrible. So I tried the alternative
25:30
Bog
Рет қаралды 395 М.
Normal Objects With Extremely Hidden Rules
15:47
Aliensrock
Рет қаралды 208 М.
Making a game where you get sucked into your own (bad) code
23:10
Robert Thomson
Рет қаралды 1,3 МЛН
تجربة أغرب توصيلة شحن ضد القطع تماما
0:56
صدام العزي
Рет қаралды 12 МЛН
Easy Art with AR Drawing App - Step by step for Beginners
0:27
Melli Art School
Рет қаралды 8 МЛН
1$ vs 500$ ВИРТУАЛЬНАЯ РЕАЛЬНОСТЬ !
23:20
GoldenBurst
Рет қаралды 1,6 МЛН
Урна с айфонами!
0:30
По ту сторону Гугла
Рет қаралды 8 МЛН