Join us on Discord!
You can help CodeWalrus stay online by donating here.

[C] AntiCaster: a non euclidean raycaster

Started by Snektron, November 16, 2015, 07:04:02 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Snektron

For the past few days i have been working on a little proof of concept: non euclidean space in a raycaster!
Basically, the space can be stretched or compressed, on tiles, making the rays do all sorts of crazy things, for
example a tunnel can seem 10 tiles long (and, since player movement is slowed down too it takes the same
time as to walk though it as an actual tunnel of 10 tiles), but in reality you only traveled 1 tile.

gif (about 500kb):


I probably add some more cool things, like portals and such and
turn this into a little engine. (Wolfenstein4D?)

You can find the window executable at http://quantuminfinity.space/files/ac.zip
It depends on SDL, so SDL.dll (included in the download) needs to be either besides the executable or
on your system's path.
It should be possible to run on linux and mac too, but you'll need to build yourself.
You can find the source at https://github.com/quantuminfinity/anticaster
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


novenary

Wow damn, that's pretty awesome. Good job. *.*

Ivoah

This looks pretty neat! I can't wait to see where you go with it. It reminds me of CNLohr's No! Euclid! (https://github.com/cnlohr/noeuclid)
  • Calculators owned: TI-86 (now broken), TI SR-56, TI-Nspire CX CAS, TI-84+ SE, TI-84+ SE, TI-85, TI-73 Explorer VS, ViewScreen, TI-84+ CSE, TI-83+ SE

Snektron

Quote from: Streetwalrus on November 16, 2015, 07:09:34 PM
Wow damn, that's pretty awesome. Good job. *.*

Thanks :D

Quote from: Ivoah on November 16, 2015, 07:12:24 PM
This looks pretty neat! I can't wait to see where you go with it. It reminds me of CNLohr's No! Euclid! (https://github.com/cnlohr/noeuclid)


i sawthat one awhile ago too, its pretty awesome
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


novenary


Dream of Omnimaga

Wow that is actually pretty cool. Would textures or shading slow it down much? You could make some mindf***ing puzzle maze game out of this O.O
  • Calculators owned: TI-82 Advanced Edition Python TI-84+ TI-84+CSE TI-84+CE TI-84+CEP TI-86 TI-89T cfx-9940GT fx-7400G+ fx 1.0+ fx-9750G+ fx-9860G fx-CG10 HP 49g+ HP 39g+ HP 39gs (bricked) HP 39gII HP Prime G1 HP Prime G2 Sharp EL-9600C
  • Consoles, mobile devices and vintage computers owned: Huawei P30 Lite, Moto G 5G, Nintendo 64 (broken), Playstation, Wii U

aetios

dang, that got a fairly high WTFUWOTM8 value.
ceci n'est pas une signature

Snektron

Quote from: aeTIos on November 17, 2015, 01:05:56 AM
dang, that got a fairly high WTFUWOTM8 value.
Thanks ;D

Quote from: DJ Omnimaga on November 17, 2015, 12:54:05 AM
Wow that is actually pretty cool. Would textures or shading slow it down much? You could make some mindf***ing puzzle maze game out of this O.O
Yeah, i will be working on that :)
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


alexgt

Wow, my mind is bleeding as to how you coded that, great job O.O.

No, plz don't explain I might suffer a coma :P
  • Calculators owned: Ti-84+, Ti-Nspire, Hp Prime, Broken HP Prime, HP 48SX

Hayleia

Lol, you can make some really annoying games with that :P
You're probably more limited than AntiChamber but you still can do this kind of annoying things I guess :P

Snektron

Quote from: Hayleia on November 17, 2015, 07:39:05 AM
Lol, you can make some really annoying games with that :P
You're probably more limited than AntiChamber but you still can do this kind of annoying things I guess :P
Yeah, mostly because this is essentialy 2d (well, the raycasty part is) and AntiChamber is 3d, but im fairly certain it uses the same kind of technique.

Quote from: alexgt on November 17, 2015, 02:38:10 AM
Wow, my mind is bleeding as to how you coded that, great job O.O.

No, plz don't explain I might suffer a coma :P

Let's just say that i use raycasting because it's way closer to real life than rasterization (drawing triangles), considering light are rays too. It would actually
be almost impossible to make using rasterization. That's probably why i don't like it when people implement it in minecraft (especially in vanilla) since i know
the engine doesn't support it and people just make hacks to test where players are and change the world according to it <_<
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Hayleia

Quote from: Cumred_Snektron on November 17, 2015, 01:13:38 PM
Let's just say that i use raycasting because it's way closer to real life than rasterization (drawing triangles), considering light are rays too. It would actually
be almost impossible to make using rasterization. That's probably why i don't like it when people implement it in minecraft (especially in vanilla) since i know
the engine doesn't support it and people just make hacks to test where players are and change the world according to it <_<
You can do it with a raytracer if you want the best realism and full 3D :P
But forget about speed then :P

Snektron

I could probably pull it off (with some shaders) though, but i liked the idea of implementing it in a raycaster.
The way i did it it should be fairly easy to port over to less powerfull devices too (though i do need to calculate a lot of sqrts).
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Ivoah

  • Calculators owned: TI-86 (now broken), TI SR-56, TI-Nspire CX CAS, TI-84+ SE, TI-84+ SE, TI-85, TI-73 Explorer VS, ViewScreen, TI-84+ CSE, TI-83+ SE

Snektron

The makefile is a makefie generated by eclipse, and i'm not really sure how to build it otherwise. I'l try to build it manually
  • Calculators owned: TI-84+
Legends say if you spam more than DJ Omnimaga, you will become a walrus...


Powered by EzPortal