Question on Traceline Systems

Mindless

New Member
Reaction score
4
Hi everyone,

I'm trying to make a FPS shooter game in SCII Editor. I want to create a system that processes unit's missiles and moves them accordingly. For example, I want to create a Rocket Launcher that is able to launch missiles and make it explode upon the first thing it hits, and shotgun bullets that travel at infinity speed, so it will just instantly hit anything in the direction it is going.

Can anyone help me start this, like giving me some concepts to start thinking about? Or introduce me to a good tutorial on this subject?

Any help would be appreciated.
 

Sensang

TH.net Regular
Reaction score
7
Hi everyone,

I'm trying to make a FPS shooter game in SCII Editor. I want to create a system that processes unit's missiles and moves them accordingly. For example, I want to create a Rocket Launcher that is able to launch missiles and make it explode upon the first thing it hits, and shotgun bullets that travel at infinity speed, so it will just instantly hit anything in the direction it is going.

Can anyone help me start this, like giving me some concepts to start thinking about? Or introduce me to a good tutorial on this subject?

Any help would be appreciated.

if its supposed to be multiplayer, forget it cuz sc2 has 125ms minimum lag and a lot more if you play with more complex triggers. :banghead:
You have to add a behavior to the missiles that searches for nearby units every x (i think the least is something about 0.125) seconds, and when it found one it will destroy itself and damage the unit accordingly. > data editor
I think the proper way to do the targetting is by making the unit use an ability, targetting the point where your left or right mouse button (whichever fires the shot) just clicked. > trigger editor

Also possible to do it with more triggers and less data editor...

all in all thats a pain in the ass to do within sc2... unless theres something we dont know or theyre yet to release, dont put your hopes up. :nuts:

thats probable as far as you can get: http://www.thehelper.net/forums/showthread.php?t=150786&highlight=first+person+shooter
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Now to get things straight:

The minimum lag you're talking about doesn't really have anything to do with triggers itself. It's input lag. That means it takes a certain time to convey your mouse/keyboard input to other players in the game. Until that has happened things won't start.
This lag is present in any game and heavily depends on the players and server. It's true that Battlenet enforces a minimum lag time though, which is used relieve the servers a bit.

I think what you want to say is the length of a game tick, so the minimum time a Wait command sleeps a trigger (because that's what's needed to make a smooth missile).
This minimum time is 0.0625 (unless you use a small bug) - and Data has the same implications. Minimum wait time on persistent behaviors is 0.0625 too.

I only know of one advanced tutorial for tracelines in custom script, but the concept is pretty easy.

JASS:
Local Variables:
    Missile = no unit <unit>
    MissileIsAlive = true <boolean>
    Angle = 0 <real>

Actions:
    Set Angle = Facing angle of Firing Unit
    Set Missile = Your new missile
    Set MissileIsAlive = true
    While:
        - MissileIsAlive == true
    Do Actions:
        If:
            Or:
                - (Missile) is dead
                - Number of enemy units in range of 0.5 of Missile greater than 0
        Then:
            - Set MissileIsAlive = false
            - Detonate missile!
         Else:
            - Set Position of Missile to Position of Missile shifted by 0.1 facing Angle
            - Wait 0.0 seconds


In words:
As long as the missile is alive we check if there are any enemies in close proximity of the missile. If yes then we detonate it. If not then we move the missile a little bit towards the direction the shooter was looking at and wait a little bit.
(waiting 0.0 seconds actually makes the game wait 0.03125 seconds, which is as low as you can go). To make the bullet go instatly you can just remove the Wait time completely.
 

Sensang

TH.net Regular
Reaction score
7
input lag? Well how come shooter games dont really have it?
Maybe its not the minimum lag. But then something else about the editor is fucked up in a way that makes it impossible to create a multiplayer shooter game.
0.0625 seconds means a maximum lag of 63ms.
maybe its them both added up together. But 125ms minimum lag is still crap...

