Log In  

Simple raycast test.

Cart #mulperiraycast-0 | 2023-04-17 | Code ▽ | Embed ▽ | License: CC4-BY-NC-SA

P#128652 2023-04-17 08:05 ( Edited 2023-04-18 04:44)

Pretty cool effect, I like it!

P#128676 2023-04-17 19:56

Thank you, I will be using this later in my games for line of sight

P#128696 2023-04-18 04:42

be aware that your current code is quite slow - there is no need to iterate over pixels to find a hit, this should be done in grid space - suggest to look at how a typical raycasting engine solves that.
example: https://www.permadi.com/tutorial/raycast/rayc7.html

P#128699 2023-04-18 06:35

Thank you @freds72 for taking the time to check the code and suggest better way of doing it!
I will try to understand it. Hopefully it won't be beyond my capabilities to implement :)

P#128701 2023-04-18 08:51 ( Edited 2023-04-18 09:01)

Hi,nice implementation! I did one a while ago, i don't which one is more suitable though: https://www.lexaloffle.com/bbs/?tid=49151

P#128702 2023-04-18 10:17

taxicomics: your function is not any better perf wise!

P#128712 2023-04-18 18:13

[Please log in to post a comment]

Follow Lexaloffle:          
Generated 2024-02-26 11:46:15 | 0.018s | Q:20