Тёмный

Making my First RAYCASTING Game in C++ - SFML Gamedev - Devlog 1 

Kofybrek
Подписаться 10 тыс.
Просмотров 90 тыс.
50% 1

I wrote my first ray casting game and 3D in general. I used C++ and SFML.
Next part: • I Used RAYCASTING to M...
Discord: / discord
Github: github.com/Kofybrek
Itch io: kofybrek.itch.io
Patreon: / kofybrek
Subreddit: / kofybrek
Twitter: / kofybrek
Code: github.com/Kofybrek/Raycasting
Raycasting tutorial: lodev.org/cgtutor/raycasting....
#code #coding #programming

Опубликовано:

 

2 окт 2021

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 131   
@Test-iv4pm
@Test-iv4pm 2 года назад
Why can I so easily imagine a horror game simply called "Steven"?
@xhenryx14
@xhenryx14 2 года назад
I mean after seeing him from backwards and slowly rotating like that it's expected
@pixelrunner2775
@pixelrunner2775 Год назад
If you can see him, he can see you. And you can always see him.
@magnuswootton6181
@magnuswootton6181 Год назад
because ordinary life is already a nightmare.
@VGCCCCC
@VGCCCCC 9 месяцев назад
He did it
@Kofybrek
@Kofybrek 2 года назад
UPDATE!!!! I UPLOADED THE NEXT PART: ru-vid.com/video/%D0%B2%D0%B8%D0%B4%D0%B5%D0%BE-OpIS1zoz6fU.html This is the longest video I've ever made! So be sure to like it if you enjoyed it. It costs you nothing, but you'll make my day! Also, consider supporting this channel on Patreon for exclusive content as well as early access to future videos and projects: www.patreon.com/Kofybrek
@markoftheland3115
@markoftheland3115 2 года назад
this is great, I love the fast pace of the video, the detail you go into and also the sense of progress - it's like I'm getting the pleasure of programming the thing myself but in a small capsule and all the hours debugging were stripped away
@plrc4593
@plrc4593 2 года назад
I've just made a simple raycasting engine and I can recommand one thing to all novices that are trying to make it as well: I tried the approach from 3:35 but found it surprisingly difficult. There was a lof of problems with the trigonometric functions that produced 0s and infinities, hence with the range of variables and also with checking cooridnates of walls etc... finally I gave up and used another approach from the channel The Coding Train. He used formulas for fiding intersactions between lines and line segments and 1) I found it a lot of easier - no trigonometric fanctions! 2) This gives much broader range of possibilities - the walls doesn't need to be perpendicular to each other any more. The map doesn't need to be divided to equal squares! :D
@nishanth6403
@nishanth6403 2 года назад
By formula, do you mean the Line segment intersection formula (usually used in Finding convex hulls ) ?
@plrc4593
@plrc4593 2 года назад
@@nishanth6403 I mean formulas provided by the channel. After writing the comment I figured out where they come from. Let me explain here. (1-t)*A+t*B is a line segment from A to B for 0=0 and 0
@burzum000-e3r
@burzum000-e3r Год назад
I also developed this solution but it is inferior to the dda algorithm because you check for each line segment for each ray.
@DeathAtYourDoorStep
@DeathAtYourDoorStep 2 года назад
this is awesome, you explained everything in much more detail than i thought you would… and the code snippets just made it even better. dope video man
@CamiloGomezDev
@CamiloGomezDev 2 года назад
This is incredible. Congratulations, it's amazing how entertaining yet informative this video is
@Test-iv4pm
@Test-iv4pm 2 года назад
I appreciate that you store the rays in arrays
@scottpinkston5571
@scottpinkston5571 2 года назад
Please, let's see a part two! And thank you for posting your code! It is so helpful to a beginner like me.
@SpencerYonce
@SpencerYonce Год назад
I loved this video man!! I think I might make a devlog now, you have inspired me
@bob-zb3ed
@bob-zb3ed Год назад
I love these kind of videos, fast and informative.
@jammincoder
@jammincoder 2 года назад
I have never laughed so much watching a programming video 😆 This is the first video of yours I've seen, you earned a new subscriber.
@toksic424
@toksic424 2 года назад
Just stumbled across ur channel. Great work! Very underrated channel. I will 100% share with friends.
@pixelrunner2775
@pixelrunner2775 Год назад
the intro lasts literally just 6 seconds and jumps right into the video with no channel introductions or "but first" 's and I respect that
@acatisfinetoo3018
@acatisfinetoo3018 2 года назад
wow you cram so much information into these videos and yet still make it entertaining and enjoyable...that can't be said for the majority of programming channels.
@NightFoxPt08
@NightFoxPt08 2 года назад
Quality content! Subbed! Good job !
@bioman1hazard607
@bioman1hazard607 2 года назад
Way to go, cant wait to see you add weapons or a HUD, I'd like to see that
@saadahmed688
@saadahmed688 2 года назад
You have earned a sub. Great content. Highly underrated.
@tekkvega
@tekkvega 2 года назад
looks awesome! good work
@ChrisVideosGreek
@ChrisVideosGreek 2 года назад
l like the fact he tries to explain every hardcore detail on how this works. You should never stop this channel!!! Btw an image generator will make this one of the best c++ fps xD
@strawberrypancake3253
@strawberrypancake3253 2 года назад
Dude, you're hilarious! Loved the love for SFML
@amosnimos
@amosnimos Год назад
I am happy to have discovered your channel.
@houcinechammakh4789
@houcinechammakh4789 2 года назад
Brother you are so underrated you deserve more, making a 3D game with no game engine is insane
@RootsterAnon
@RootsterAnon 2 года назад
You are really talented. And I like your avatar, especially eyelids of that guy(us/viewers) that jells at you for using vectors... xD
@Anonymousewizard
@Anonymousewizard 10 месяцев назад
honestly get so many laughs out of your videos, very funny guy!
@plrc4593
@plrc4593 2 года назад
Great video! It looks amazing. I've just made my own raycasting engine, maybe thanks to you I'll learn how to texture the walls and how to refine the math.
@Ezdiess
@Ezdiess 2 года назад
Great video. Subbed
@loszhor
@loszhor Год назад
Thank you for the information.
@logicprojectsspeed2023
@logicprojectsspeed2023 2 года назад
Great content as always
@domon41c
@domon41c Год назад
Very good work:)
@Flippo731
@Flippo731 2 года назад
Great work! I'd love to see this continued!
@haizk
@haizk 2 года назад
YES PLEASE! WITH SLOWER EXPLAINATION
@puppergump4117
@puppergump4117 2 года назад
@@haizk I think his point was to showcase what he did, not teach it. He obviously doesn't want a 40 minute video explaining every little thing when his code is linked in the description and there's plenty of material online to learn this stuff.
@haizk
@haizk 2 года назад
@@puppergump4117 Maybe🤣😭 Yea, but I'm too dumb to understand his code by myself. I'm trying
@puppergump4117
@puppergump4117 2 года назад
@@haizk You're not going to understand it all in one go. True understanding comes from working with each concept many times. What he's showing is just one way of using the concepts. Just take it slow.
@haizk
@haizk 2 года назад
@@puppergump4117 Thanks for your advice!
@arivanhouten6343
@arivanhouten6343 2 года назад
Great video!
@thatmcguy1799
@thatmcguy1799 2 года назад
Its very good! Working! Thanks.
@shaweewishissime6718
@shaweewishissime6718 2 года назад
very well explained in a funny way. Merci beaucoup mon ami. ;)
@mrlucky974
@mrlucky974 2 года назад
That's awesome!
@ra1n_
@ra1n_ 2 года назад
Awesome !
@KingOfMadnesss
@KingOfMadnesss 7 месяцев назад
This shows how hard even the simplest things is to code in C++ and SFML
@emperor8716
@emperor8716 2 месяца назад
I love this.
@burzum000-e3r
@burzum000-e3r Год назад
Awesome work lol
@otistically
@otistically 2 года назад
Guy, your Gaelic accent just got me.
@CloudlessStudio
@CloudlessStudio 2 года назад
This is very very impressive, this is like John Carmack levels of programming
@elhadede6
@elhadede6 2 года назад
Thank you very much man
@prodbytukoo
@prodbytukoo 2 года назад
Yoo this is so good
@antomegaytb
@antomegaytb 11 месяцев назад
You sir, are a genius
@stevenmitchell7697
@stevenmitchell7697 2 года назад
Most excellent work, trying to teach my pre-teen kids game programming and they love your videos. Before you get too carried away in 3D math recreating Quake after Wolfenstein, don't forget 2D Platform games like Donkey Kong / Super Mario Brothers. Like how do you run and jump with realistic momentum and gravity? How do you swap sprites to make the character look like it's walking/running/jumping/smashing? How do you scroll the screen sideways to move thru a level?
@lapto4676
@lapto4676 2 года назад
in reference to your first two question, I feel I may be able to help. 1. You could make a run function where when active dX AKA direction X's speed is larger. You could make the function be used when a key e.g. shift is A. toggled B. held. For jumping, you could make a variable called gravity and find a good value for it so when you jump it counteracts your jump's speed. For realism you may want to use a method of having a max speed that you can go, yet when that speed is reached, the max speed increases, until you get to a max-max. 2. For the sprites you may want to get a few frames of your sprite in different positions for each animation and loop through the images when the action is happening. I hope I helped.
@felusion6290
@felusion6290 2 года назад
if u keep on doing you can grow your channel to the skies of millions subs
@birbylikesfox1032
@birbylikesfox1032 2 года назад
we need kofybrek subreddit
@birbylikesfox1032
@birbylikesfox1032 2 года назад
@Jerard Marcaname?
@Kofybrek
@Kofybrek 2 года назад
I can't believe you did it! Thank you!
@WinterNox
@WinterNox 2 года назад
@Jerard Marca I joined :)
@deepvertic
@deepvertic 2 года назад
Actually Doom did not use Raycasting but rasterization using BSP (binary space paritioning) :D
@Test-iv4pm
@Test-iv4pm 2 года назад
1:38 is a great mistake. It's like if your character has lost complete control. It reminds me of yandere sim, and of the madness combat series.
@mindaugassvajoklis3072
@mindaugassvajoklis3072 Год назад
I realy want to see part 2
@fdevstudio5692
@fdevstudio5692 2 года назад
Cool bro, I learned programming since 2020, I learned some programming languages such as scratch, python, java, javascript, lua, c and c++. Python is my favorite programming language, I make a game in python using a library called pygame. I learned c++, so I going to learn sfml, so I am a sfml beginner, I hope I can master c++ and sfml too.
@124k3_
@124k3_ 7 месяцев назад
hmmmmmmmmmmmmmm.....(thousand yard long stare )..... i learnt a lot
@le9038
@le9038 2 года назад
this was really interesting! I am looking to do something like this inspired by doom (1993) and arsenal...
@2dapoint424
@2dapoint424 2 года назад
i love steven!! Please make this into a game.... for steven!!
@ClooverDev
@ClooverDev 2 года назад
the dude just explained Doom's code and made the Doom: Friendly Edition
@akshatrai1800
@akshatrai1800 2 года назад
Mind blowing video. Great work It’s very impressive. Please suggest some books or courses to gain this kind of knowledge in programming.
@Kofybrek
@Kofybrek 2 года назад
I read the book "Beginning C++ Through Game Programming" by Michael Dawson to learn the basics. Then I watched a bunch of RU-vid videos on topics I was interested in.
@akshatrai1800
@akshatrai1800 2 года назад
@@Kofybrek okay. Thanks for the suggestion.
@edithfigueroabarros5571
@edithfigueroabarros5571 Год назад
Me just copying the raycasting code to make my ray tracer program: 👀👀👀
@treyhenry4796
@treyhenry4796 2 года назад
OMG this is soop satisfying
@BasedGamer12
@BasedGamer12 8 месяцев назад
Just a correction, no DOOM doesn’t use raycasting it uses BSP.
@negai_
@negai_ 2 года назад
9:25 This is my favorite part in the video xD
@hassanbo8200
@hassanbo8200 2 года назад
Will you make a tutorial for these games? Btw your videos are awesome.. Keep it up
@Kofybrek
@Kofybrek 2 года назад
Glad you liked it! I'll think about making tutorials.
@nikkiofthevalley
@nikkiofthevalley 2 года назад
This is basically a tutorial already, he tells you what to do..
@msmalik681
@msmalik681 2 года назад
I want to see part 2
@sebastianwardana1527
@sebastianwardana1527 Год назад
dude, that was amazing... i mean... that simple? just boom... books math... old school 3d... everybody else just cant build a 2d game and make it 3d? you make it look so simple! i cant do it... but thats just magic you know... time is magic too, if you really think about it.
@effdotsh
@effdotsh 2 года назад
You should probably start packing. Steven is coming...
@user-dn3pn1uw7h
@user-dn3pn1uw7h 9 месяцев назад
Bro I got a question, whats happen with the second part of the tutorial
@psychotank6577
@psychotank6577 2 года назад
9:26 *His body was never found...*
@SabeDoesThingsChannel
@SabeDoesThingsChannel Год назад
you should make a part 2 and add weapons or something
@dtalaverin889
@dtalaverin889 2 года назад
Please second part 🙏
@plrc4593
@plrc4593 2 года назад
You're using SFML? It does use OpenGL, doesn't it? I'm asking because I added texturing in my raycaster in SDL and it's unplayabe becuse it's that slow. I'm wondering what you (you and authors of other tutorials) are doing that texturing works so fast for you. :D
@Kofybrek
@Kofybrek 2 года назад
I don't use SDL so I can't answer your question. Sorry!
@woff5
@woff5 2 месяца назад
my head kaput
@chuotpado7592
@chuotpado7592 2 года назад
L like it so much
@amop2250
@amop2250 2 года назад
what website do you use for the sfml shape types?
@Kofybrek
@Kofybrek 2 года назад
I use the official SFML website: www.sfml-dev.org/tutorials/2.5/graphics-vertex-array.php
@amop2250
@amop2250 2 года назад
@@Kofybrek Thank you so much! this will help a lot in my little 3d project
@cjgamesstudios3289
@cjgamesstudios3289 2 года назад
Do you want to actually not re-casted it looks like it was requested but recasting cannot have walls that are not equal in height and the way they pulled off the 3-D with doom is impressive
@khafidzridho-
@khafidzridho- 2 года назад
easy way ekonomi yang LOL yang dimaksud window? Xperia Z1 Compact
@ModdinMC
@ModdinMC 11 месяцев назад
lmao steveennn
@DE012471
@DE012471 2 года назад
Where part two?
@thelanguagegeek6207
@thelanguagegeek6207 Год назад
why did you quit your first channel
@RemotelyHuman666
@RemotelyHuman666 Год назад
Part two?
@rayyanhaider8593
@rayyanhaider8593 Год назад
I'm a beginner can recommend me a good raycasting course where everything is explained beginner friendly
@meerjel0120
@meerjel0120 Год назад
I will find this as a passage for my own raycaster. Great work! Hope to make multiple wall textures and multi-elevated sectors possible. EDIT: There is a tutorial about how to make sectors and such possible but I guess I can't send a link to it here since I did it once and it disappeared.
@nitrogenez
@nitrogenez 2 года назад
7:16 HM. blue. yellow. HMMMMMMM.
@WinterNox
@WinterNox 2 года назад
9:18 I like Steven so calm :)
@tedeusz83
@tedeusz83 Год назад
You mess up here.. you were using Lodev approach from its tutorial as you showed. There is No need to make fisheye correction and rest that voodoo with filling gaps. You took very optimized algorithm and made it.. unoptimized ;-) anyway "correction" means that something is not well done and need fixing, you can make it correct "out of box" as in Lodev tutorial..
@HalfAsleepSam
@HalfAsleepSam 2 года назад
This video is giving me a panic attack, the jarring intro, the music, the way he talks so fast.
@honlt4678
@honlt4678 Год назад
Reminds me of scratch
@Junkman
@Junkman Год назад
You should do make things hard on yourself
@Jkauppa
@Jkauppa 2 года назад
3d dda true 3d caster engine, check cherno ray tracing/casting
@Jkauppa
@Jkauppa 2 года назад
z-buffer maan
@Jkauppa
@Jkauppa 2 года назад
not much more complex than blitting sprites, more pixels, per sprite
@Jkauppa
@Jkauppa 2 года назад
entity ray casting, so you have 3d model, of even a 2d character, flat 3d model, in the ray casting grid
@zappafurious
@zappafurious Год назад
3:31 Doom didn’t use raycasting
@ninebysixteen222
@ninebysixteen222 2 года назад
Can you make chess ? 😁
@Kofybrek
@Kofybrek 2 года назад
Maybe...
@Test-iv4pm
@Test-iv4pm 2 года назад
2:28 no comment
@birbylikesfox1032
@birbylikesfox1032 2 года назад
thats ironic
@jasm0_0
@jasm0_0 2 года назад
part 2
@katyk9483
@katyk9483 20 дней назад
Nope, Doom does NOT use raycasting to draw it's scene.
@ncot_tech
@ncot_tech 2 года назад
Soring the rays in an array, and then using a vertex array to draw the rays, from the arrays 😆
@WinterNox
@WinterNox 2 года назад
Hey I made a raycaster too but I'm not a programmer so yeah it's terrible
@v0xl
@v0xl Год назад
the way you handle your mouse input is trash, you can't get subpixel precision and mouse tends to be moved to the wrong pixel on weird revolutions causin inputs to get stuck. You should handle mouse input directly from the Device struct, and just confine/lock cursor to the window and hide it
@Spymixiu
@Spymixiu Год назад
Day 1 of asking of sonic
@WingedGlider
@WingedGlider 8 месяцев назад
Woo, I understand none of that. Cool stuff tho
@easylemon6640
@easylemon6640 Год назад
Doom was NOT made with raycasting.
@shrippie-4214
@shrippie-4214 2 года назад
Open gl better xD
@Kofybrek
@Kofybrek 2 года назад
I know. But I don't know. So, y'know.
@Whatabcdef
@Whatabcdef 2 года назад
I can only code this Falseff2 .,(2 true) Rick.(rolls) with - fish
@Whatabcdef
@Whatabcdef 2 года назад
Omg i relized i can code in fortnite!!
Далее
Это реально работает?!
00:33
Просмотров 4 млн
Армия США вошла в Зангезур
04:17
Просмотров 279 тыс.
Вы чего бл….🤣🤣🙏🏽🙏🏽🙏🏽
00:18
Мой инстаграм: v1.ann
00:13
Просмотров 113 тыс.
The Challenge of Making a Keyboard for Every Language
18:27
Doom engine - Limited but still 3D
6:57
Просмотров 538 тыс.
C++ Developer Learns Python
9:26
Просмотров 2,7 млн
Super Fast Ray Casting in Tiled Worlds using DDA
30:03
Просмотров 178 тыс.
I tried coding my own graphics engine
4:23
Просмотров 195 тыс.
Why Doom is Awesome: Binary Space Partitioning
26:25
How do non-euclidean games work? | Bitwise
14:19
Просмотров 2,4 млн
Это реально работает?!
00:33
Просмотров 4 млн