You still might want to check individual sub parts such as the q^2 in case of overflow. In such a case you could clamp them to max value instead of the output of the entire thing becoming garbage.
- Ari2010the2nd
- Registered User
-
Member for 12 years and 5 months
Last active Tue, Nov, 13 2018 18:43:09
- 0 Followers
- 53 Total Posts
- 0 Thanks
- To post a comment, please login or register a new account.
-
Feb 4, 2018Forge_User_04585675 posted a message on Square root function 524287 limit bypass? [Solved]Posted in: Triggers
-
0.96040987424313
Forge_User_04585675 posted a message on Square root function 524287 limit bypass? [Solved]Posted in: TriggersWould it not be possible to scale down the formula? Currently it uses some pretty large numbers.
For example 440 * population * quantity supplied. So if one was to supply 1,000 people with 1,000 units you are looking at 440,000,000 which is well past the range of the SC2 fixed point. However if one were to define population in thousands of people and supply in thousands of units then one gets 440 * 1 * 1 which is 440, well within the range of the fixed point type. Obviously the constants would need to be changed depending how they were derived. If the constants end up growing then this is counter productive so not a viable solution.
One could try rounding parts of if into integers (range of -2,147,483,648 to 2,147,483,647). However I doubt the game comes with integer square root so one would have to implement one themselves. Wikipedia has a few articles explaining. https://en.wikipedia.org/wiki/Methods_of_computing_square_roots
Otherwise you will need some kind of custom number type with custom maths functions to process the intermediate value.
-
0.96037296037296
Forge_User_04585675 posted a message on Square root function 524287 limit bypass? [Solved]Posted in: TriggersOne might have to write a custom floating point or multi word fixed point library to solve such an equation. Such libraries are often used for micro controllers and other cheap/simple processors where larger or more complex dedicated maths instructions are missing. I suggest using a search engine to look for such code, there appears to be tons on GitHub with heavy reference to Wikipedia which might be adaptable to Galaxy.
What is it for? Maybe there are other solutions that achieve similar results without requiring large intermediate values. For example an iterative algorithm that approximates towards it within reasonable time and complexity.
-
0.963185574755823
DrSuperEvilGamepedia posted a message on [Solved] How to make a shield effect (Guardian Shield) around a structure?Posted in: DataIn the cutscene editor right click the blue bar near the bottom and select Change Animation to see all the animations the model has.
Instead of applying an animation bracket, maybe just use a Play Animation action?
-
0.962794229309036
DrSuperEvilGamepedia posted a message on [Solved] How to make a shield effect (Guardian Shield) around a structure?Posted in: DataSo even when the behaviour is removed from the unit for some time the marine model actor still persists?
This means you need to go to the Cutscenes editor and look more closely at the animations of your shield model. Some models have a dead section to their animations near the end so need timers to manually reset their animation to the beginning.
What is the difference between the ShieldGenerator and ShieldGeneratorOn behaviours? You seem to be using one for the creation of your shield and the other for the destruction sequence.
-
0.962278675904542
DrSuperEvilGamepedia posted a message on [Solved] How to make a shield effect (Guardian Shield) around a structure?Posted in: Datatemporarily swap the shield model with a marine and see if that shows the same problems.
-
0.961986035686579
DrSuperEvilGamepedia posted a message on [Solved] How to make a shield effect (Guardian Shield) around a structure?Posted in: DataOk make sure the duration of the buff is slightly longer than the period being used to apply it (0.1secs overlap is enough).
Maybe the lapse in buff coverage is too short for the death animation to have finished so it is not creating a new one.
Do a test where the unit has the buff on permanently.
-
0.961867704280156
DrSuperEvilGamepedia posted a message on [Solved] How to make a shield effect (Guardian Shield) around a structure?Posted in: DataUnder the Animation Bracket Start event action try the Play Forever flag?
By the shield not coming back on it is clear that your buff is not having periodic lapses in duration so that can be removed as a possible cause.
-
0.963144963144963
Forge_User_04585675 posted a message on Creating "map modes" for my map [Solved]Posted in: TriggersYou could try hooking up custom UI elements to the unit information panel to show these values.
-
0.960062646828504
danielthepirate posted a message on [Solved] Attributes as a substitute for custom values? Would this cause more or less lag?Posted in: DataYou could also unit charges (trigger action AddChargeForUnit). They're like custom values except they use a string key instead of an integer index.
Pros
* You can have more than 32 kinds
Cons
* Only positive values can be used, so you'd have to store SomeAttributePositive and SomeAttributeNegative and sum them
- To post a comment, please login or register a new account.
0.960446719404374