- Видео 5
- Просмотров 93 723
Pythonista_
Бразилия
Добавлен 11 окт 2020
Another channel to contribute with programming tutorials
Let’s build a Raycaster from scratch using Python
After 3 years since the last video I finally had the courage to make and upload another one. This time, about a subject that I was willing to teach for a long time: Raycasting
If you think this video helped you, you may consider supporting my work by clicking this link:www.buymeacoffee.com/magoninho
SOURCE CODE:
github.com/Magoninho/raycasting-python
Chapters:
0:00 - Intro
0:57 - Introduction
1:43 - How it works
4:02 - Initial setup
9:43 - The Map
21:18 - The Player
39:14 - The Ray class
44:01 - The Raycaster class
58:25 - An introduction to the algorithm
1:01:25 - The Raycasting Algorithm
1:16:10 - Coding Horizontal Intersections
1:27:26 - Coding Vertical Intersections
1:38:07 - Drawing walls
1:45:46 - Fi...
If you think this video helped you, you may consider supporting my work by clicking this link:www.buymeacoffee.com/magoninho
SOURCE CODE:
github.com/Magoninho/raycasting-python
Chapters:
0:00 - Intro
0:57 - Introduction
1:43 - How it works
4:02 - Initial setup
9:43 - The Map
21:18 - The Player
39:14 - The Ray class
44:01 - The Raycaster class
58:25 - An introduction to the algorithm
1:01:25 - The Raycasting Algorithm
1:16:10 - Coding Horizontal Intersections
1:27:26 - Coding Vertical Intersections
1:38:07 - Drawing walls
1:45:46 - Fi...
Просмотров: 2 152
Видео
How to make a 3D projection in Python | Rendering a cube in 2D! (No OpenGL)
Просмотров 89 тыс.3 года назад
This is a tutorial that shows how to make a 3D projection using python and pygame. This is a way of projecting 3D dimensions to 2D. In this video we will project a cube :O If I said something wrong, forgive me, because english is not my native language :P #python #computergraphics #pygame #3D #gamedev Source code: github.com/Magoninho/3D-projection-tutorial Songs used: We Are The Champions Quee...
Python Timelapse - Minesweeper
Просмотров 9463 года назад
This is me trying to make a minesweeper in only 2 days. Source code: github.com/Magoninho/minesweeper Music: TheFatRat - Time Lapse
Python timelapse - Purple rain
Просмотров 9673 года назад
Desculpem pelo tema branco, o desafio era usar ele até o final do mês. Vídeo do the coding train: ruclips.net/video/KkyIDI6rQJI/видео.html Música usada: Vexento - Digital Kiss (amo esse cara) Source code: github.com/Magoninho/purple-rain-python
Thanks man, you explanation is very good.
Nice music from Death Note
no. Doom was NOT a ray-caster! It used binary-space-partitioning.
Didn't know that :O
3D Sage has some great videos on developing both a ray cast engine and binary space partition engine. His videos are between beginner and intermediate coding. But the videos expects you may know nothing and simply want to learn.
@@whtiequillBj 3D Sage videos were actually the reason why I made my own tutorial. I didn't like the way he explained the code and, for a beginner, I thought it would be tough to understand.
@@pythonista_333 he is over focused on trying to be funny. Your video is much better.
very informative and easy to digest thank you
In OpenGL you will do the same concept but OpenGL is harder than PyGame
Nice video
Great video bro, i wish i were as good at python as u, i started learning python a week ago and this is way toooooooo impresive, new follow ❤
Nice to hear that, man! Keep learning and you will achieve even more impressive stuff :D
🔥
1:04:14 This formula can be confusing if you're truly unfamiliar with how computer graphics work. In computer graphics, y increases downwards, so the opposite side is py - ay, not ay - py. If that's the case, why does the formula still work? Why isn't py - ay correct? It's because our y is flipped. Imagine you're looking up-right: tan(a) is negative (angles increase clockwise in graphics), and py - ay is positive. Positive over negative is negative, so instead of going right, we go left. The simple solution? Just multiply by -1, and suddenly ay - py works. Or, you could calculate tan(360° - a) to get the nice counterclockwise increment that's so popular in math books.
You're absolutely right, I actually made a mistake there. The proper way of showing that was if I flipped the image vertically. The ray would be facing bottom right, and Ay - Py would be right. imgur.com/a/48vshnV
amazing! its so easy! thx!
Thx
Why mixing with pygame ! Just use numpy , your array multiplication (projection) and matplotlib to draw the figure. Keep it simple and stupid !
You're right! But pygame would give more views lol
is there a way to fill every face of the cube?
i am comverting the code to work with geometry dash triggers XD
Awesome tutorial!
bro entered the matrix 💀
Why are you using python for this?
Ugh not again I made Minecraft i was trying to make a cube
That intro makes me scared already I knew this was a bad idea.
when will there be new videos?(
Good job bro, How to a make a frustum projection?
Great to code along simple to follow as well as learned a few things... and i got a spinning cube on my computer 😎
thee shape problem you were having on which you spent a lot of time researching it could be fixed by just adding the [0,0,0] at the end of the projection matrix. That's how I fixed it. And by the way the projection matrix is useless
Unexpected death note. Very unexpected.
any idea how i can connect points to a 4d square using the p in range
I too can copy paste in under 10 seconds
De aquí va a salir mi tesis gracias ❤
hi sir it is really good tutorial, can you tell me that how can we use arroy of other OBJ and then render that. Please reply me soon.
to solve the issue with matrix multiplication you have to match up the shapes in terms of mn * nm. Easiest to do this here is to transpose the point vertex with .T
it's cute
the into says it all
Man that's what I needed, an actual tutorial on drawing points and lines using a not so bloated library in a good language (fck java) in structured programming (fck classes), not to simple or starting from the ground and not too complex or starting with OpenGL (vulkan gives me nightmares)...
Please upload more, you cool.
I'm back now, I think I will upload a very long video in the near future
Hi! Your video is really helpfull, ty!!!
this is art, congratulations!
Wah! Your videos are too good for 385 subscribers. Thanks lot for the video tho.
Thanks a lot, this was perfect for me as i could understand it and change it to my own needs. I used it to create a Hexagon viewed from an x-axis angle. Now I want to try making a game-grid for pygame from this.
Although, I guess I will run into a problem. I am not sure what the right words are, but i guess i need orthographic perspective to get rid of the depth skewing? If anyone can help me with this, leave a comment pls :) Meanwhile I will try to figure it out myself.
@@vinnn8694 im a bit late but orthographic projection is a completely different thing and the whole purpose of using perspective projection is to see depth and majority of games use it. orthographic projection is mainly used for things like engineering where they dont want this depth.
can u make a texture tutorial?
I can't stand stammering and stuttering speech, it drives me crazy.
vulkan please
now do it in vulkan :p
in less than a year
Hi I make games with pygame. I want to meet more people who fiddles with pygame and game developement. Is there any group or hub you can suggest me please?
Thanks!!!!
"how to make a 3d projection": shows orthographic projection
I just cant find the right words to explain how i am appreciate this. Man i spent weeks to understand 3d projection and because my math background is weak i just disappointed and stopped to try. But God finally sent you to me :) Thanks man, this is awesome explanation for aliens to 3d(like me). Also thanks again for funny presentation.
Good job, now enter Z depth. Filling of polygons by scaline, and shading. There we will congratulate you, newbie
Nice vid but WHY ON HELL DID U TEACH US ON LIGHT MODE DO U WANT TO BLIND US!?!?
I love how you got L's theme playing in the background lol, great tutorial
man started this video like the monogatari series
how do u get that cursor?