Pages: 1
Author Topic: Vector graphics? Bones on sprites?  (Read 440 times)
Offline (Unknown gender) mistermano
Posted on: December 18, 2019, 06:05:49 pm
Joined: Apr 2019
Posts: 5

View Profile
I did a quick forum search and the most relevant answer I found was a topic from 2014. So, I'd like someone who knows better about the engine to kindly answer me:
  • Is it possible to use vector graphics, somewhat similar to Flash?
  • Is it possible to add bones, joints or something similar to sprites?
  • Is it possible to change the origin of a sprite sheet to a particular frame while the game is running? (I'm almost certain the answer to this one is yes, but I'd like confirmation)
  • Is it possible to change a palette color? Say, my sprite is saved with a 16 color palette, after it is loaded, can I change the color value of one of those 16 colors?

Why I'm asking: the project I have in mind is basically the player controlling a robot, running around gathering new pieces like arms, legs and torsos, which are visually different. Zooming in and out to show the same image rather than having a separate set of images for close ups would be much better for me
Offline (Male) Josh @ Dreamland
Reply #1 Posted on: December 18, 2019, 09:13:14 pm

Prince of all Goldfish
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2949

View Profile Email
We're mostly focused on the build system and IDE right now; it's somewhat refreshing to see questions about the engine. Unfortunately, there's no great canned solution to your questions.

  • ENIGMA is a raster-based engine; you can draw textured polygons, but we don't support loading vector graphics by default. You could integrate with, eg, NanoVG easily enough, but until a hardware-accelerated SVG rendering library is popularized, I don't expect us to adopt one natively.
  • You can do that relatively easily using sprite origins and some trig (or the convenience lengthdir_x/y functions), but we don't currently have a bone editor.
  • I'm actually not sure what you mean by the origin of a sprite sheet. You can change the origin of an entire sprite, yes. Note that this is a global change that will affect every occurrence of that sprite.
  • You could write a shader that used the pixel value as a color index, but we don't natively support changing color palettes. This was one of my wishlist items, though. If you look around, you can probably find a shader that already does this.
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1