(forum was down, updating):
20 april 2022: Spent 10 hours trying out light casting attempt 2 and 3 and also directional tile lighting, not much success so far.
Thought light casting attempt 2 shows some promise, light rays visible in trace, however there is something wrong with the screenvoxelframe or
something with the sprite frames, something weird going on, as if lower air tiles have walls or something.
Tried to implement sun direction via delegates and functions but became to complex in figuring out call order, so simply made it a global.
This is much easier to work with.
Also openxcom.org and forum seem down time ! LOL
So will post this later ! =D
https://www.youtube.com/watch?v=t2COQcJF6BMhttps://www.youtube.com/watch?v=uh1DRJG7sQE22 april 2022: Some significant progress has been made. For the first time something that resembles "perspective" shadows can be seen. Hold control + L to see it in action.
Tested voxelray traversal for full x, y and z lines, seems to be working ok. Could be an interesting technique maybe for "isometric" shadows.
For now I will probably pursuit, "perspective" like shadows, though it might not fight the game well, so maybe I will pursuit isometric after all, but it's kinda harder to do and it kinda looks a bit weird for now hehe, but it was only doing a few rays from only one axis direction, so maybe a multi-axis direction might look better lol. It was funny to see isometric lighting in action though !
Part 1 less usefull I think, not sure, audio crash though:
https://www.youtube.com/watch?v=X9l0Z3myMzIPart 2 much more usefull, one very interesting lighting solution, however it's a bit slow, hoping that the frame version/computed version can work tomorrow.
https://www.youtube.com/watch?v=X9l0Z3myMzI(Spent almost 10 hours on this). (Before those 10 hours also had some fun with civ1 and even tried to debug it... cause it hang... made a civfanatics forum posting about that, maybe reverse engineering civ1 will be my next project to debug that game =D)
Also, I am starting to doubt if it will ever look any good, cause there is so many voxels missing here and there... then again... maybe if it's subtle, maybe blurred/filtered in... or worked on a bit more, maybe it will start to look better.
For now the most urgent improvements are correct depth/sprite/layer sorting and still the shading formula needs to be better, probably something simple like distance of light source will do if it's "lit", otherwise probably just ambient/dark color, though I forgot how to maybe do it a bit better... hmmm... maybe draw more rays like the light is a square or something.. I may have to check my original light casting code... or I can just proceed with c/c++ and try some things out. It shouldn't be too hard to get something that looks somewhat decent going
Also units and other things still need to be incorporated into the voxel maps and such... and eventually voxel frames if that technology is ever going to work correctly, otherwise render directly from voxel 3d maps is also possible, but slower... maybe in future a gpu version could also speed some things up... but for now focus should be on trying to get the voxel frame version working, speed up through smart data structures... I still don't understand why it's not working the way I envision it, everything seems to be right, except when it's suppose to cast/shoot these rays hehe.
(I also kinda wanna have some more fun with civilization 1... so this kinda eating into my mind right now ! =D But seeing those "early" "shadows" and "lights" and such also motives me to keep going at it/openxcom that is hihi... cause I really want some better lighting before I re-play this game with fat mods and shit yeah hehe... maybe also new special blood effects hehe... the old look and feel of game kinda bores me... so I really need something better and civ1 AI is best for now... so I might play that game instead... oooohhhhh but for now it's just about the look of OpenXCOM.... can I do it ?! can I make a revolution happen in 2d graphisc games with just cpu ! or even just a little bit of gpu!
=D It's a question that has been on my mind for a very very long time and it's about time that it gets answered properly, if not it will be frozen in the fridge again, to be unfrozen in the future lol. I'd rather cook it the coming days ! =D and be done with it... but maybe it will never be done with it... as new lighting algorithm become available... though this is my algorithm though... and I feel like... and know... and have some proof... that it can work.... arghh.... so let the game mold itself into a suited data representation to get it done... I might even go as far as make voxel graphics for this game... if I can get it look good, but then again... maybe too much work for 1 man... but a website... were people can coorporate and do it together.. maybe I make that... to convert the 2d sprites to 3d sprites.)