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

  Рет қаралды 29,899

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.
Source code for this project - github.com/NivMiz0/Flatland-E...
Support me on Patreon - / 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

Пікірлер: 288
@SebastianLague
@SebastianLague 17 күн бұрын
Nice work! :)
@nivmiz0
@nivmiz0 16 күн бұрын
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 23 күн бұрын
- first person 2d game - look inside - wolfenstein 3d
@RenderingUser
@RenderingUser 22 күн бұрын
This game is still 2d tho
@TheJas-vr2vr
@TheJas-vr2vr 22 күн бұрын
@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 22 күн бұрын
@@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 21 күн бұрын
​@@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 21 күн бұрын
​@@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.
@Sterligs
@Sterligs 23 күн бұрын
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 23 күн бұрын
Thanks so much! It took like 10x longer than my other videos to make, glad it seems it was worth it!
@LebatrowAndSqueak
@LebatrowAndSqueak 18 күн бұрын
@@nivmiz0 What is your strategy?
@cosmiccoruption5145
@cosmiccoruption5145 23 күн бұрын
this editing is phenomenal! gives me 2 hour youtube documentary about something you have no idea about vibes.
@nivmiz0
@nivmiz0 23 күн бұрын
Lmao, that's basically how it felt making it. Massive deep dive into a SUPER niche subject
@Mikee512
@Mikee512 22 күн бұрын
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 21 күн бұрын
I absolutely fell in love with it! Cool to hear you did too (:
@jadecboom8638
@jadecboom8638 2 күн бұрын
I honestly loved it! Honestly, I wish I had to do an assignment on it because, asides from mathematics, there's so many themes! How people automatically distrust anything they don't understand, how one can start to think about complex situations, how people also seem to dismiss theoretical possibilities just because they haven't yet viewed it.
@legend644
@legend644 20 күн бұрын
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 20 күн бұрын
You have no idea how happy I am to hear that! Thank you!
@lavuy6744
@lavuy6744 23 күн бұрын
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 23 күн бұрын
I had that thought to actually! reminds me of Wolfenstein & Doom
@darkfire_ninja
@darkfire_ninja 23 күн бұрын
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 23 күн бұрын
that's pretty much exactly what i thought would be done lol
@Uni_974
@Uni_974 18 күн бұрын
Step 4 give 2D being a GUN
@darkfire_ninja
@darkfire_ninja 18 күн бұрын
Oh no, i edited the comment and the heart i got from it got deleted :(
@silverkip2992
@silverkip2992 15 күн бұрын
is that not still a 2d game?
@vinsplayer2634
@vinsplayer2634 8 күн бұрын
How about a first person 1D game... It would just be one pixel.
@capnqueso
@capnqueso 23 күн бұрын
Time for speedrunners to find a glitch to go into the third dimension... WHY YOU GOTTA MAKE MY JOB HARD
@Uni_974
@Uni_974 18 күн бұрын
Nuh there going to glitch walk perpendically instead
@gavin5410
@gavin5410 9 күн бұрын
It's incredible how intuitive it was the second you added the fog
@HowdyYT
@HowdyYT 23 күн бұрын
Brother basically created doom
@4Kslimy
@4Kslimy 22 күн бұрын
Doom is 2.5D
@noob-killer
@noob-killer 21 күн бұрын
​@4Kslimy Doom is fully 3D. Just limited. Dont believe me?: kzfaq.info/get/bejne/kL93fbSizbOyYYk.htmlsi=0GS7_rNc6hjIqBNw
@noob-killer
@noob-killer 21 күн бұрын
​ @4Kslimy Doom is 3d but limited. Theres a video on this on yt but i cant send the link here
@Uni_974
@Uni_974 18 күн бұрын
A 1D fatality would be kinda dope though
@Damian-cilr2
@Damian-cilr2 15 күн бұрын
Nah that'd be more like wolfenstein.
@SecretZoneGames
@SecretZoneGames 23 күн бұрын
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 22 күн бұрын
Thank you so much! That's such high praise (:
@Uni_974
@Uni_974 18 күн бұрын
Yeah seeing more 1D content does put a smile on my face :)
@yoavsaporta7348
@yoavsaporta7348 23 күн бұрын
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 23 күн бұрын
Thank you so much yoyo
@steelwasp9375
@steelwasp9375 23 күн бұрын
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 23 күн бұрын
Thanks for the suggestions! These are really interesting. If I make a follow up I'll for sure look into them!
@Yippie515
@Yippie515 3 күн бұрын
There's a guy named MashPoe who made a whole 1D game exactly like this, this kinda reminded me of it
@TheFoxfiend
@TheFoxfiend 10 күн бұрын
You extended the height of the render and suddenly I was reminded of how the rendering on Wolfenstein 3d was done. So yeah... I think the game you described has already been done. XD
@tackalexander
@tackalexander 18 күн бұрын
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 18 күн бұрын
I appreciate that so much!
@tackalexander
@tackalexander 18 күн бұрын
@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.
@dipperconte124
@dipperconte124 Күн бұрын
This is literally what I always tought for a long time, but I would think it as a vertical “line” because I was thinking it from a side wiew perspective
@bl4ckk
@bl4ckk 23 күн бұрын
Godly editing style, good job
@nivmiz0
@nivmiz0 23 күн бұрын
Thanks man! Appreciate that.
@Amit180s
@Amit180s 23 күн бұрын
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).
@valedesardi6252
@valedesardi6252 16 күн бұрын
''We viewing a 2D world with a 1D view on a 2D screen in a 3D world through a 2D viewpoint'' I love it😂🔥
@shardscape
@shardscape 15 күн бұрын
It would be interesting to see how it looks for you to move the 2d plane through a 3d space, could be pretty cool
@rerere284
@rerere284 13 күн бұрын
I don't think sdf is necessary here. Visually each object is made out of lines that have a gradient to them, you can probably just render them back to front like a normal polygonal game and it would probably take less processing power. Video was well put together though!
@diegocolmenero8696
@diegocolmenero8696 23 күн бұрын
This is crazy, loved the video
@samucereal
@samucereal 23 күн бұрын
All of this is really cool, ngl, and the fact our brains can comprehend it is impresive as well
@nivmiz0
@nivmiz0 23 күн бұрын
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 23 күн бұрын
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
@circumplex9552
@circumplex9552 2 күн бұрын
​@@ack7we cant fully understand 4d, although we can calculate it and understand facets of it
@ack7
@ack7 2 күн бұрын
@@circumplex9552 Me who has played 4D Golf: *Foolish Mortal, you have not one modicum of the understanding I possess*
@circumplex9552
@circumplex9552 2 күн бұрын
@@ack7 I know about 4d golf. same principles apply: you still cant get a full visual of the scene like a 4d being would. the ghosts are decent at providing one, but they still cant be seen when they overlap objects in your current 3d slice, you cant tell whether theyre coming from ana or kata, and the opacity isnt that good at telling you how far they are. you also still need to look around the 3d space whereas a 4d being would be able to see it all at once
@Garfield_Minecraft
@Garfield_Minecraft 20 күн бұрын
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
@potolog101
@potolog101 8 күн бұрын
the game shown is more like wolfenstein and not doom. doom while limited, and uses a 2d map, is still 3d, it renders floors and heights and stuff.
@spygun21
@spygun21 23 күн бұрын
Man, who would knew that making a 2d game with a 1d perspective would take this much time
@nivmiz0
@nivmiz0 23 күн бұрын
The video took AGES
@BertLeyson
@BertLeyson 5 күн бұрын
From the perspective of a 3D creature watching at the side, yeah, that's accurate.
@segganew
@segganew 46 минут бұрын
"if you play any FPS games" *Shows footage of Minecraft*
@yarensenalp5341
@yarensenalp5341 15 күн бұрын
Yoooo this was sick dude! I would love to see you expand this! And maybe make a real game from it!
@KingJAB_
@KingJAB_ 22 күн бұрын
Bro is going to be the next mashpoe
@Uni_974
@Uni_974 18 күн бұрын
Can't wait for 3D miner 😎
@jonaykon
@jonaykon 8 күн бұрын
”A first person 2d game is the easiest 3d game to create from scratch”
@Yalest09
@Yalest09 22 күн бұрын
Wow this video is incredible!!
@pfannkuchengesicht42
@pfannkuchengesicht42 23 күн бұрын
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.
@cinderwolf32
@cinderwolf32 9 күн бұрын
I had a lot of fun optimising my 2.5D raycaster. It calculates intersections with line segments after making a few attempts to do basic culling. The main issue is that the floorcasting texture isn't correctly aligned.
@jonsteensen7706
@jonsteensen7706 5 күн бұрын
If a Flatlander has two eyes, he could in principle get stereoscopic vision, with each eye creating its own line,which is slightly different from the one from the other eye. Using the parallax effect, that could result in him seeing the world in some kind of weird, but true 2D. It won't be the 2D version that we are used to, as he cannot see what is on the other side of object, from his vantage point, nor can he see what is inside the outlines of shapes, like we can. But he would be able to see shapes (at least the front part of them) and evaluate the distance to them.
@JakeDownsWuzHere
@JakeDownsWuzHere 21 күн бұрын
this is great! i bet sebastian lague would dig it
@somesthings
@somesthings 23 күн бұрын
This is so interesting and easy to understand. Kinda reminds me of the of Doom engine.
@nivmiz0
@nivmiz0 23 күн бұрын
Thanks a lot! Yeah the final product turned out reminiscent of those classic "3D" games
@DaylightDev
@DaylightDev 23 күн бұрын
Cool information illustation, and now I finally know of a way of doing that myself, thanks for the link
@nivmiz0
@nivmiz0 22 күн бұрын
That's really cool to hear, good luck with your own implementation!
@przecinek-ly9ko
@przecinek-ly9ko 5 күн бұрын
you made a 1D game in a 2D world. You see in 2D but you are in a 3D world.
@ImmortalTimothyM
@ImmortalTimothyM 8 күн бұрын
This is actually super neat. I wonder how other characters would appear and how would they be distinct from non character shapes.
@nivmiz0
@nivmiz0 8 күн бұрын
It's an interesting challenge for sure!
@ezram.4484
@ezram.4484 23 күн бұрын
As someone who read flatland in my physics class, this is cool
@VolumetricTerrain-hz7ci
@VolumetricTerrain-hz7ci 5 күн бұрын
Awesome video you make! I think Mar1d have proved that it is possible to make a true 2d game, with perspective, by making the lines smaller in distance. Thanks for the explanation! I subscribed your channel. :-)
@fedo18
@fedo18 23 күн бұрын
Reminds me of a scratch tutorial I watched once, they also used raycasting but the final effect was „3d“
@cyberneticsquid
@cyberneticsquid 21 күн бұрын
When NivMiz mentioned rays my immediate thought was "I've used a simple version of that in Scratch!" haha
@SquaredNES
@SquaredNES 20 күн бұрын
You should try porting this to 3ds, the need for fog would be mostly eliminated.
@bearoo_
@bearoo_ 5 күн бұрын
this is how maze games on Scratch work!
@DaShizi
@DaShizi 8 күн бұрын
How do you make your cool video prensentation animations when you are explaining?
@nivmiz0
@nivmiz0 6 күн бұрын
I used a tool called Motion Canvas!
@MeshremMath
@MeshremMath 20 күн бұрын
Having 2 eyes can also give depth perception.
@Uni_974
@Uni_974 18 күн бұрын
Or they could be a cyclops
@LucasPestana
@LucasPestana 8 сағат бұрын
That could help indeed. However, in "Flatland" (both Abbott's book and its two movie adaptations), Flatlanders only have one eye, positioned at one of their vertices.
@holymonke2703
@holymonke2703 23 күн бұрын
NEW NIVMIZ VIDEO LETS GOOO 🔥🔥🔥🔥I DONT GET HES TALKING ABOUT BUT LETS GOOOO 🗣🔥🗣🔥🗣🔥💯💯
@barakzary4528
@barakzary4528 23 күн бұрын
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 23 күн бұрын
The fog is coming.
@geeteevee7667
@geeteevee7667 8 күн бұрын
6:11 the fog is coming
@lunarvoidvr
@lunarvoidvr 23 күн бұрын
i love how i had this idea for a vr horror game
@moonyl5341
@moonyl5341 3 күн бұрын
so it's basically what people would call a 1d game
@flameofthephoenix8395
@flameofthephoenix8395 21 күн бұрын
11:06 Ah, I just figured that you would have a strange fog look.
@finminder2928
@finminder2928 18 күн бұрын
Now do a 1D game from the point of view of a non one dimensional creature
@oweri1419
@oweri1419 8 күн бұрын
I've thought about this before. The entire screen is one color
@sewreman
@sewreman 23 күн бұрын
Damn, cooking once again
@mayronen9643
@mayronen9643 23 күн бұрын
the video looks amazing! it feels quite close to a Sebastian Lague video
@nivmiz0
@nivmiz0 23 күн бұрын
Thanks a ton! It was very inspired by his stuff, so I'm glad you think that!
@Amonimus
@Amonimus 9 күн бұрын
Also known as FPS Raycasting tutorials except leaving walls untextured.
@kbkmn
@kbkmn 22 күн бұрын
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 22 күн бұрын
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 22 күн бұрын
​@@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
@m.hosseinmahmoodi
@m.hosseinmahmoodi 16 күн бұрын
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.
@oliverdowning1543
@oliverdowning1543 22 күн бұрын
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 18 күн бұрын
Or you could get a 2D brain works too
@oliverdowning1543
@oliverdowning1543 17 күн бұрын
​@@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.
@RealTal.
@RealTal. 21 күн бұрын
Good vid
@jonwatte4293
@jonwatte4293 22 күн бұрын
Or you could render standard 3d but don't allow up/down pan and only display the center scan line...
@krajsyboys
@krajsyboys 22 күн бұрын
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 21 күн бұрын
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.
@Ryöken17
@Ryöken17 9 күн бұрын
i thought about something " to have a 2D vision, you need one 3D eye, to make a 3D vision you need two 3D eyes. Maybe if you make two 2D eyes like you did with lines, that could be good for a flatland view. two lines that you crossed to make ( one 2D eye is a line, then two 2D line should be how they see 2D.... )
@ryleestatler7067
@ryleestatler7067 22 күн бұрын
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
@AmaroqStarwind
@AmaroqStarwind 23 күн бұрын
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!
@karlcole5617
@karlcole5617 5 күн бұрын
a few of us already knew that, and it became patently obvious given the thumbnail.
@Ryöken17
@Ryöken17 9 күн бұрын
Can you do " for each ( ray in raycasts ) { run raycastTest(ray); } to speed up the process ?
@DavidJCobb
@DavidJCobb 17 күн бұрын
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
@McGoomba
@McGoomba 6 күн бұрын
Wait is that a 3D and 1D game
@kyokajiro1808
@kyokajiro1808 8 күн бұрын
id love to play a game like this, though i find it a bit strange that you cant really tell where vertices are, for example if you see a cube in a 3D world on a 2D plane its very clear where the edges n vertices are since theyre typically darkened or theres a significant change in brightness due to how shadows work, i think that wouldve been quite helpful to help visualize the surroundings
@nivmiz0
@nivmiz0 8 күн бұрын
Implementing light and shadow properly in a world like this has its own issues, which I may go into in the follow up video. It has to do with the fact that if a light were to be obscured by a single object in flatland, it would cast a shadow behind it for the length of the entire world. Anyway I'm tackling the issue of differentiating between shades at the moment!
@kyokajiro1808
@kyokajiro1808 8 күн бұрын
@@nivmiz0 oh that's true, and if the shadow of one object gets cast onto another object it makes it very hard to tell whether it's a shadow or an edge
@jacksylander
@jacksylander 5 күн бұрын
Reminds me of the 1d game that mashpoe made
@JamieStar666
@JamieStar666 19 күн бұрын
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
@gweltazlemartret6760
@gweltazlemartret6760 19 күн бұрын
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 18 күн бұрын
You my man are truly think in 1D
@adorablycutekitten5291
@adorablycutekitten5291 8 күн бұрын
it's funny because i was just thinking the other day how despite the fact that we live in 3d space, our vision is sort of 2d (especially if we didn't have depth perception) and part of the reason i was thinking about that is because of the flatland movie
@nivmiz0
@nivmiz0 8 күн бұрын
Our vision is absolutely 2D! Part of the logic of the flatland universe is based on the fact that we see in one dimension less than the world we live in.
@akalex770
@akalex770 22 күн бұрын
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 18 күн бұрын
Nuh‚ keep them 1D games coming __________________
@flameofthephoenix8395
@flameofthephoenix8395 21 күн бұрын
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.
@eclipseslayer98
@eclipseslayer98 15 күн бұрын
Nice project. The only criticism I have, is that the "flatlander" is walking on empty space. In reality, it would need some kind of surface/planet to traverse on, and the planet would just be a massive circle the same way that gravity makes our planets massive spheres.
@circumplex9552
@circumplex9552 2 күн бұрын
you can just think of it as floating or if you want to make it more believable that it can propel itself, maybe its swimming
@gguy9398
@gguy9398 22 күн бұрын
Damn, these are some thicc ass pixels
@unusualfabrication9937
@unusualfabrication9937 23 күн бұрын
please continue this one!
@user-em4up8do4k
@user-em4up8do4k 20 күн бұрын
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 18 күн бұрын
2D Doom 🔫
@CreativeNommonsCommonsLemmons
@CreativeNommonsCommonsLemmons 21 күн бұрын
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 18 күн бұрын
Having a 2D gun is a staple in most 1D games 🔫
@wermaus
@wermaus 22 күн бұрын
ok 2 cameras in 2D to get 2D binocular vision vision using 3d glasses
@crolex6443
@crolex6443 6 күн бұрын
I think you would not need raymarching for that. You can simply created a 3d environment in unity, and a camera moving around like a player, but it can only move on a plane. Then only show the center row of the render output and override all other pixels to black using post processing?
@leviofun1798
@leviofun1798 21 сағат бұрын
What is your character standing and walking on? Border to 3rd dimension? Then try to push yourself off of a border to 4th dimension while flying in space! Topdown-like true2d game is not accurate because it implies existance of floor which is located outside two dimensions. Sideview-like is correct model of 2d universe with floor, gravity and jumping being a part of it. Let the buddy see the floor!
@HomeofLawboy
@HomeofLawboy 20 күн бұрын
Can't you sum up the ray step lengths to figure out the distance to the camera?
@nivmiz0
@nivmiz0 20 күн бұрын
That's actually a great idea! I'll have to check it out to see if it improves performance in any way.
@Romashka_Sov
@Romashka_Sov 19 күн бұрын
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_ 18 күн бұрын
Mashpoe
@Krebzonide
@Krebzonide 22 күн бұрын
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 22 күн бұрын
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!
@gavin5410
@gavin5410 9 күн бұрын
I wonder how this would feel in VR... like would depth perception work
@nivmiz0
@nivmiz0 9 күн бұрын
That might be a little too trippy lol
@aqwek
@aqwek 22 күн бұрын
I can imagine a 1D fps game
@AssasinZorro
@AssasinZorro 22 күн бұрын
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 22 күн бұрын
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.
@lh8841
@lh8841 20 күн бұрын
What ist that Song/piece at 11:37 called 😃
@nivmiz0
@nivmiz0 20 күн бұрын
It's called Allégro by Emmit Fenn (:
@lh8841
@lh8841 14 күн бұрын
@@nivmiz0 thanks👍
@research417
@research417 23 күн бұрын
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 23 күн бұрын
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 23 күн бұрын
​@@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.
@taibasarovadil
@taibasarovadil 3 күн бұрын
I thought you were gonna make a 3d game where every object is painted so that there is no difference in color across a vertical line on said object
@RealTal.
@RealTal. 19 күн бұрын
make it into a game yessss!
@mumblety
@mumblety 23 күн бұрын
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.
@_linkou1881
@_linkou1881 22 күн бұрын
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 22 күн бұрын
That's a really good idea!
@Ryöken17
@Ryöken17 9 күн бұрын
2D game who is 3D : Fez
@porky1118
@porky1118 Күн бұрын
6:06 I'm not sure about that. We have perspective, haven't we? If the shapes were colored, for example striped like the bork of a tree, And I know how they're normally srtiped, I would know which one is closer. Also you might have lighting/shading.
Simulating the Evolution of Rock, Paper, Scissors
15:00
Primer
Рет қаралды 1,2 МЛН
Why do Lasers in Games Look Like That?
8:09
NivMiz
Рет қаралды 6 М.
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
What is the Smallest Possible .EXE?
17:57
Inkbox
Рет қаралды 309 М.
This project pushed me to my limits...
21:08
avogaado
Рет қаралды 103 М.
Do I need a Game Design Document?
5:20
Alchemy Sheep
Рет қаралды 10 М.
Adobe is horrible. So I tried the alternative
25:30
Bog
Рет қаралды 758 М.
I 3D Printed a $1,224 Chair
23:56
Morley Kert
Рет қаралды 1,1 МЛН
I Remade My Scratch Game in Godot
10:04
LazyAlarm
Рет қаралды 346 М.
AI Learns to Run Faster than Usain Bolt | World Record
10:22
cozmouz
Рет қаралды 363 М.
Optimizing my Game so it Runs on a Potato
19:02
Blargis
Рет қаралды 501 М.
I Made Minecraft, but it's 1D
7:55
DelugeDrop
Рет қаралды 1,7 МЛН
НЕ БЕРУ APPLE VISION PRO!
0:37
ТЕСЛЕР
Рет қаралды 287 М.
iPhone, Galaxy или Pixel? 😎
0:16
serg1us
Рет қаралды 1,3 МЛН
Rate This Smartphone Cooler Set-up ⭐
0:10
Shakeuptech
Рет қаралды 3,5 МЛН
Как правильно выключать звук на телефоне?
0:17
Люди.Идеи, общественная организация
Рет қаралды 1,9 МЛН
S24 Ultra and IPhone 14 Pro Max telephoto shooting comparison #shorts
0:15
Photographer Army
Рет қаралды 9 МЛН
АЙФОН 20 С ФУНКЦИЕЙ ВИДЕНИЯ ОГНЯ
0:59
КиноХост
Рет қаралды 1,1 МЛН