Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Showcase your libraries, tools and other projects that help your fellow love users.
MasterLee
Party member
Posts: 141
Joined: Tue Mar 07, 2017 4:03 pm
Contact:

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by MasterLee »

Could you make an portal? An wall that when hit by ray is not rendered but instead the ray continuous at another wall? So both walls are connected somehow and when the player walks trough the wall he is warped?
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by Davidobot »

MasterLee wrote: Fri Apr 14, 2017 6:19 pm Could you make a portal? A wall, that when hit by a ray is not rendered itself, but instead the ray continues on from another wall? So both walls are connected somehow and when the player walks through the said wall he is warped to the other one?
This is certainly a very interesting idea! It would be doable, and I actually have a version of this raycaster that has "cameras" (basically, just different viewpoints that can be draw). This "portal" mechanic would just mean drawing a "camera" on a wall and having a player teleport trigger when he collides with the specific wall.
I would löve to experiment with this myself, but I'm currently working full-time on another LOVE project, which I would like to finish for an eventual commercial release. Maybe I'll get around to making a Portal-esque game in this raycasting library as my last salute to this. Although it would be severely limited, I can think of a few ways it would be fun to play around with. :)
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by yetneverdone »

How would you go about making a level? I saw in your code that you have different tables per floor, walls, etc. Do you have a map editor or something?
Also, please make a library for making 3D stuffs like this too. That would really be helpful! Or maybe just document the code :) Awesome work
User avatar
Davidobot
Party member
Posts: 1226
Joined: Sat Mar 31, 2012 5:18 am
Location: Oxford, UK
Contact:

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by Davidobot »

yetneverdone wrote: Thu Jul 06, 2017 4:33 am How would you go about making a level? I saw in your code that you have different tables per floor, walls, etc. Do you have a map editor or something?
So the levels are stored are in the 3 2D arrays that you mentioned. I just punch in the values manually, but it shouldn't be too hard to write a TILED or image importer.
yetneverdone wrote: Thu Jul 06, 2017 4:33 am Also, please make a library for making 3D stuffs like this too. That would really be helpful! Or maybe just document the code :) Awesome work
Well, this is pseudo-3D and I've gotten this request multiple times now. I think I should try to make this into a library at some point, but the code is pretty old and I have other projects going on right now. So I'll see how it goes, sorry and thanks.
PM me on here or elsewhere if you'd like to discuss porting your game to Nintendo Switch via mazette!
personal page and a raycaster
User avatar
yetneverdone
Party member
Posts: 446
Joined: Sat Sep 24, 2016 11:20 am
Contact:

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by yetneverdone »

Davidobot wrote: Mon Jul 10, 2017 5:23 am
yetneverdone wrote: Thu Jul 06, 2017 4:33 am How would you go about making a level? I saw in your code that you have different tables per floor, walls, etc. Do you have a map editor or something?
So the levels are stored are in the 3 2D arrays that you mentioned. I just punch in the values manually, but it shouldn't be too hard to write a TILED or image importer.
yetneverdone wrote: Thu Jul 06, 2017 4:33 am Also, please make a library for making 3D stuffs like this too. That would really be helpful! Or maybe just document the code :) Awesome work
Well, this is pseudo-3D and I've gotten this request multiple times now. I think I should try to make this into a library at some point, but the code is pretty old and I have other projects going on right now. So I'll see how it goes, sorry and thanks.
Please do so! It will be very helpful
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by 4aiman »

If anyone would make this in a library then please (!!!) mind Android too.
Currently the latest demo doesn't work on a pretty decent HW (Adreno 530 GPU, 4 Gigs of RAM, 4x2.4GHz core) due to the heavy shader usage (at least I believe that's the root of all problems).

Cheers!
User avatar
yintercept
Citizen
Posts: 64
Joined: Mon Apr 02, 2018 3:31 pm

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by yintercept »

Still pretty cool example all in all, even if android performance is behind according to some.

4aiman are you familiar with shaders? If not this would be a really excellent time to learn (and post your results!)
Back in the saddle again.
User avatar
4aiman
Party member
Posts: 262
Joined: Sat Jan 16, 2016 10:30 am

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by 4aiman »

No, I'm not. And from what I've seen I imagine that shaders are hw-specific. Maybe I should leave this alone till July when I *will* have more time to spare.
SugarRayLua
Citizen
Posts: 52
Joined: Sat Dec 03, 2022 7:52 pm

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by SugarRayLua »

@4aiman,

I got Textured Raycaster to work (basically) on mobile iOS. What I've found is not so much that the shaders are hw-specific but that mobile runs OpenGL ES which is stricter typed than full OpenGL. @Davidobot, I believe, mentions some of the differences on the love.js site (since WebGL has similar limitations). I'm gaining experience in such nuances, and have converted some of the projects posted on Love2D forum into mobile compatible projects. For Textured Raycaster in particular, try modifying the project's pers.lua file and make sure any integer is actually represented in OpenGL ES stricter float format:

i.e. change "1" to "1.0", "0" to "0.0" etc.

Fyi, good luck! :-)
User avatar
milon
Party member
Posts: 472
Joined: Thu Jan 18, 2018 9:14 pm

Re: Textured Raycaster [Multiple Levels! Door Covers! Jumping!]

Post by milon »

SugarRayLua wrote: Sat Dec 02, 2023 1:07 am @4aiman,
- snip -
In case you missed it, the post you replied to was from 5 years ago. ;)

If you're interested in 3D under Love, you really should take a look at Groveburger's 3D Engine. It's still in active development, I believe.
Any code samples/ideas by me should be considered Public Domain (no attribution needed) license unless otherwise stated.
Post Reply

Who is online

Users browsing this forum: No registered users and 23 guests