One nice thing about this series, is this is definitely the type of game that someone could start out doing without needing to understand the math needed for 3D transforms and checks. It significantly reduces the complexity to something much more digestible in a shorter video series.
at 27:00 -ish Question... Why do you have hard coded values for the colors? is this just a mock up version of the idea and planning to implement a more dynamic color indexing system? would love to know thoughts on this! love you content too btw, i always watch your videos
You could very well do that dynamically yet since we have a very small amount of colours as well as very easy and destingt to read integers its simply less work to do this like Cherno
23:10 Todays CPUs - even 8 Bit Atmega Microcontrollers - provide a Hardware multiplying unit that does this job usually in 1 clock cycle. So shifting left does not give you any benefit. In contrary, the multiply unit will be able to cope with signed numbers too. However shifting right by performing an division by 2^n is still an good idea because even if the cpu supports hardware division this will cost some dozens of cpu cycle (in contrast of the the 1 cycle hw multiplayer) due to the iterative character of an division operation... But if one has to cope with signed numbers Hardware divide will be a hot candidate against right shift anyway. So you‘ll take to decide to use arithmetic or logic shifting to the right…
This is incorrect, integer multiply is slower. Floating point it is much closer, and more of a wash, but bit shift is faster than multiply. Not horrible like division, but 2-4 cycles rather than 1. It is somewhat negated by having pipelining, since latency is somewhat masked, but it is still better to bit shift. As noted though, compilers have been bit shifting (and doing much more clever tricks), for ages now, so to the programmer, it is usually not a huge issue.
I got distracted by the variable naming argument. The abbreviated names aren't very readable, but maybe it doesn't matter since Cherno is the sole developer and the point of the project is to port his super old code he wrote. However the other commenters don't give these reasons, and act like there is no problem with abbreviated variable names whatsoever. Saying that it's "subjective" or doesn't matter as long as the naming conventions are consistent. Meanwhile I'm still left wondering what the heck xt and yt are. Probably in hindsight could have just used a simple int x,y struct? Either way the argument devolves into people debating whether global variables are ok or not, and accusing each other of not having industry experience or subscribing to the "clean code" ideology... Twitch chat is fun isn't it?
I understand combining youtube with Twitch stream is more efficient for you, but (since you asked) it is definitely not better. But you do what works for you 👍
@@TheCherno I think just the edited nature of the previous videos are a big easier to watch/listen to than the stream-of-consciousness version that appeals to twitch.
@@TheCherno Hey, thanks for responding! I don’t think the difference was big, I still enjoyed it. So if this way is better for you then maybe it is better in total.
@27:35: Well, the flip was *not* necessary because of C/C++ against Java but because of the fact that Java *alwas* treats scalar numbers in *big endian* byte order. That is because Java with its virtual machine is supposed to be portable among every system it runs on. So the inventors of Java defined to treat numbers in Big Endian byte order. So you run your program *natively* on a x86/x64 which is a little endian architecture. But at the time you wrote your Java version of your game program all scalars has been treat in *big endian* byte order (even on your x86/x64 which is native little endian). Or long story short: Java by the VM defines its endainess to be *strict* big endian and C/C++ simply *does not care* about this. So if your C++ code will be attempted to run on a PowerPC based system (which is likely switched to big endian mode) then your code will not work as expected on this architecture. So the clean solution would be to apply functions that take care about the architectural byte order and flip only if needed for a particular architecture if you do such hard-coded stuff with RGB Values in uint32_t 😉
That doesn’t explain why the alpha channel is always in the most significant bits though, in both the C++ and Java versions. I think it’s just the image format coming from the image libs, ARGB vs ABGR
Since the integer literal is 32-bit and the data being compared is a 32-bit value, the endianness is irrelevant. Endianness only affects type-punning: viewing a wider type as an array of smaller types, or vice versa. Note: Integer literals are always big-endian, because that's how our number system works. Compilers and assemblers always convert these for us.
Hey mister... the More Cherno channel needs some love too. Would be cool if you look at some of the latest and greatest games/graphics with comments on what you think. PLEASE
It's distracting having you have chat and do coding because then you end up answering chat and talking more than you actually code. Plus, you answering chat made you miss fixing the Water1 X and Y coordinates.
Thanks for watching! ❤
Catch the episodes live here: www.twitch.tv/thecherno
One nice thing about this series, is this is definitely the type of game that someone could start out doing without needing to understand the math needed for 3D transforms and checks. It significantly reduces the complexity to something much more digestible in a shorter video series.
Cherno pls more ray tracing series 🙏🙏🙏🙏🙏🙏🙏
at 27:00 -ish Question... Why do you have hard coded values for the colors? is this just a mock up version of the idea and planning to implement a more dynamic color indexing system? would love to know thoughts on this! love you content too btw, i always watch your videos
You could very well do that dynamically yet since we have a very small amount of colours as well as very easy and destingt to read integers its simply less work to do this like Cherno
The way Radiant works sun volume is to be set a long the maps boarders then after that there is a Vista Volume. For anything not in playable space.
thanks, love u Cherno
guy,your lesson is very good.
23:10 Todays CPUs - even 8 Bit Atmega Microcontrollers - provide a Hardware multiplying unit that does this job usually in 1 clock cycle. So shifting left does not give you any benefit. In contrary, the multiply unit will be able to cope with signed numbers too. However shifting right by performing an division by 2^n is still an good idea because even if the cpu supports hardware division this will cost some dozens of cpu cycle (in contrast of the the 1 cycle hw multiplayer) due to the iterative character of an division operation... But if one has to cope with signed numbers Hardware divide will be a hot candidate against right shift anyway. So you‘ll take to decide to use arithmetic or logic shifting to the right…
This is incorrect, integer multiply is slower. Floating point it is much closer, and more of a wash, but bit shift is faster than multiply. Not horrible like division, but 2-4 cycles rather than 1. It is somewhat negated by having pipelining, since latency is somewhat masked, but it is still better to bit shift. As noted though, compilers have been bit shifting (and doing much more clever tricks), for ages now, so to the programmer, it is usually not a huge issue.
yay the beginning~!
I like the stream format
29:55 the best camera controller ever created in game dev history
Hmmm, I ask myself what part of "development in progress" is so hard to understand? 🙄
I would imagine you have been programming longer. I started my programming in 1979 and you can program circles around me.
Come on! Don't hide your light under a bushel! 😉
is this playlist dead?! :(
I got distracted by the variable naming argument. The abbreviated names aren't very readable, but maybe it doesn't matter since Cherno is the sole developer and the point of the project is to port his super old code he wrote.
However the other commenters don't give these reasons, and act like there is no problem with abbreviated variable names whatsoever. Saying that it's "subjective" or doesn't matter as long as the naming conventions are consistent. Meanwhile I'm still left wondering what the heck xt and yt are. Probably in hindsight could have just used a simple int x,y struct?
Either way the argument devolves into people debating whether global variables are ok or not, and accusing each other of not having industry experience or subscribing to the "clean code" ideology... Twitch chat is fun isn't it?
Мармеладке - привет! xD
I understand combining youtube with Twitch stream is more efficient for you, but (since you asked) it is definitely not better. But you do what works for you 👍
How is it any different though? Isn’t it literally the same content, just with the occasional question from chat?
@@TheCherno I think just the edited nature of the previous videos are a big easier to watch/listen to than the stream-of-consciousness version that appeals to twitch.
@@TheCherno Hey, thanks for responding! I don’t think the difference was big, I still enjoyed it. So if this way is better for you then maybe it is better in total.
Is there a playlist for this?
He recently started adding the series name after "//" in the title. The first few videos of this series are not like that though.
There is now: ruclips.net/p/PLlrATfBNZ98f-worHS6hvHrYNrgp225c-
@27:35: Well, the flip was *not* necessary because of C/C++ against Java but because of the fact that Java *alwas* treats scalar numbers in *big endian* byte order. That is because Java with its virtual machine is supposed to be portable among every system it runs on. So the inventors of Java defined to treat numbers in Big Endian byte order. So you run your program *natively* on a x86/x64 which is a little endian architecture. But at the time you wrote your Java version of your game program all scalars has been treat in *big endian* byte order (even on your x86/x64 which is native little endian). Or long story short: Java by the VM defines its endainess to be *strict* big endian and C/C++ simply *does not care* about this. So if your C++ code will be attempted to run on a PowerPC based system (which is likely switched to big endian mode) then your code will not work as expected on this architecture. So the clean solution would be to apply functions that take care about the architectural byte order and flip only if needed for a particular architecture if you do such hard-coded stuff with RGB Values in uint32_t 😉
That doesn’t explain why the alpha channel is always in the most significant bits though, in both the C++ and Java versions. I think it’s just the image format coming from the image libs, ARGB vs ABGR
Yes, this in deed is weird… I expected ARGB in Java becomes BGRA in C/C++ on x86/x64/armle/mipsle
Since the integer literal is 32-bit and the data being compared is a 32-bit value, the endianness is irrelevant. Endianness only affects type-punning: viewing a wider type as an array of smaller types, or vice versa. Note: Integer literals are always big-endian, because that's how our number system works. Compilers and assemblers always convert these for us.
Sorry for interrupting in the intro🐈
Nice video
you've inspired me and I've used chatGPT to create a wonderful plugin manager
Nice
@@CPUfywdym nice? Bad habit to use ChatGPT
We need rendering engine series
Hey mister... the More Cherno channel needs some love too. Would be cool if you look at some of the latest and greatest games/graphics with comments on what you think. PLEASE
It's very well if this channel has sub. I'm not know lots of English, my listening is not good😢
It's distracting having you have chat and do coding because then you end up answering chat and talking more than you actually code.
Plus, you answering chat made you miss fixing the Water1 X and Y coordinates.
Hiii 🤩
Hi❤
Wow, why dont you just use better variable name?
;)
I'm the 256th like
I'm not a fan of being able to see people argue about pointless stuff in chat. It's very distracting.
tbh, you should stream on YT than twitch.
😂
twitch == better
yep ray tracing is canceled
Multiplayer in a game about s*x. Hmmm.....
FIrst
**upload from cherno**
me: "oh freak i hope rtx stuff is finally coming"
me: **reads the title**
also me: 😢
1st comment xD
The Cherno, i wanna render non metalic materials help me out, post new raytracing video pls!!!