Programming Pseudo 3D Planes aka MODE7 (C++)

preview_player
Показать описание
In this video I look at some very simple code that emulates a 3D environment, popularised by the Super Nintendo, known as MODE7. This approach looks at how we can project a frustum into a texture to give a compelling pseudo 3d experience.

Twitter: @javidx9
Twitch: javidx9
Рекомендации по теме
Комментарии
Автор

awesome as always ! you are really very talented for explaining your knowledge in a very clear, objective, interesting and very easy way to understand :)

LeoOno
Автор

You, sir, are a king in explaining programming techniques.

RhoTrepaan
Автор

Dear javidx9, your channel is gold mine. Best regards. :)

CykPykMyk
Автор

i have been watching computer science and programming related videos on youtube since there was youtube; your channel is the first i've seen to imply a genuine understanding of the concepts as well as the mathematical underpinnings of the concepts you demonstrate.

AcceleratingUniverse
Автор

I used this to help with building a Mode 7 renderer in GameMaker around a year ago, it was very helpful!
But I want to mention that there are some inaccuracies towards the end of the video that I didn't notice until I tried stretching the system further. Once you switched to division at 19:15, there is no longer a far plane - the "far plane" variables actually represent the near plane now (that's what produces the impression of vertical camera movement), and the "near plane" warps the scaling between the frustum and the viewport, which produces the curvature. Not realizing this ended up leading to some headaches for me so I wanted to point it out in case it is helpful to someone else!

illdie
Автор

That curvature was a problem I was having in one of my projects. I fixed it, but it had to do with the near plane/far plane issue like it does here. This topic is really interesting!

fuzzycat
Автор

I just discovered your channel and i am so glad i did! Thank you so much for uploading all these videos!

hypernarutouzumaki
Автор

A few things to add for more 2.5D realism:

- Add a background that doesn't perspective warp and doesn't scale to make it infinitely distant.
- Add a fuzzy line of sky color over the horizon line that can simulate atmospheric effects
- You can also add an effect on characters/vehicles etc. that their contrast go down as their distance from the camera go up. Add to that a tint of sky color and they can fade into the horizon in a nice way.
- You can also have layers of transparent clouds at the top. Maybe have different scaling to imply different distances with subtle paralaxing.

Just a few things that popped into my head as I was watching. :)

jmalmsten
Автор

This was really fascinating to watch. You do a great job explaining it so I can understand. Great video!

DSage
Автор

You're a saint! I've been looking for soemthing exactly like this for a while!

joshelguapo
Автор

I started work on something similar but combined with your "Perlin" noise generator to make a 3d landscape.
Unfortunately I got side tracked to a more serious project so never got it finished.

JimGiant
Автор

Great stuff. I was recently contemplating coding an old style 3D engine, only for normal graphics in C. Doing all the 3D stuff myself, completely software just for fun. Perhaps using plain Windows code. You could easily expand on this further using concepts you already introduced, drawing sprites at certain locations (trees, poles would work well with racing games). Lots of potential here, could redo your RPG so it is in 3D instead.

NeilRoy
Автор

There was a group that did this with the gameboy color pokemon game and it turned out really well... I wondered how it was done(granted it's a full game so alot of work) but this pretty much explained it all.... thanks

joshua
Автор

Why do your videos come out at the perfect times? 👌👍🙂

mattt
Автор

Super cool stuff. I was just watching darbs speed run of F-Zero on the SNES and he was mentioning MODE7.
Thank you very much.
greetings

TheKhanQ
Автор

I have literally been looking for a proper explanation of the perspective problem as far as I can remember, more or less. I think don't quite understand it, but I'm sure another look, or two will do the trick.

theignorantphilosopher
Автор

I keep seeing the sky as a ceiling that is the same distance from my head as the ground is.
I guess that's why mario kart didn't use that kind of sky technique but a 2D background.
The curvature really reminds me of Terranigma, when you are underground.

itsGeorgeAgain
Автор

Who on earth disliked this video? It must have been by mistake lol. But thank you for another great video. Very informative and interesting, I do remember the Mode 7 days of the SNES, I was so impressed when when I saw graphics being scaled and rotated them were the days 😌

chriswinslow
Автор

Fun video to watch. Been a long since I've thought in terms of Mode7.

Not to hinder the efforts of your member who is doing image-to-sprite transforms, there's a neat visual studio addin by incre of the main guys on the c# team.

He created a sprite addin that will take an image you've loaded into VS, (or more if selected), right-click, and create sprites.

It also works with the built-in image editor (or possibly enhances it... Been a while since I've needed to do graphical work in a project until recently). But it seems to work in a language-agnostic manner, as it should.

natevb
Автор

"I then need three more pieces of information. What is the nearest location to the camera, which is the furthest location from the camera, and what is your favourite colour!"

tzisorey