Set Angle = Facing angle of Firing Unit

doesnt that mean it wont fire up? wouldnt matter if it was some 2D arcade game but wont work for a real shooter-like game.
 

Builder Bob

Live free or don't
Reaction score
249
input lag? Well how come shooter games dont really have it?

Because the games just display things differently.

In shooter games it is common to have the client act on your input right away and adjust what other people see later on. To make it look like other players walk smoothly, you client will assume they continue walking, even if it can't be certain. You might have seen players suddenly jump from position to position with seemingly no coherence. This can only happen because assumptions has been made that did not come true due to high latency.

Starcraft on the other hand makes sure what everyone sees is syncronized at all times. Every computer in a game has to recieve what one player does before the command is carried out. While this doesn't give you as tight control in games where you control one character, it is better for strategy games so you don't have units jump around.
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
input lag? Well how come shooter games dont really have it?
Maybe its not the minimum lag. But then something else about the editor is fucked up in a way that makes it impossible to create a multiplayer shooter game.
0.0625 seconds means a maximum lag of 63ms.
maybe its them both added up together. But 125ms minimum lag is still crap...



doesnt that mean it wont fire up? wouldnt matter if it was some 2D arcade game but wont work for a real shooter-like game.

There IS a minimum lag on battlenet and I think it's 125ms unless they've changed it again.
However, that lag is created because your input has to be sent to every other player (thus input lag). Triggers and Data indirectly suffer from that but ONLY if they're triggered by any player's input (e.g. pressing a button).
Directly Triggers and Data are only limited by the 0.06125s game tick. But for some reason they skip every second tick, making it 0.125s instead.

And yes, using the facing will make the missile not shoot up or down. If you want that you can use a vector (x,y,z position) or you can save th up/down angle seperately.
It's just a bit of math.
 

Sensang

TH.net Regular
Reaction score
7
Because the games just display things differently.

In shooter games it is common to have the client act on your input right away and adjust what other people see later on. To make it look like other players walk smoothly, you client will assume they continue walking, even if it can't be certain. You might have seen players suddenly jump from position to position with seemingly no coherence. This can only happen because assumptions has been made that did not come true due to high latency.

Starcraft on the other hand makes sure what everyone sees is syncronized at all times. Every computer in a game has to recieve what one player does before the command is carried out. While this doesn't give you as tight control in games where you control one character, it is better for strategy games so you don't have units jump around.

Id actually very much prefer the shooter way for strategy games... due to the fact that every unit gets ordered to do stuff there shouldnt be that much of a problem predicting units' path.
the input lag kind of means, you actually cant do things as fast as you can offline.
The other way around, lets call it output lag, seems like a better way to go.
But there are a lot of things blizzard screwed up especially about custom maps... guess we have to live with it :banghead:

Nevertheless. The most important thing is:

Multiplayer FPS/3PS arent viable within sc2
 

s3rius

Linux is only free if your time is worthless.
Reaction score
130
Actually the shooter way for Sc2 would be TERRIBLE. Predicting units' paths obviously isn't hard when you know their destination. But when you issue new orders to a unit you CHANGE the destination and thus the path.

Look at this image:
http://simplest-image-hosting.net/png-0-unbenannt49

This is how the shooter way works:

Image 1)
A unit (the circle) is assigned a location it should move to (the X) and starts moving.

Image 2)
While moving the unit gets a new target location (the red X) issued by the player. The new order is sent to all clients (= players in the game).

Image 3)
The new target order hasn't reached the other players' computers yet. Because of unit prediction the unit continues to walk towards the original target.

Image 4)
Now the order has reached the players' computer and calculates the unit's new position by looking at when the order was issued, where the unit should have been at this point and where it's supposed to go.
The result: The unit suddenly "teleports" from one place to another.

Targeting enemy units would be much harder and would create a lot of strange behavior (missiles suddenly flying in arcs, medivacs healing units which are way too far away in reality, etc etc).

