Hello.Welcome to my raytracer. This is the same raytracer I used in a previous video
that was used to do some strange things that are non-euclidean. I'm still doing some non-euclidean
things, but this time the raytacer is much more advanced.Everything is still made out
of these unusual blocks, and it's still done on this regular grid. The regular grid makes
things a lot simpler. Space can be warped in X Y or Z or some combination - I'll just
take it as it goes. I'm actually turning this kind of into a video game. I'm calling the
engine "no! euclid!" and the video game is probably going to be called "get to the blue
block" because the whole goal of the game is to always get to the blue block.We'll do
that right now. So, in this room down here, you can see that the room is somewhat breathing.
That is because the density of the walls can change - and - because everything is being
rendered with the procedural texturing, it depend on where the location of the wall point
actually is. So, as you can see, as the walls retract - we are seeing slices through this
rock texture.The textures are mimicking Minecraft textures because I originally wrote the ray
tracer to work with Minecraft. I never did much with that but, you know whatever. There's
also some goodies. For these, there's some blocks made out of stars. And, uuh, really
what it is is - anywhere this block appears, render stars. Let's restart this room, so.Go
through the hole. And I can also do some unusual things, where I can mess with how the room
is rendered. So, here, I just went through the wall and you can see that the entrance
here disappeared - however the exit did appear. So, unlike before, I now have the ability
to warp. And, I can actually control rotation in warping, but for this demonstration here,
I am just warping position.So you can see the bottom of this box is tied to the top
of this box. As you can see, we are falling continually through this box. Because the
physics is using the same - WOW we're going really quick - the physics is using the same
calculations are the graphics, we end up being able to do some pretty neet things - wherever
you walk or wherever you are falling is where visually would. So, we're actually doing all
of taht on the GPU - physics included (unlike before.) So, here I have a room filled with
Lava. And if you touch the lava, you die, and you restart the room. And here is an example
of something you just can't do with conventional rendering. So, I'm still using the same sort
of blocks for the sky. But if you look at this side of the room it looks very different
from this side of the room.On this side of the room we just can't clear Lava. No matter
how hard we try and no matter how hard we jump, there is no way for us to clear it.
But, as we start walking more toward this side of the room, we see that the entire environment
warps. You can even see the environment warping upwards as we get to this side of the room.
And, that's because the X and Y is actually smaller here. So, the blocks over here are
smaller than the blocks over there. Where here, it's easy to skip from one block to
the next, where as over there it's virtually impossible. You can also kind of see more
of the extreme warping effect over here. Let's get to the exit. As always, the goal is get
to the blue block.When we hit the exit we're going to go look at another room where things
are warped. Each room has a time limit. This room has a particularly short time limit.
That's because you should not be able to get to the blue block by falling down in the hole
and trying to go to the blue block. That may seem strange, but it's because sometimes the
fastest point between two point is not a straight line. Sometimes, it's go sideways and then
go to the blue block. As you can see here, blue block is far away. Oh. Restart. Whoops.
But over here, space is very compressed, so we can walk straight to the blue block. You
can also see this warping effect which would be impossible with traditional polygon rendering.
On the blue block. And, sometimes you, like here, you just can't get across. There's just
no way to get to that blue block. Sometimes the fastest and only path is not a straight
line. Which means you have to go the wrong way to get to the exit. One of the constructs
I've added to the game is the ability to pick up certain blocks. So, over here I am picking
up all these gold ore blocks, in order to put them in my inventory, so I can get to
the exit, which is over there. I can jump, but there's no way for me to get to it on
my own. I can, however, put up some walls here. And, I can put up some walls here, and
I can use the blocks I've placed to my advantage. So, I can go here, up here, and now I can
go over here. Course, if I want, I could just jump right back - but what fun is that. This
also shows we can make gravity appear go the wrong way by flipping space upside down when
we warp. I'm gonna place a little path right here so I can get across. And, one of the
other neat things I can do is re-use rooms. OH! I can also suck blocks through portals,
because the same mechanism that is used for sucking blocks is the same one we visually
render with so if you can see something you can effect it in the same way that it's visually
there. So, for example in this room, we can go and we can build a little path up because
sure, enough that's not a blue block any more. That's a white block, it doesn't do anything.
I can go over here and say "I want to get above the clouds." I can just go place some
of these golden ore blocks. And, I can keep doing this till I get much closer to the ceiling.
You can see the extreme in the warping effect here. Ok, let's see. Probably two more. woaaah.
There we go. Now, we can make our way across to the blue blocks. I can just place these
here, and you can see how it renders around it. It tries to render the densities all correctly.
And this is all ray tracing, except for the text on the screen, but for the most part,
anything that you see as a visual element is being raytraced. This is another room where
I'm tweaking things to get across - and like always, if you fall into Lava, you die. So,
uuh, here we are gonna give it a moment to get a path going. Whoops, I messed that up.
Oh no. Let's see here. Gotta. Ugh. See... Can I get to that blue block? Woah! Ok. This
is actually the end of what I've written, and you can see here an entire world I can
fill in with new puzzles. And, all I'm right now using is this small area over here. One
of the neat things about these puzzles that I'm doing is that I'm using TCC. I can manipulate
the puzzle while I'm playing the game. So, if I warp back to room, say, zero, right here...
I can modify the room that controls this room in real time. So, right here, I have this
code and I can go "room 0." And, if I look in here, I can see all the code that's being
used to generate this room. I can go and modify it very easily. Say I want to make that block
#80 instead of 83. Let's see, somewhere here, maybe I'm getting a little confused. Up up
there! So, that's the block up there. Let's see if we can get that in view. Annnd, it's
being a little slow, but we got it. Ok. I can change the number for the block, and it
recompiles the code, in real time. So, it changes the code, updates it and keeps all
the environment variables the same. So, I can actually go change the code on the fly
and be able to play the game to be able to tweak it. This makes it really easy to be
able to do rapid prototyping development with this, so I can go play around with a bunch
of things real quick, so I can see what I like. I hope you guys like it. All of this
is available on github right now. I don't know if I'm going to keep making the games
because I really want to go back to making hardware videos. This is just something I've
been working on. Something I think is pretty cool. And, uuh, who knows, maybe somebody
will take this and make a real video game with it. Umm, gimme some comments. If you
liked it, please tell me. Hopefully videos on hardware will return in the next day or
so. Thanks!