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): http://i.imgur.com/pUIaGFC.gif
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
Wow damn, that's pretty awesome. Good job. *.*
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)
https://www.youtube.com/watch?v=tl40xidKF-4
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)
https://www.youtube.com/watch?v=tl40xidKF-4
i sawthat one awhile ago too, its pretty awesome
Now that's impressive.
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
dang, that got a fairly high WTFUWOTM8 value.
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 :)
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
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
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 <_<
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
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).
The Makefile doesn't work :(
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
Wow that's awesome. A friend I'm talking with right now sends you props, and double props for releasing the source :P
Whoa, thanks ;D
Something I wonder is how fast the Microcat and Nspire CX would be able to run this, and what about the TI-89?
Quote from: matrefeytontias on November 18, 2015, 12:07:42 AM
Wow that's awesome. A friend I'm talking with right now sends you props, and double props for releasing the source :P
Lionel Debroux? :P I agree, though.
Quote from: DJ Omnimaga on November 18, 2015, 12:25:09 AM
Something I wonder is how fast the Microcat and Nspire CX would be able to run this, and what about the TI-89?
Well the good thing is, it would proably be fast enough :) Maybe even fast enough to run on a 84, but i do use a few sqrts per x-pixel per frame so yea
Also, i pushed an update :)
The windows link is still http://quantuminfinity.space/files/ac.zip
Not many visible changes, but i improved movement and structured the code a bit more.
No, it's not someone from the TI community, but he does appreciate open-sourced projects, especially awesome ones like this one :P
Today i added mirrors and textures! :D (the windows link is not updated yet, the github link is)
(http://img.codewalr.us/raytexmirror.png)
It now depends on FreeImage for image loading.
(Texture credits to LD Studios, it was the first one i could find in my asset folder)
As of yet textures are still a bit slow and buggy, so i'll need to make some improvements.
This is getting better and better. :) I hope you can get higher resolution textures to run fast enough at some point. Also would adding a floor and sky background (gradient for the floor and maybe a 2D scrolling image for the sky, or gradient depending if you're indoor or outdoor) decrease speed a lot?
Texture size isn't really the problem, but it gets a little slower if you stand in front of a wall because the CPU has to do so much work, and it isn't really made for that. I might see if i can speed up vertical drawing with the GPU.
Also:
(http://img.codewalr.us/ithadtohappen.png)
Strangely enough, most other 3D engines speed up when you close to walls. But I remember that the Nspire raycaster did the opposite like yours.
Looks great Cumred :)
I ported it to the Nspire:
(https://sr.ht/n6BO.png)
There are still a few bugs, namely when trying to look or walk through compressed or stretched space
(https://sr.ht/N5Xh.png)
tns download: https://sr.ht/jsWe.tns
Awesome Ivoah. Also it seems like you are trying to do some anti-aliasing, right? Because I notice some pixels that are darker.
Quote from: Cumred_Snektron on November 20, 2015, 02:46:53 PM
Also:
(http://img.codewalr.us/ithadtohappen.png)
Yes. :P
Quote from: DJ Omnimaga on November 21, 2015, 06:28:01 AM
Awesome Ivoah. Also it seems like you are trying to do some anti-aliasing, right? Because I notice some pixels that are darker.
Nah, that's the Nspire Student Software scaling up the image, and then OS X scaling that up for the Retina display.
Ah I see. How is the speed on-calc? I didn't have much time to recharge my calc and try this. Also does this work on OS 3.6?
Whoa! This is cool!
Nice! Now port it to the CE and Life's Good. :P
A CE version would be nice actually, especially now that Cumred is doing CE stuff. I am curious about if the speed would be fast enough, but since a raycaster runs at good speed on 6 MHz calculators, then I guess a CE version wouldn't be too slow, even with a larger screen. THe question is: Does the non-euclidean part of this raycaster take much more CPU resources?
I know nothing of 3D, but if you could port this or the CSE (or the CE, since the CSE is stupid slow), that would be awesome!
Since its a ray caster, which only casts on one line rather than the whole screen, it might even be doable. Though it will have poor fps probably :/
Maybe i'll have a try one day.
A CSE port would be possible, but it would need to not only use half-resolution mode, but also not fill the entire GRAM being used. So the game wouldn't be fullscreen. A CE version would be more feasible, especially since you can switch the screen to 1 bit, 2 bits, 4 bits, 8 bits and 16 bits for speed, and it has both a memory-mapped LCD and a faster CPU.
Good to know the specs. I see it's possible, it just depends on
if it's done. :P
I wonder how possible a fast raycaster for the Prime is...
Critor made one a long time ago, which ran at 2 FPS at low quality, but I think it was much more complex than Wolfeinstein due to variable wall height and stuff. A raycaster that ran off a small GROB (eg 80x60, scaled up to 320x240 when copied in GROB 0) with Wolfeinstein capabilities might have a playable frame rate.
https://tiplanet.org/forum/archives_voir.php?id=87246
https://tiplanet.org/forum/viewtopic.php?t=15033
Quote from: DJ Omnimaga on November 22, 2015, 07:31:42 AM
Ah I see. How is the speed on-calc? I didn't have much time to recharge my calc and try this. Also does this work on OS 3.6?
Looks like I never replied to this, whoops :-\
Anyways, trying to run it on an actual handheld freezes it up, and you have to reset it. I have no idea why, and don't really care enough to find out :P
That sucks. I wonder why, considering it doesn't use any C code. Which OS did you try the code on? You could maybe post the source in case someone can investigate. Maybe it contains the future exploit for Ndless 6.0 :trollface:
That's not even a bad idea :P