- Joined
- May 27, 2014
- Messages
- 138
- Reaction score
- 152
Give the shotgun a random, rather than fixed, aim offset from the output block, changed each reload cycle, and tighten the cone a bit so it's useful beyond three feet.
Correct, a non-fixed pattern would require an exact sync of the pattern.Pretty sure the devs said they couldn't give shotguns a randomized pattern.
I'd be game for a pattern that's at least close to symmetrical, though.
There is a solution to the randomness though.Correct, a non-fixed pattern would require an exact sync of the pattern.
The amount of data is exploding then.
As any "module" has to calculate and transmit every single beam direction and send it to the clients, with every single emit.
(Not even sure how beams could compensate this semi-randomness, when they already emitted beam has to follow the mouse pointer, while new beams add a new random offset.
Well, this goes a bit beyond my knowledge about the actual code implemented for this.There is a solution to the randomness though.
java.util.Random uses seeds. If the seed is the same, the random sequence will also be the same.
If each ship has its own Random instance for this purpose, which's seed is transmitted to the clients[8 bytes, so it doesn't explode], alongside the number of retrieves, that already happened[also 4 or 8 bytes], the amount of data wouldn't explode, it'd only be 12 or 16 additional bytes whenever the entity is loaded.(all this is assuming, that the Random instance is used EXCLUSIVELY for the pattern generation)
As for beams following the cursor: Simply having the pattern reset each time the 'cooldown' passes seems suitable IMO.
Only 1 seed per entity, as each group will not fire simultaniously, but in an order[although it all happens in the same tick], and said order should be the same for server and client.However, this still sounds like we need a seed for each weapon group/emitter?
If what you're saying is for every 1% increase in slave the spread size increases by X then I like it with one caveat ... with only 10 projectiles and the block nature of the game at 3x3 you have 1 per block plus 1, 4x4 you have 6 open holes and 5x5 15 open holes with a 60% being open holes.I've said it before and I'll say it again, spread should be determined by slave percentage, at 1% you get a really tight spread and at 100% you get the current "blowing tennis balls out of a bucket with a firecracker"
I would not recommend that, as I don't think it is fully guaranteed, that multiple entities keep their firing order. For a single entity, yes, but for multiple, no. Besides, the seed could be a value, that is already stored in the entity, like the time it was spawned.like MegaCrafter said use a single Random Seed for each primary Entity. The Primary Entity being the main Parent that has the other things docked to it.