Why was GuiPaintable depreciated?

  • English

We've posted an important announcement regarding the current situation and the future of the game: Announcement

  • Why was GuiPaintable depreciated?

    Just wondering why this was depreciated? There doesn't seem any other way to draw lines / circles.

    P.s. I can try using guipanels that are 1px by 1px and Bresenham's algorithm myself as a workaround but I think that might cause performance issues?
    play: server.medievalrealms.co.uk website: medievalrealms.co.uk discord: discord.medievalrealms.co.uk

    The post was edited 1 time, last by yahwho ().

  • Actually the "deprecated" tag isn't 100% correct: originally this class became public by accident although it wasn't ready (and it doesn't work atm). But we couldn't just remove it since it would break any plugins which use this class (even if it was just in the imports), so we marked it as deprecated... but maybe it will be "re-added" in the future ;)

    yahwho wrote:

    I can try using guipanels that are 1px by 1px and Bresenham's algorithm myself as a workaround but I think that might cause performance issues?
    Yeah, unfortunately this would cause massive performance issues... every visible element on the screen causes at least one draw call (for the client), and even though it's not very expensive to render a panel, this would still be way too much (even for a powerful computer) oO

    In this case it would be much better to create an image (e.g. a buffered image) and manipulate it accordingly, then save it to the hard drive and load it as "ImageInformation" (which can be assigned to a GuiImage)
  • Well, actually there isn't a "fixed" value which can be considered as "safe". It heavily depends on the hardware, poly count and of course also on the complexity of the shader. In addition, you cannot influence the draw calls directly. I.e. creating 1000 objects (e.g. 3d models) doesn't mean there will be necessarily 1000 additional draw calls. Instead there might be some objects which require more draw calls, but there might be also several objects which will be culled (not visible -> almost no impact on performance) ;)