Even worse:
Since the player who actually lags isn't affected by this, but only OTHER players we'd get a lot of cheaters who'd use up all their bandwidth by downloading/uploading something and abuse their "stuttering" to make it almost impossible to place spells/target units.

And the way information is processed and passed around would also allow hackers to develop new hacks.

Also: Input lag isn't a result of the way they did it. Input lag is ALWAYS there. It'd just get lower by using the "shooter method" but it wouldn't disappear.
 
General chit-chat
Help Users
  • No one is chatting at the moment.
  • Varine Varine:
    Which is unique I guess.
  • The Helper The Helper:
    Actually I was just playing with having some kind of mention of the food forum and recipes on the main page to test and see if it would engage some of those people to post something. It is just weird to get so much traffic and no engagement
  • The Helper The Helper:
    So what it really is me trying to implement some kind of better site navigation not change the whole theme of the site
  • Varine Varine:
    How can you tell the difference between real traffic and indexing or AI generation bots?
  • The Helper The Helper:
    The bots will show up as users online in the forum software but they do not show up in my stats tracking. I am sure there are bots in the stats but the way alot of the bots treat the site do not show up on the stats
  • Varine Varine:
    I want to build a filtration system for my 3d printer, and that shit is so much more complicated than I thought it would be
  • Varine Varine:
    Apparently ABS emits styrene particulates which can be like .2 micrometers, which idk if the VOC detectors I have can even catch that
  • Varine Varine:
    Anyway I need to get some of those sensors and two air pressure sensors installed before an after the filters, which I need to figure out how to calculate the necessary pressure for and I have yet to find anything that tells me how to actually do that, just the cfm ratings
  • Varine Varine:
    And then I have to set up an arduino board to read those sensors, which I also don't know very much about but I have a whole bunch of crash course things for that
  • Varine Varine:
    These sensors are also a lot more than I thought they would be. Like 5 to 10 each, idk why but I assumed they would be like 2 dollars
  • Varine Varine:
    Another issue I'm learning is that a lot of the air quality sensors don't work at very high ambient temperatures. I'm planning on heating this enclosure to like 60C or so, and that's the upper limit of their functionality
  • Varine Varine:
    Although I don't know if I need to actually actively heat it or just let the plate and hotend bring the ambient temp to whatever it will, but even then I need to figure out an exfiltration for hot air. I think I kind of know what to do but it's still fucking confusing
  • The Helper The Helper:
    Maybe you could find some of that information from AC tech - like how they detect freon and such
  • Varine Varine:
    That's mostly what I've been looking at
  • Varine Varine:
    I don't think I'm dealing with quite the same pressures though, at the very least its a significantly smaller system. For the time being I'm just going to put together a quick scrubby box though and hope it works good enough to not make my house toxic
  • Varine Varine:
    I mean I don't use this enough to pose any significant danger I don't think, but I would still rather not be throwing styrene all over the air
  • The Helper The Helper:
    New dessert added to recipes Southern Pecan Praline Cake https://www.thehelper.net/threads/recipe-southern-pecan-praline-cake.193555/
  • The Helper The Helper:
    Another bot invasion 493 members online most of them bots that do not show up on stats
  • Varine Varine:
    I'm looking at a solid 378 guests, but 3 members. Of which two are me and VSNES. The third is unlisted, which makes me think its a ghost.
    +1
  • The Helper The Helper:
    Some members choose invisibility mode
    +1
  • The Helper The Helper:
    I bitch about Xenforo sometimes but it really is full featured you just have to really know what you are doing to get the most out of it.
  • The Helper The Helper:
    It is just not easy to fix styles and customize but it definitely can be done
  • The Helper The Helper:
    I do know this - xenforo dropped the ball by not keeping the vbulletin reputation comments as a feature. The loss of the Reputation comments data when we switched to Xenforo really was the death knell for the site when it came to all the users that left. I know I missed it so much and I got way less interested in the site when that feature was gone and I run the site.

      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