Page 1 of 1

Background / under camera layer for rendering another surface

Posted: Tue May 04, 2021 2:41 am
by Honktown
The idea: A camera and background layer (via LuaRender) or a GUI camera in screen, rendered behind the current surface, which has transparent tiles (out-of-map are not transparent)

Context: a scenario where there's a moving "ship" on an ocean. The scenario has the same problem the idea has in Minecraft: everything needs to move, and it takes a *lot* to clone and move everything. Semi-related, any mod which wants a "background animation", such as stars, water, or even that the player is "up in the air" and wants to show a zoomed out surface beneath (drone scouting/bombing? transportation? many possibilities)

Current similar things:
Render an animation at the lowest layer via LuaRender. Tested render layer property, doesn't like drawing beneath tiles, even with render-layer 0

Camera-over-camera. Actually could be done *very* well, but would require some changes to work better:
cameratest.lua
(2 KiB) Downloaded 44 times
The code example draws one camera over another. With ignored_by_interaction = true and zoom chosen, the graphics are almost seamless in rendering (there's a slight brightness variation, unknown).

Problems: All the other guis are drawn beneath. If a camera could be pushed down, and even better, rendered completely behind a surface, then there'd be effectively no issue. This would be the "most desireable" method: a camera drawn behind the current GUI and world, with the surface "on top"/"above" using transparent tiles to let the camera beneath show through. Also, the character-entity interaction would work seamlessly if the camera could be pushed all the way back. At present, the code above opens inventory guis above the camera, but there are no selection cursors and no entity place images.

Re: Background / under camera layer for rendering another surface

Posted: Tue May 04, 2021 7:56 am
by posila
Hello, I just came here to ruin your hopes and dreams and say that this won't be possible in 1.1 or any future unpaid update.

Re: Background / under camera layer for rendering another surface

Posted: Tue May 04, 2021 5:51 pm
by eradicator
posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.

Re: Background / under camera layer for rendering another surface

Posted: Tue May 04, 2021 6:11 pm
by orzelek
eradicator wrote:
Tue May 04, 2021 5:51 pm
posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.
It smells like spoiler :D
My guess is that in the dlc we will have some reason to have a scrolling background layer behind the view :)

Re: Background / under camera layer for rendering another surface

Posted: Tue May 04, 2021 6:17 pm
by eradicator
orzelek wrote:
Tue May 04, 2021 6:11 pm
My guess is that in the dlc we will have some reason to have a scrolling background layer behind the view :)
Considering recent hirings I won't be suprised if space happens ;). I think I saw Mr. E. ask about parallax backgrounds before...

Re: Background / under camera layer for rendering another surface

Posted: Wed May 05, 2021 11:23 am
by posila
eradicator wrote:
Tue May 04, 2021 5:51 pm
posila wrote:
Tue May 04, 2021 7:56 am
this won't be possible in [...] any [...] unpaid update.
Specifically mentioning "unpaid" that way makes it sound rather suspicious. Especially considering that the thread wasn't moved to "won't implement" even though you bothered to comment on it.
Main reason I wrote it that way was due to tile rendering being quite expensive (due to small size of tile - 32x32 was OK size for games running in 640x480, but is not great for games running at 1080p or 4K, and there is ability to zoom-out further away ... making them smaller; and there is quite complex system for tile transitions) so current tile rendering system implements optimizations that are not quite compatible with what OP is asking, unless we bump up minimum requirements for the game, which I think would be unfair to people who already bought the game. But we already agreed to significantly increase minimum requirements for paid expansions, and changes are being made to the tile rendering that might make the request possible to implement.

Re: Background / under camera layer for rendering another surface

Posted: Wed May 05, 2021 12:48 pm
by eradicator
Thanks for the explanation.
posila wrote:
Wed May 05, 2021 11:23 am
But we already agreed to significantly increase minimum requirements for paid expansions,
My toaster just made a very sad sound :roll:. (I fixed the cooling btw.)