Hey,
it would be nice if we could define a rotation for a sprite, so that we dont need to provide different angles or rotations of something.
I personly would use this for a mod, that would automaticly make 3 more equipment pieces for each one, for each direction.
Another use case:
When doing new pipe visualizations, I could just do the dot in the middle and then one arm at the top.
After that, I can easily just rotate the arm as I need, so with that I would reduce file size.
For example:
Would turn into this, with a rotation of 1 or something like that.
Greetz,
Luzifer
SpriteParameters::rotation
- LuziferSenpai
- Filter Inserter
- Posts: 391
- Joined: Tue Jul 08, 2014 10:06 am
- Contact:
Re: SpriteParameters::rotation
That's a nice modder QoL feature and could also help make big mods with tons of animations less of a VRAM hog.
Should probably be an angle in radians for easy scripting in prototype phase.
Should probably be an angle in radians for easy scripting in prototype phase.
- ElectroMagnetic
- Burner Inserter
- Posts: 17
- Joined: Fri Jan 10, 2025 10:57 pm
- Contact:
Re: SpriteParameters::rotation
+1 good idea
Quality spoilage 
Feel free to move my posts or declare them off topic(I won't get mad)
I overuse parentheses(If you couldn't tell)
I'm still stuck automating chem. science (This signature will be updated as I progress)

Feel free to move my posts or declare them off topic(I won't get mad)
I overuse parentheses(If you couldn't tell)

I'm still stuck automating chem. science (This signature will be updated as I progress)
Re: SpriteParameters::rotation
Wouldn't that trade lower VRAM usage for higher CPU/GPU processing usage, i.e. lower FPS?
I mean, something has to rotate those pictures at some point in time.
I mean, something has to rotate those pictures at some point in time.
Re: SpriteParameters::rotation
The main benefit is that you could make more flexible graphics with just one sprite instead of making unique sprites for everything. You would still be loading the rotated frames while the game is loading, so performance-wise it's theoretically all the same once the game is running. The idea is that it'd be a procedural alternative to making unique sprites for every application. One example is that I want to make an animation that's just a sprite spinning around its center. Right now I would have to make a sprite sheet that has every frame of rotation I want for the animation. If I could instead specify that frame X of the animation is the given sprite rotated 10 degrees times X repeated for 35 frames, it would make simple animations and sprites like this more flexible.Muche wrote: Mon Feb 03, 2025 10:53 pm Wouldn't that trade lower VRAM usage for higher CPU/GPU processing usage, i.e. lower FPS?
I mean, something has to rotate those pictures at some point in time.
Re: SpriteParameters::rotation
GPUs are optimized to rotate, skew, and stretch texture coordinates while applying them to planes in a 3D space. No need to use the CPU for that. Just have the sprite's plane rotate, and the GPU will do the same it does now. There is no hardware optimization in the GPU for the edge case of someone making a 2D game.Muche wrote: Mon Feb 03, 2025 10:53 pm Wouldn't that trade lower VRAM usage for higher CPU/GPU processing usage, i.e. lower FPS?
I mean, something has to rotate those pictures at some point in time.
Re: SpriteParameters::rotation
Duplicate of viewtopic.php?t=63410