Programming and Technology Tutorials from a different perspective. Everybody has the ability to write good, useful and fun code. No hate, no patronising, just tech and code.
You said in Part 2 a few years ago you would show in Part 3 how to use smart pointers in embedded lua. Does this video or any of your other videos show any examples?
@REDFOGSX23 сағат бұрын
I recently started to play my old Road Rash game and as someone using Unreal Engine, I can't stop thinking how they could deliver that feeling of 3D collisions when hitting the car, or when vehicles hit the AI at an intersection without being 3D. It would be amazing to have an additional video to this video even if it is 6 years old. 😁
@father_jordanКүн бұрын
THANK YOU for this. I've been getting into development for the Playdate handheld using their C API, and this just helped me write a basic 3D renderer. I'll continue on in the series but wanted to say thanks, this is still *very* relevant!
@PumpiPieКүн бұрын
Very good video, Good exsplanation ;D Keep up the good work :D
@brotherx6205Күн бұрын
great tutorial, although Im struggling to get this set up on my Mac
@saishykitty2 күн бұрын
One thing I didn't understand is how are u preventing every collision from affecting each ball twice? On your overlap detection you iterate the balls for each ball, so BallA will eventually check against BallC, but when it reaches BallC, it will also check against BallA, and you are applying the displacement against both balls on each check, so wouldn't they move twice? When I tried writing in another language they are being displaced twice.
@gabrielvinicius9752 күн бұрын
do you have any recommended content for learning the math behind this video? i've watched a couple of times and tried to take notes but i feel like there is still a lot of things i don't understand
@phantom73333 күн бұрын
Hey, I'm in uni and I was waiting for the lectures to end to start your series and watch all your videos, but I got greatly discouraged by the first practical minute of the video. I got the following exception which doesn't let me run the program at all: Unhandled exception thrown: write access violation. std::_Atomic_address_as<long,std::_Atomic_padded<unsigned int> >(...) returned 0x301CF3BC.
@malu4579Күн бұрын
Just change x64 to x86 in visual studio
@tuti-fruti99833 күн бұрын
what the fuck did i just watched i quit
@PaulodeMelo4 күн бұрын
I'm having an issue that's literally destroying my brain and my will to live... Sending and receiving int is fine. Trouble is with std::string. 32 bytes are allocated for "paulo" which is understandable. But when it gets to the receiving clients, the message becomes size 10 :( then inside net_message.h size_t i = msg.body.size() - sizeof(DataType); makes "i" become some random junk -12784367856 because size() is 10 but sizeof(DataType) is 32 =[ =[ =[
@user-pj1yf2kd2q3 күн бұрын
It's me again. After a couple more hours I found that: the string does get passed on, it's just that the body becomes resized [automatically?]. I can pass a struct (as in part 4 of this series) and a similar thing happens, seems the body gets truncated. In the server code that bounces my Message to all clients, I changed the code, instead of creating a new msg object, it will simply pass along the original msg object sent from the client. It works now! The body is not truncated BUT the data cannot be pulled out from the body in the receiving clients. The string sort of, "moves" to the middle of the vector?? I swear, if I can't get this thing to work today I'm gonna sell everything I own and move to a farm. Plant them bloody veggies. :(
@javidx93 күн бұрын
A string is not a fixed size data type. You would need to send two things, the size of the string, then the data.
@user-pj1yf2kd2q3 күн бұрын
@@javidx9 Thank you thank you! I'm glad to see you still replying to comments years later. That's pure dedication. You have my admiration, kind sir :D
@dheerparekh13054 күн бұрын
0:03 bro is staring into my soul
@raoufayadi15835 күн бұрын
This algorithm was a game changer for me as I used it in my internship project to build a voxel-based simulation environment for drones to train using deep learning algorithms. The algorithm brought significant improvements when it comes to raycasting in 3D. However, I would like to further optimize it. Since I'm dealing with a large dataset (simulation inside a warehouse) and a high number of repetition (Deep Learning), there is a lot of empty space that needs to be tested, but in vain. What do you guys recommend to tackle that issue? Aim for a better data structure or maybe use another raycasting algorithm? Has anyone heard of BVH? Thanks in advance!
@vizionthing5 күн бұрын
I compiled wxWidgets on linux today, using a 10 year old processor i7-4790K, took 2 to 3 minutes, although this video is 4 years old now,I'm guessing you have a beefier system, did you do it on a single thread?
@hodayfa000h6 күн бұрын
I know very little math but this is so simple! Like wow, i just took a few notes, and followed through!
@dheerparekh13056 күн бұрын
why is addition of 1 necessary before scaling ??
@javidx94 күн бұрын
The transformations result in vertices being scaled between -1 and +1. The screen is 0 to N, so we add 1 to get 0 to 2, then scale by half the screen.
@dheerparekh13054 күн бұрын
@@javidx9 Thanks !! Will look into it
@theashbot40976 күн бұрын
I started on this project. I got to rotation before stopping. I was in a long car ride and I open up this project and realized I did not have rotation. I do not know much about sin, and cosin so I just winged it and after 2 hours I have rotation with player movement working together. I had a long 75 lines of code just working out a xModifier, and yModifier to multiply my X and Y movement by. These combined always = 1. WHen I got internet back I looked to see what he did in the video, and I was so sad when I saw it was a sin, and cosin. : ( But I am so Happy about figuring out how to do it by myself!
@celestialclockwork7 күн бұрын
This is amazing. Omg….
@captainufo45877 күн бұрын
I know I'm very late to the party, sorry. What would a monometric grid entail? (that is, a grid in which a square tile remains a regular square, with all 90° angles, rotated 30°/60°, aka this: s2.qwant.com/thumbr/0x380/c/1/9d19e07c956f1f6ef1c8f0b05480cdb3457486c1b1afef862ae736cdb6a3c8/Gli-assi-assonometrici-dellassonometria-monometrica.jpg?u=https%3A%2F%2Faliceappunti.altervista.org%2Fblog%2Fwp-content%2Fuploads%2F2022%2F11%2FGli-assi-assonometrici-dellassonometria-monometrica.jpg&q=0&b=1&p=0&a=0). I can imagine the math is much more complicated. I'm trying to find resources on it, but Google is failing me.
@LoporianIndustries7 күн бұрын
Error 42: Life, the Universe, and Everything, as negated by Vogonity.
@kodosunofficial8 күн бұрын
Your videos made me want to code in C++, again :D
@MoolsDogTwoOfficial8 күн бұрын
I’ll be honest, once you learn how they work, they come in very naturally.
@bluecrocks8 күн бұрын
♥♥♥
@Hector-bj3ls9 күн бұрын
I'm also from the UK and ive never referred to subtraction as take. I'd normally pronounce it minus. Also, on BODMAS. I learned that, but my younger sister was taught PEMDAS. At first I was confused because M and D had swapped place. Turns out they have the same precedence so it doesn't matter.
@erroneum9 күн бұрын
Did you know that in C++, the main() function has an implicit `return 0;` at the end? Per the standard, you don't need to explicitly return anything unless it's an error code.
@Max-ry5dv9 күн бұрын
What is your computer spec ? Mines only about 50 fps.
@javidx99 күн бұрын
Firstly try a release build it will be a big difference, but secondly the command prompt has become slower and slower. This is why I created the successor to the ConsoleGameEngine called PixelGameEngine.
@poritoshroy1379 күн бұрын
thank you so much.
@BrekMartin9 күн бұрын
Hmm... Lynx doesn't have a float variable type, but it does have a 102 pixel high screen (a small number) and some fairly large integers if the calculations are few. Someone did have a go at Flappy Bird for it, and it's kind of there. I must take note... I like the game in small doses when it's right. Like all games :D
@Ccaraaa9 күн бұрын
MAN! Is translating this to java hard! No clue how to adapt the overwritten methods, especially the "DrawTriangle" method
@Ccaraaa9 күн бұрын
So if you know any similar engines, that would be MUCH appreciated.
@Flup210 күн бұрын
You forgot the flashy single-word subtitles, otherwise how are you gonna keep the attention of the viewer?
@GDevelopisquitenice-py9fj11 күн бұрын
Awesome Series! I'm getting along with this so far, except when I make a dumb mistake, and at the camera movement section I realize that somehow my Y - axis is inverted : adding Y makes it go down and vice versa 😂 I'm rewriting it in python, and also changing the code with python's helpful classes and class functions. Also getting some errors that I can't quite understand but work around them...
@dwivedys11 күн бұрын
This is simply next-level amazing and it’s from 5 years ago! Wonder where you are David!?
@6Pope911 күн бұрын
the way you're typing x triggers me so much
@hentacletentai216013 күн бұрын
I watched this video for some school work and they want me to source where i learn it from. Should i put your name as javidx9 or OneLoneCoder?
@denkergames929314 күн бұрын
You are the most awesome person in the history of humanity
@POGRetroModernGaming14 күн бұрын
I ❤ your contents 😊
@javidx914 күн бұрын
Aww thanks POG! 😄
@megauti14 күн бұрын
Thank you.
@liorean15 күн бұрын
The real problem is the division sign if used as an infix operator instead of as a horizontal line with one expression above and one below. In school I learned that a slash was to be considered a horizontal line slanted and everything on the left to be considered above the line, everything on the right to be considered below the line, while the ÷ sign is to be considered like a multiplication, so they would be handled differently.
@AnimatorsPal15 күн бұрын
48:18 Why not inherit ?
@thewelder353815 күн бұрын
But the reality is, ASIO under the hood is still using sockets. They're just wrapped in loads of boiler plate.
@javidx915 күн бұрын
True, though the same could be said of any library of utility, it's just OS calls wrapped in stuff. That stuff however can be fruitful. In the case of asio, overlapped and threaded io is hidden away to the point of being OS agnostic, and trivial to use in a modern c++ environment, which is great for productivity and deployment.
@thewelder353815 күн бұрын
@@javidx9 I'm not disagreeing, I just find that quite a lot of my applications will target a single platform and using sockets with the Win32 API is actually quite feature rich. It's when you target multi platform that boost ASIO really comes to the rescue in terms of preventing you having to maintain multiple codebases.
@dixztube15 күн бұрын
Pedmas > bodmas, math < maths
@jakubfrei375716 күн бұрын
Hi there mate, i really enjoyed your video about math for game devs. I wanted to ask if you considerd to do some series for it, i would really appreciate that, you have gift for teaching
@javidx915 күн бұрын
Thanks! I've no plans specifically as it's just regular maths! Instead I try to approach it from the gamedev angle by exploring those topics and the maths required to do those things at that time.
@Exodia198816 күн бұрын
31:00
@stickfigure3116 күн бұрын
@24:36 I'm sure in most cases using the standard libraries is the preferred way, but tracing this back down to the square root function cutting performance in 1/2 did gave me an appreciation for why Id software made their own faster (but less accurate) square root algorithm for the Quake engine.
@plutus927416 күн бұрын
am i able to use olc Pixel game engine instead of olc console game engine cause the console game engine one isnt working for me on windows 11
@javidx916 күн бұрын
Yes it's very very similar.
@kahwigulum16 күн бұрын
oh no not boost! just kidding, i have no idea what boost is, have never coded anything, or know why im even watching this video
@angelstojanov234616 күн бұрын
Thank you so much for this video, I've been really looking into how to create a programming language and this has helped me tremendously. Please do a whole series on how to lex, parse, compile/solve/interpret a language, really looking forward to this
@burntt99917 күн бұрын
12:54 its funny how many times ive had to hit the left arrow to back up 10 secs because as soon as you get the the end of the line you fly back to the front of the code... and only NOW is when i remember i can slow down the video :)
@moose-337917 күн бұрын
It's also worth noting that, thanks to C++ exceptions and other factors, it's possible that memory leaks can occur in your program in ways that the programmer simply can't guard against. This is why using smart pointers, or some other RAII encapsulation, is always the recommended course of action.
@sg464417 күн бұрын
In India, we use BODMAS. I was confused when I first heard of PEMDAS when reading an American textbook!
@luvasluvasluvas17 күн бұрын
Does anyone know if parsing expressions like "- (5-15)" returns a valid RPN? Or more complex ones like "5 * - (5-15)"?
@javidx917 күн бұрын
It's valid if the RPN format you use supports unary operator
@luvasluvasluvas17 күн бұрын
@@javidx9 Do you have the RPN for the second expression? Also, thanks for answering my question ;)
Пікірлер
You said in Part 2 a few years ago you would show in Part 3 how to use smart pointers in embedded lua. Does this video or any of your other videos show any examples?
I recently started to play my old Road Rash game and as someone using Unreal Engine, I can't stop thinking how they could deliver that feeling of 3D collisions when hitting the car, or when vehicles hit the AI at an intersection without being 3D. It would be amazing to have an additional video to this video even if it is 6 years old. 😁
THANK YOU for this. I've been getting into development for the Playdate handheld using their C API, and this just helped me write a basic 3D renderer. I'll continue on in the series but wanted to say thanks, this is still *very* relevant!
Very good video, Good exsplanation ;D Keep up the good work :D
great tutorial, although Im struggling to get this set up on my Mac
One thing I didn't understand is how are u preventing every collision from affecting each ball twice? On your overlap detection you iterate the balls for each ball, so BallA will eventually check against BallC, but when it reaches BallC, it will also check against BallA, and you are applying the displacement against both balls on each check, so wouldn't they move twice? When I tried writing in another language they are being displaced twice.
do you have any recommended content for learning the math behind this video? i've watched a couple of times and tried to take notes but i feel like there is still a lot of things i don't understand
Hey, I'm in uni and I was waiting for the lectures to end to start your series and watch all your videos, but I got greatly discouraged by the first practical minute of the video. I got the following exception which doesn't let me run the program at all: Unhandled exception thrown: write access violation. std::_Atomic_address_as<long,std::_Atomic_padded<unsigned int> >(...) returned 0x301CF3BC.
Just change x64 to x86 in visual studio
what the fuck did i just watched i quit
I'm having an issue that's literally destroying my brain and my will to live... Sending and receiving int is fine. Trouble is with std::string. 32 bytes are allocated for "paulo" which is understandable. But when it gets to the receiving clients, the message becomes size 10 :( then inside net_message.h size_t i = msg.body.size() - sizeof(DataType); makes "i" become some random junk -12784367856 because size() is 10 but sizeof(DataType) is 32 =[ =[ =[
It's me again. After a couple more hours I found that: the string does get passed on, it's just that the body becomes resized [automatically?]. I can pass a struct (as in part 4 of this series) and a similar thing happens, seems the body gets truncated. In the server code that bounces my Message to all clients, I changed the code, instead of creating a new msg object, it will simply pass along the original msg object sent from the client. It works now! The body is not truncated BUT the data cannot be pulled out from the body in the receiving clients. The string sort of, "moves" to the middle of the vector?? I swear, if I can't get this thing to work today I'm gonna sell everything I own and move to a farm. Plant them bloody veggies. :(
A string is not a fixed size data type. You would need to send two things, the size of the string, then the data.
@@javidx9 Thank you thank you! I'm glad to see you still replying to comments years later. That's pure dedication. You have my admiration, kind sir :D
0:03 bro is staring into my soul
This algorithm was a game changer for me as I used it in my internship project to build a voxel-based simulation environment for drones to train using deep learning algorithms. The algorithm brought significant improvements when it comes to raycasting in 3D. However, I would like to further optimize it. Since I'm dealing with a large dataset (simulation inside a warehouse) and a high number of repetition (Deep Learning), there is a lot of empty space that needs to be tested, but in vain. What do you guys recommend to tackle that issue? Aim for a better data structure or maybe use another raycasting algorithm? Has anyone heard of BVH? Thanks in advance!
I compiled wxWidgets on linux today, using a 10 year old processor i7-4790K, took 2 to 3 minutes, although this video is 4 years old now,I'm guessing you have a beefier system, did you do it on a single thread?
I know very little math but this is so simple! Like wow, i just took a few notes, and followed through!
why is addition of 1 necessary before scaling ??
The transformations result in vertices being scaled between -1 and +1. The screen is 0 to N, so we add 1 to get 0 to 2, then scale by half the screen.
@@javidx9 Thanks !! Will look into it
I started on this project. I got to rotation before stopping. I was in a long car ride and I open up this project and realized I did not have rotation. I do not know much about sin, and cosin so I just winged it and after 2 hours I have rotation with player movement working together. I had a long 75 lines of code just working out a xModifier, and yModifier to multiply my X and Y movement by. These combined always = 1. WHen I got internet back I looked to see what he did in the video, and I was so sad when I saw it was a sin, and cosin. : ( But I am so Happy about figuring out how to do it by myself!
This is amazing. Omg….
I know I'm very late to the party, sorry. What would a monometric grid entail? (that is, a grid in which a square tile remains a regular square, with all 90° angles, rotated 30°/60°, aka this: s2.qwant.com/thumbr/0x380/c/1/9d19e07c956f1f6ef1c8f0b05480cdb3457486c1b1afef862ae736cdb6a3c8/Gli-assi-assonometrici-dellassonometria-monometrica.jpg?u=https%3A%2F%2Faliceappunti.altervista.org%2Fblog%2Fwp-content%2Fuploads%2F2022%2F11%2FGli-assi-assonometrici-dellassonometria-monometrica.jpg&q=0&b=1&p=0&a=0). I can imagine the math is much more complicated. I'm trying to find resources on it, but Google is failing me.
Error 42: Life, the Universe, and Everything, as negated by Vogonity.
Your videos made me want to code in C++, again :D
I’ll be honest, once you learn how they work, they come in very naturally.
♥♥♥
I'm also from the UK and ive never referred to subtraction as take. I'd normally pronounce it minus. Also, on BODMAS. I learned that, but my younger sister was taught PEMDAS. At first I was confused because M and D had swapped place. Turns out they have the same precedence so it doesn't matter.
Did you know that in C++, the main() function has an implicit `return 0;` at the end? Per the standard, you don't need to explicitly return anything unless it's an error code.
What is your computer spec ? Mines only about 50 fps.
Firstly try a release build it will be a big difference, but secondly the command prompt has become slower and slower. This is why I created the successor to the ConsoleGameEngine called PixelGameEngine.
thank you so much.
Hmm... Lynx doesn't have a float variable type, but it does have a 102 pixel high screen (a small number) and some fairly large integers if the calculations are few. Someone did have a go at Flappy Bird for it, and it's kind of there. I must take note... I like the game in small doses when it's right. Like all games :D
MAN! Is translating this to java hard! No clue how to adapt the overwritten methods, especially the "DrawTriangle" method
So if you know any similar engines, that would be MUCH appreciated.
You forgot the flashy single-word subtitles, otherwise how are you gonna keep the attention of the viewer?
Awesome Series! I'm getting along with this so far, except when I make a dumb mistake, and at the camera movement section I realize that somehow my Y - axis is inverted : adding Y makes it go down and vice versa 😂 I'm rewriting it in python, and also changing the code with python's helpful classes and class functions. Also getting some errors that I can't quite understand but work around them...
This is simply next-level amazing and it’s from 5 years ago! Wonder where you are David!?
the way you're typing x triggers me so much
I watched this video for some school work and they want me to source where i learn it from. Should i put your name as javidx9 or OneLoneCoder?
You are the most awesome person in the history of humanity
I ❤ your contents 😊
Aww thanks POG! 😄
Thank you.
The real problem is the division sign if used as an infix operator instead of as a horizontal line with one expression above and one below. In school I learned that a slash was to be considered a horizontal line slanted and everything on the left to be considered above the line, everything on the right to be considered below the line, while the ÷ sign is to be considered like a multiplication, so they would be handled differently.
48:18 Why not inherit ?
But the reality is, ASIO under the hood is still using sockets. They're just wrapped in loads of boiler plate.
True, though the same could be said of any library of utility, it's just OS calls wrapped in stuff. That stuff however can be fruitful. In the case of asio, overlapped and threaded io is hidden away to the point of being OS agnostic, and trivial to use in a modern c++ environment, which is great for productivity and deployment.
@@javidx9 I'm not disagreeing, I just find that quite a lot of my applications will target a single platform and using sockets with the Win32 API is actually quite feature rich. It's when you target multi platform that boost ASIO really comes to the rescue in terms of preventing you having to maintain multiple codebases.
Pedmas > bodmas, math < maths
Hi there mate, i really enjoyed your video about math for game devs. I wanted to ask if you considerd to do some series for it, i would really appreciate that, you have gift for teaching
Thanks! I've no plans specifically as it's just regular maths! Instead I try to approach it from the gamedev angle by exploring those topics and the maths required to do those things at that time.
31:00
@24:36 I'm sure in most cases using the standard libraries is the preferred way, but tracing this back down to the square root function cutting performance in 1/2 did gave me an appreciation for why Id software made their own faster (but less accurate) square root algorithm for the Quake engine.
am i able to use olc Pixel game engine instead of olc console game engine cause the console game engine one isnt working for me on windows 11
Yes it's very very similar.
oh no not boost! just kidding, i have no idea what boost is, have never coded anything, or know why im even watching this video
Thank you so much for this video, I've been really looking into how to create a programming language and this has helped me tremendously. Please do a whole series on how to lex, parse, compile/solve/interpret a language, really looking forward to this
12:54 its funny how many times ive had to hit the left arrow to back up 10 secs because as soon as you get the the end of the line you fly back to the front of the code... and only NOW is when i remember i can slow down the video :)
It's also worth noting that, thanks to C++ exceptions and other factors, it's possible that memory leaks can occur in your program in ways that the programmer simply can't guard against. This is why using smart pointers, or some other RAII encapsulation, is always the recommended course of action.
In India, we use BODMAS. I was confused when I first heard of PEMDAS when reading an American textbook!
Does anyone know if parsing expressions like "- (5-15)" returns a valid RPN? Or more complex ones like "5 * - (5-15)"?
It's valid if the RPN format you use supports unary operator
@@javidx9 Do you have the RPN for the second expression? Also, thanks for answering my question ;)
5 5 15 - - * but that second - is unary