General Category > Starward Rogue Mods & Modding
I have done something wrong - How I learned to love Staring into the Abyss
Misery:
--- Quote from: ptarth on February 01, 2016, 07:11:17 pm ---
--- Quote from: zharmad on February 01, 2016, 06:27:27 pm ---Hmm... an off the left field question, do you think you could make lightning?
--- End quote ---
Sure. Go find a carpet, rub your feet across it. Touch a doorknob.
I think you should be able to, its just multistage mirv-style bullet. You'd use a lot of rand_angle to get the angle to vary. To get varying distances would be trickier, possibly have some predefined variable distance bolt patterns you randomly spawned from each branching point on the bolt.
I've got two concerns.
System performance. In the previously attached images, there are approximately 1500 bullets and frame rate was tanked to 10. Part of it is because I'm doing nested loops worth of nested loops. Another part comes from all the hitbox and collision detection that's going on.
The seconds is that, is that all of this is cosmetic. For the most part, the important thing is that you have a big round bullet moving through space. You could actually grab each one of these complete patterns, make a png out of it and use it as a bullet at a fraction of the system drain. I might actually look into doing that too. Although currently each bullet can be destroyed leaving partial patterns, by making a shot out of it, the entire shot would be all or nothing.
When I was playing with making pixel shot flags I was hitting the same problem. I'm sure Misery has problems with it with his boss patterns too, and I'm also reasonable sure that's what the shots_use_performance_sensitive_logic attribute if so.
--- End quote ---
\
Yes, if I remember correctly that attribute was added after Battleswarm nearly killed everyone's computers with what used to be the green pattern. Later patterns then caused the "screw it, bullets dont even check for wall collisions anymore" attribute.
Ayrix:
--- Quote from: zharmad on February 01, 2016, 06:27:27 pm ---Hmm... an off the left field question, do you think you could make lightning?
--- End quote ---
also been pondering that one
so you need a bullet that leaves a trail of bullets (real y easy),
sometimes changes angle but only like +-10 degrees (easy)
sometimes branches into 2 of itself (use interval_mult?)
sometimes dies part way (make the branch version use a random lifespan, but the main one a longer fixed one)
would need to be killed by the firing system's range_actual
use some effects that can do things like only works x% of the time, but that means the bullet generator has to be an EntitySystem.
Edit: so I tried it.
results thus far:
the good
the random path looks right
the bad
branching is not that easy, the thing walking the path to generate the bullets must be an EntitySystem (which therefore needs an Entity)
this system fires bullets constantly, and can use either interval_mult or chance_out_of_100_to_happen to cause the branches.
then there'll be the clean up to make sure it all dies together.
PokerChen:
--- Quote from: ptarth ---I've got two concerns.
--- End quote ---
Seems a workable ceiling would be several hundred bullets on the screen, but then would have to include laptops in that estimate.
In the end, you would have to simplify with a .png solution. You could try to save the bullet patterns in sectors of ~30 degrees and have 12 of them plus the center (or 24 of them in two rings + 1).
--- Quote from: Ayrix on February 01, 2016, 08:20:53 pm ---branching is not that easy, the thing walking the path to generate the bullets must be an EntitySystem (which therefore needs an Entity)
--- End quote ---
I suspect a system_to_attach_to_shot variable can work as a valid entity system to spawn randomised patterns? So, you can avoid having an entity like my frozen orbs.
Ayrix:
don't seem to be able to get an entity system to attach to a shot (or bullet)
defining a new shot type (with attached system) next.
keith.lamothe:
On performance: if you set use_performance_sensitive_logic and never_collides_with_terrain true on all the bullets in that absurdity, what's the framerate?
Iirc 1500 bullets shouldn't be _too_ bad as long as it isn't having to check the extra stuff.
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version