Comments (6)
Replied in Discord, will reply here in the inerest of completeness: actor scaling can be approximated with the formula texture size * actor scale * 2
. But without separate X/Y sizing adding a whole flag for this doesn't strike me as particularly necessary.
Example:
class pptest : DoomImpBall
{
Default
{
scale 0.34822; //use any weird scale
}
override void Tick()
{
Super.Tick();
if (isFrozen()) return;
FSpawnParticleParams p;
TextureID tex = curstate.GetSpriteTexture(0);
if (!tex || !tex.IsValid()) return;
p.size = TexMan.GetSize(tex) * scale.x * 2;
p.style = GetRenderstyle();
p.color1 = "";
p.texture = tex;
p.flags = SPF_ROLL;
p.startroll = 180;
p.startalpha = 1.0;
p.lifetime = 35;
p.fadestep = -1;
p.pos = pos;
Level.SpawnParticle(p);
}
}```
from gzdoom.
That doesn't work appropriately. I tried a variety of things but couldn't get it to match. Even copying your code directly.
from gzdoom.
The particles are slightly shrunk. Also GZDoom seems to force actors to be 1 or 2 texels wider than the particle renderer does, for some odd reason. Not sure why or how that works, I can only speak for the scaling that I added to try and make particles approximately close to the same size that they were before they were turned into true squares.
This was the math to shrink it: scalefac *= 2 * ps / (ps * ps + 1);
- all that needs to be done is to reverse that. Essentially with default scaling it is multiplying by (2.4 / 2.44). These values could be subject to change, however.
from gzdoom.
Huh. Alright then I'll give that a try.
from gzdoom.
I think it's worth noting - for VisualThinkers and Actors, if you activate the +ROLL flag on either of those, they will use the same math to shrink themselves down to the square pixel ratio also. Again, it was to try and make them appear to be somewhat the same size that they were, even if they got a little stretched on the X axis to accommodate the change. So if you want your actors to be the same size, activating the +ROLL will instantly do that. But keep in mind what I said before - Actors, for some reason, do still expand themselves out by a texel or two.
from gzdoom.
Jekyll suggested a flag to change that so that stretching behavior can be toggled for particles. That sounds like a wise idea to include.
from gzdoom.
Related Issues (20)
- [Feature] Hold for overlay map, click for full map
- [BUG] Backend console weird behavior on machines which are having HVC0 enabled - status bar
- [BUG] Actor.DisableLocalRendering does not disable Actor Lights set by gldefs HOT 1
- [BUG] Exiting with 'Q' while waiting for other players crashes
- [BUG] Multi-player: host opens windows before all players are connected - bad with fullscreen HOT 5
- [BUG] Mouse movement buffering during screen wipes
- [BUG] Save list doesn't start scrolled to currently selected save
- [BUG] Down arrow can't move cursor after clicking in main menu
- [BUG] Deterministically rendering black world geometry/sprites/models HOT 6
- [Feature] Add GetUDMFInt, String, and Float to Vertex structs
- [BUG] Legacy of Rust (id1.wad) flamethrower crash with newer linux gcc libs HOT 19
- [BUG] ZDBSP requires command-line parameters in a specific order to produce compressed extended nodes HOT 1
- [BUG] A_RadiusDamage not functioning as intended on 4.12.X HOT 3
- [Feature] Option to define a null TextureID
- [BUG] invisible walls inside some doors in gzdoom 4 HOT 1
- [Feature] Sorting game titles in launcher
- [Feature] Allow launcher to show Kex version as separate just like Original, BFG & Unity HOT 4
- [Feature] Expose PSPrite's stencilcolor or add A_OverlayShade/SetShade method
- [BUG] crosshair depth in stereo 3d modes
- [BUG] Vulkan renderer applies an antialiasing filter that cannot be disabled HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from gzdoom.