Projectile manipulation

YLM

New Member
Reaction score
0
Few questions. I've heard that manipulating projectiles using triggers dynamically (changing their angle, position, etc) is impossible. Is this true?

If it is how could I make a projectiles system? I've heard that creating a repeating timer would cause lag issues and generally perform very poorly compared to native projectiles. Are there any examples of projectile systems for SC2? What would I need to look out to in such systems?
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
Firstly Id say, if you arent advanced in the trigger editor already, baby steps, start with some type of data management system as projectile systems are one of the most advanced types of systems you can attempt to make. If you want to modify projectiles using simple actions like pausing them, moving them, things like that, then you will probably be able to do that off a simple event.

So I guess my question is, when you say projectile system, do you mean an entire system that manages the location of every projectile in the game? or events that just manipulate a small set of projectiles?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
My map Cruiser Command uses a custom physics system to handle projectiles and space ship movement. It works much better than I expected. I don't really experience any lag issues(and there's a lot of other stuff going on at the same time) and I can't see any difference between normal movers and the custom physics system.

It's much easier to handle the projectiles this way. I easily made mines that chase the target when they come close, guided missiles, splitting missiles, etc.
 
  • Like
Reactions: YLM

YLM

New Member
Reaction score
0
When I say projectile system I mean a system that replaces most if not all of weapon effect in an AoS type map. Basically I need some kind of ability to do things (e.g. stop, make it go faster, destroy/spawn projectiles) when a projectile hits a region or another projectile, or when a projectile of certain property (say red projectile hits blue barrier causes a debuff in an AoE).

So Siretu, how did you make your custom physics system? I mean overall design, not something specific. My main questions are:
1. Did you use Galaxy or Galaxy enhancements like Galaxy++ at all?
2. Did you use repeating timers to create the system?
3. What were the most common pitfalls?
4. Will the physics system you made be publicly available?
5. At what number of projectiles does your system performs poorly? 100? 1000? 10000?
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
I based it on LosTacos physics engine. Me and my friend modified it heavily to fit our needs. We removed the 3d(you can still move projectiles in 3d, you just can't collide them in 3d) and added some support for guided missiles and lots of other stuff.

1. It's entirely in GUI, unfortunately. It makes it pretty easy to look through though, so it's not just a bad thing.

2. No repeating timers, but an infinite while loop with a wait 0 between each tick.

3. Hard to say. My friend did most of the implementation and after that it just kind of worked. There's been a lot of issues, sure, but most of them have been because of something else.

4. Right now, it's integrated with my map. If I just copied it straight out of there, it wouldn't make much sense. I did copy it out a couple of months ago to give it to a friend, and I even cleaned up some of the stuff that was specific for my map and put some helpful comments in. However, I never really finished it, so I don't know how well it works really.

We used a separate custom collision detection system, although it'd probably be better if that was done in the same system. Therefore, there's no real collision working in that map. I can post that map if you want, but I'm not sure how helpful it'll be.

5. It's hard to say. Cruiser Command is pretty demanding performance-wise, but there's a lot of other stuff running at the same time. It's managing the energy levels for all ships, collision, internal system, AI, etc. Still, I don't feel like it is the main cause of lag. Running 12 players with everything on, there's probably 200+ units that are moved by it + 100 projectiles at a time.
 

MissKerrigan

Active Member
Reaction score
23
When playing the game 'Nexus Wars' there are about 5000 units in game which will cause it VERY LAGGY
 

GFreak45

I didnt slap you, i high 5'd your face.
Reaction score
130
the programming that went into nexus wars was really bad to be honest, its just a simple tug of war map... and 5000 units isnt anywhere close to 200 units and 100+ projectiles
 

Siretu

Starcraft 2 Editor Moderator
Reaction score
293
Although it's an entirely different situation. Nexus wars use no custom movement or physics engine. They just create the units and order them to attack towards the nexus. My physics engine checks the velocity of all the units, several times each second, and move them accordingly.
 
General chit-chat
Help Users
  • No one is chatting at the moment.

      The Helper Discord

      Staff online

      Members online

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top