-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix generation of sand worm passable sand regions. #30
Conversation
Made a video that shows how the terrain layer disappears while the sand worm is moving after fixing the sand region flood fill, but before disabling the rendering of the sand worm shimmer: Video that shows how the rendering looks after applying the temporary workaround: |
The PR also adds a debug log print about the sand regions. In Harkonnen campaign level 6 it looks like this:
that is helpful for validating that the algorithm runs correctly. Level 6 looks like |
One thing that caught me off for a moment is that it looks like the sand regions are not recomputed on savegame load, but only generated when a new level starts. (i.e. they persist in save games) As result, reloading a savegame was not enough to test, but have to remember to reload and then restart a level. |
Ugh. This is the same problem that occurred with the sonic bullet a few years ago (2057458). Back then, I put the "fix the sandworm rendering too," task on hold until I could come up with a better solution for the bullet. I like the main part of the PR, but the SandWorm.cpp change probably belongs elsewhere. Besides, the |
Also as result, this fix unfortunately uncovers some kind of bug in the rendering of the sand worm movement shimmer, which has some kind of blitting bug in it. This causes the whole terrain layer to disappear whenever sand worm is moving, so disable the rendering of the shimmer for now.
c4bc5ad
to
c363910
Compare
cab935f brings over the shimmer rendering work-around from Bullet.cpp. It is better than before, but it isn't great. Try playing the "Wormhole" or "Worm Investation" multi-player maps to see a lot of worms at the same time. |
Pulled this now - Looks quite noticeable and solid now to me - similar in effect from what I remember from the old days! |
I updated it again. This time without crashes and the horrible rendering performance. |
The bullet code might also cause problems if there are too many on screen at the same time. (At least, I suspect that is what was going wrong down in the bowels of SDL's DX11 code.) Beyond tweaking the color, playing with |
Also as result, this fix unfortunately uncovers some kind of bug in the rendering of the sand worm movement shimmer, which has some kind of blitting bug in it.
This causes the whole terrain layer to disappear whenever sand worm is moving, so disable the rendering of the shimmer for now.
Fixes #23.