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.
  • Monovertex Monovertex:
    How are you all? :D
    +1
  • Ghan Ghan:
    Howdy
  • Ghan Ghan:
    Still lurking
    +3
  • The Helper The Helper:
    I am great and it is fantastic to see you my friend!
    +1
  • The Helper The Helper:
    If you are new to the site please check out the Recipe and Food Forum https://www.thehelper.net/forums/recipes-and-food.220/
  • Monovertex Monovertex:
    How come you're so into recipes lately? Never saw this much interest in this topic in the old days of TH.net
  • Monovertex Monovertex:
    Hmm, how do I change my signature?
  • tom_mai78101 tom_mai78101:
    Signatures can be edit in your account profile. As for the old stuffs, I'm thinking it's because Blizzard is now under Microsoft, and because of Microsoft Xbox going the way it is, it's dreadful.
  • The Helper The Helper:
    I am not big on the recipes I am just promoting them - I use the site as a practice place promoting stuff
    +2
  • Monovertex Monovertex:
    @tom_mai78101 I must be blind. If I go on my profile I don't see any area to edit the signature; If I go to account details (settings) I don't see any signature area either.
  • The Helper The Helper:
    You can get there if you click the bell icon (alerts) and choose preferences from the bottom, signature will be in the menu on the left there https://www.thehelper.net/account/preferences
  • The Helper The Helper:
    I think I need to split the Sci/Tech news forum into 2 one for Science and one for Tech but I am hating all the moving of posts I would have to do
  • The Helper The Helper:
    What is up Old Mountain Shadow?
  • The Helper The Helper:
    Happy Thursday!
    +1
  • Varine Varine:
    Crazy how much 3d printing has come in the last few years. Sad that it's not as easily modifiable though
  • Varine Varine:
    I bought an Ender 3 during the pandemic and tinkered with it all the time. Just bought a Sovol, not as easy. I'm trying to make it use a different nozzle because I have a fuck ton of Volcanos, and they use what is basically a modified volcano that is just a smidge longer, and almost every part on this thing needs to be redone to make it work
  • Varine Varine:
    Luckily I have a 3d printer for that, I guess. But it's ridiculous. The regular volcanos are 21mm, these Sovol versions are about 23.5mm
  • Varine Varine:
    So, 2.5mm longer. But the thing that measures the bed is about 1.5mm above the nozzle, so if I swap it with a volcano then I'm 1mm behind it. So cool, new bracket to swap that, but THEN the fan shroud to direct air at the part is ALSO going to be .5mm to low, and so I need to redo that, but by doing that it is a little bit off where it should be blowing and it's throwing it at the heating block instead of the part, and fuck man
  • Varine Varine:
    I didn't realize they designed this entire thing to NOT be modded. I would have just got a fucking Bambu if I knew that, the whole point was I could fuck with this. And no one else makes shit for Sovol so I have to go through them, and they have... interesting pricing models. So I have a new extruder altogether that I'm taking apart and going to just design a whole new one to use my nozzles. Dumb design.
  • Varine Varine:
    Can't just buy a new heatblock, you need to get a whole hotend - so block, heater cartridge, thermistor, heatbreak, and nozzle. And they put this fucking paste in there so I can't take the thermistor or cartridge out with any ease, that's 30 dollars. Or you can get the whole extrudor with the direct driver AND that heatblock for like 50, but you still can't get any of it to come apart
  • Varine Varine:
    Partsbuilt has individual parts I found but they're expensive. I think I can get bits swapped around and make this work with generic shit though

      The Helper Discord

      Members online

      No members online now.

      Affiliates

      Hive Workshop NUON Dome World Editor Tutorials

      Network Sponsors

      Apex Steel Pipe - Buys and sells Steel Pipe.
      Top