Page 1 of 1

LuaRendering and LuaPlayer Limitations

Posted: Tue Sep 17, 2019 10:52 pm
by AlienX
Hi devs, and others.

LuaRendering:
Please can you make draw_sprite have the option to also be able to scale_with_zoom - i feel this has been missed?


LuaPlayer:
I was also going to write some code to do some LuaRendering work based off the players zoom level, but it's write only - is there any reason why this data is not readable via script?

Thanks for your time as always :)

Re: LuaRendering and LuaPlayer Limitations

Posted: Tue Sep 17, 2019 11:24 pm
by Bilka
Why/what for?

Not deterministic, making it deterministic would mean lots of network traffic: viewtopic.php?p=455826#p455826

Re: LuaRendering and LuaPlayer Limitations

Posted: Wed Sep 18, 2019 5:04 am
by Boodals
AlienX wrote: Tue Sep 17, 2019 10:52 pm Please can you make draw_sprite have the option to also be able to scale_with_zoom - i feel this has been missed?
As far as I know there's no technical reason this couldn't be done, the problem is as soon as it would be made, people will be requesting ways to position objects relative to each other based on their size (which gets really ugly very quickly), and ways to have the render objects show above GUIs (which as far as I know is impossible with the current system).
Only text supports scale_with_zoom at the moment, so I don't know why you'd think it has been missed.

If you want a sprite that stays in the same place on the screen, use a GUI. You don't have to have a frame for it if you don't want it. If you want to rotate the sprite, there's probably been a modding interface request for that already.

Re: LuaRendering and LuaPlayer Limitations

Posted: Wed Sep 18, 2019 11:38 am
by AlienX
Well yes i want to rotate the sprite, and in terms of it being missed you pretty much answered your own question...
"draw_text is the only one with it" - so why not the rest that supports scaling?

I understand the limitations in terms of having text and a sprite re-sizing on the fly when used at the same time, overlapping or whatever but i still feel that this should be something we could do?

If it's been done for text already, i assume the coding work from a developers side isn't that much of a big task, but that's pure speculation.

If i wanted to make a GUI this is possible by swapping a crap-tonne of gui sprites out at runtime, but not that great.

Re: LuaRendering and LuaPlayer Limitations

Posted: Wed Sep 18, 2019 12:35 pm
by eradicator
Bilka wrote: Tue Sep 17, 2019 11:24 pm Why/what for?
I remember bringing this up in the thread about weather. I.e. a sprite with scale_with_zoom could be used to "fake" a rain/fog/snow/night/etc overlay over the whole screen, albeit for that to work it'd have to be draw_animation, not _sprite.
Boodals wrote: Wed Sep 18, 2019 5:04 am As far as I know there's no technical reason this couldn't be done, the problem is as soon as it would be made, people will be requesting ways to position objects relative to each other based on their size (which gets really ugly very quickly)
That is true for every request though. Rejecting reasonable requests based on what unresonable requests might or might not come afterwards reminds me of dystopic stories where people get arrested for crimes they haven't commited yet :p.