WYRDYSM GAMES

Home of Battleships Forever
It is currently Wed Dec 13, 2017 2:59 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 10 posts ] 
Author Message
 Post subject: Turret Tutorial
PostPosted: Mon Apr 01, 2013 9:33 am 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 937
Location: Looking for angels in the Maze of the Dead.
Turret Tutorial
This tutorial is intended to teach someone new (newbie = you) how to make a functioning turret.

So, you have this ship. (It looks like crap, I know, this is only a demonstration)
Spoiler: show
Attachment:
SMscreen08.png
SMscreen08.png [ 2.19 KiB | Viewed 2095 times ]


You already made your big turret shape (sections, guns, and stuff). They are all attached to the blue section.

This blue section will be your driver. It is encouraged to use a round section as the driver, because it gives much greater control over your rotations.
The point that a section rotates around is where the parenting arrow points to in in the shipmaker. *Press "p" to hide or show parenting lines)

That's fine the way it is, now comes the part that is a little tricky. The dummy gun.
The dummy gun is an extra weapon with the sole purpose or guiding a turret.

This is how you make one.
Select the section that the driver section (blue) is parented to (the green one, that's why it's green).
With it selected, place a weapon of your choice on it. It will therefore be parented to the section that comes just before the driver itself in the parenting tree.

It has been placed with the parenting line still shown. The other weapons have also been moved to show their parenting lines.
All images have been magnified for clarity.
Spoiler: show
Attachment:
SMscreen09.png
SMscreen09.png [ 23.12 KiB | Viewed 2095 times ]


Now, select the blue section (the driver of the turret) and mover the mouse pointer over the "dummy gun". Right-click the "dummy gun" and select "set driver" from the menu that appears (It's near the center of all the options). A yellow-orange arrow will appear going from the driving weapon to the section.

The "dummy gun" is still a functioning weapon though. You will want to make it hidden and not fire. (You only want the turret to be firing anyway, right?) Select the "dummy gun" and go to the "Edit" tab in the upper left of the shipmaker. Set the weapon's "alpha" property to 0 (zero). This will make it invisible, but it still shoots, so now it must be disabled. Click the "ED2" tab just under the "edit" tab to open more options and parameters. Near the middle of the options you will see this.
Spoiler: show
Attachment:
Turret Tutorial 1.jpg
Turret Tutorial 1.jpg [ 157.28 KiB | Viewed 2095 times ]


Select the "Shooting: Enabled" option and set it to "Disabled. This will stop the dummy gun from firing.
Now, move the "dummy gun" over the center of the turret's driver (blue section). This will ensure that the "dummy gun" faces in the same direction at the same time as the turret itself. (It's more accurate this way)

The turret will now function correctly, but all the weapons will not fire together. If that's fine with you, that's all you need. If you want to get them to fire together, then continue.

Note: If the "dummy gun" is parented to the driving section or any of its children sections, it will not function correctly.


Synchronizing your turret's weapons.
With one of your turret's weapons selected, highlight the "dummy gun". Right-click it and select "set link". If it has been done correctly, a red arrow going from the "dummy gun" to the weapon that it will guide will appear. Repeat this for all of the weapons on the turret. Although the "dummy gun" does not fire, this just means that no projectile is generated. It still tries to fire, and that is why the linked weapons all fire when it "fires". They are linked to it, so they turn when it turns and fire when it "fires". The maximum turning (arc range) of the "dummy gun" will replace theirs.
If it points the wrong way, right-click the weapon that it is going to and select "clear link".

Here is an example that has been done correctly. (The "dummy gun" has been colored green just like the section that it is parented to and left visible.)
The yellow-orange driver arrow is really small, because the "dummy gun" is placed very close the the center of the section.
Spoiler: show
Attachment:
SMscreen013.png
SMscreen013.png [ 22.07 KiB | Viewed 2095 times ]


See how the front of the ship is turned, that is the turret functioning correctly. (The "dummy gun" is left visible in this image)
Spoiler: show
Attachment:
Turret Tutorial Ship.jpg
Turret Tutorial Ship.jpg [ 114.55 KiB | Viewed 2095 times ]


Advanced Techniques (Articulated Robot Arms)
Once you have learned how to set up a single turret on your own, you can try this technique.
You can link up several turrets together along different shapes in order to get parts of a ship to behave special ways, such as reaching out and firing a laser, making faces, or whatever your imagination and ingenuity can handle.

So I have added a large robotic arm to the test ship. (It's ugly as hell, but color coded for your convenience)
Spoiler: show
Attachment:
SMscreen020.png
SMscreen020.png [ 66.24 KiB | Viewed 2056 times ]

As in the previous tutorial, there are rounded sections to control the points of rotation. You can bury these on your own ships. It's best to "send to bottom" on each one, so it can be selected easily. The shipmaker selected the deepest buried section when hovering the mouse pointer over overlapping sections.

In the next step, "dummy guns" have been added to each normal section coming before a round one. Note that two have been added to the last normal section before the round sections, because there are two round sections attached to it.
Spoiler: show
Attachment:
SMscreen015.png
SMscreen015.png [ 69.91 KiB | Viewed 2056 times ]


In the next step, the round sections have been set to be driven (remember "set driver?") by the turrets that come before them in the section line. This way, it will behave correctly. Down worry about a section set up to be a turret having a previous section also set up to be a turret. It will function properly as long as each particular "dummy gun" is set up to "set driver" on the section that comes after it. In this case, those are the round sections.
Spoiler: show
Attachment:
SMscreen019.png
SMscreen019.png [ 76.67 KiB | Viewed 2056 times ]


Now, for accuracy, the "dummy guns" have been moved over each section that they are driving. They are still parented to the previous sections, so they are just floating over the round sections (They are supposed to be invisible anyway, right? So it doesn't really matter). Their "angle" parameter is also set to a number so that they face straight ahead (taking the angle of the arm into account for this). The sections in this particular arm are set to 30, so the "dummy guns" all have their angles set to 30 for now.
Spoiler: show
Attachment:
SMscreen018.png
SMscreen018.png [ 70.77 KiB | Viewed 2056 times ]


Now comes the tricky part, articulating the thing and getting it to work like an actual arm. Each "dummy gun" will be set up individually and referred to by the colored section that they are placed over.

We'll start with the "shoulder" round section (the red one).
When this "dummy gun" acquires a target, the arm will be rotated to where it faces. Assuming that it is supposed to attack things in the front of the ship, the arm will be straight up and down (blue straight section. See why this is color coded yet?). For it to be able to follow a target properly, it will need a little extra arc range. The weapon is at a 30 degree angle right now and when facing the front of the ship, it will be at a 0 degree angle. It will need at least a 30 degree arc range to compensate for this, but it should be given a little extra range in case the target moves towards the other side of the ship, so a 45 degree arc range will give it a little extra reach.

Having an arm just sticking straight up and down looks stupid though. To make the arm come forward a little more, we'll need to counterbalance the "dummy gun". The arm will turn further for if the "dummy gun" is set at an angle farther from the front of the ship. So instead of 30 degrees, it can be set to 40. And the 45 degree arch range from earlier can be increased by the same amount to compensate (55 degrees). That's it for the red driver section.

The next section is the "elbow" round sections (the orange one). It will be directly affected by the red one at the "shoulder". When it acquires a target, the orange "dummy gun" will automatically be moved to face the front of the ship, so the angle of the weapon doesn't really need to be changed here. The weapon is on the "hand", so the elbow will be one of the main ways that aims it. It is easier to just treat the "elbow" as you would a normal gun, giving it the desired arc range that you want. Don't make it too high or it'll ruin the look that we're going for. A 45 degree arc range will be a fair range of motion for this part.

Next is the "wrist" round section (the yellow one). This part can function like a normal turret does. The "elbow" will generally point it in the right direction, so the angle of this one doesn't really need to change either. You can set the arc range to whatever you'd like, but remember that the higher it is, the more unrealistic that it will look. A fair "wrist" arc range will be 45 degrees. This will mean that combined with the "elbow", it can bend and reach at 90 degree angles like a realistic hand can. That is it for this part.

The final part is the more difficult one, the "claw". (The green round sections)
The objective is to get the "claw" to open when facing something. The other parts will make sure that it faces a target, so that's taken care of. To open it, the round sections will have to rotate away from each other. This means, that to counterbalance this, the "dummy guns" will have to be facing more towards each other than they are right now. That way, when they target something, they will rotate towards the target. This will cause the green round sections to rotate in opposite directions, thus opening the "claw". Currently, they are set at 30 degree angles each. To get them to face more towards each other, just change the angles by opposite amounts. The "dummy gun" on the upper left section can have its angle decreased by 30 degrees, so it faces more towards the center. At the other side of the "claw", the lower right "dummy gun" can have its angle increased by 30 degrees to face more towards the center. Their new angles will be 0 and 60, respectively. This will make the "claw" open by 60 degrees (30 + 30). You will also want to give these "dummy guns" some extra arc range beyond the amount that they were rotated (30 degrees), so giving them a 45 degree arc range will be fair.

As a final measure to make sure that it has a good effect, you will want to put a weapon of your choice parented to the "palm" (the red section). Don't forget that they all started at 30 degrees, so set that weapon to that amount as well so it points straight. It would also help to link it to the "wrist". Set it up so that the red arrow points from the "wrist's" "dummy gun" to the weapon that you placed.

Here is the finished example. A pulse beam is used. The red section has been darkened so you can see the link arrow.
Spoiler: show
Attachment:
SMscreen021.png
SMscreen021.png [ 71.11 KiB | Viewed 2056 times ]


Here is the ship in the battlefield test.
Spoiler: show
Attachment:
BFscreen05.jpg
BFscreen05.jpg [ 230.58 KiB | Viewed 2056 times ]


Advanced Techniques (Snake Tails)
Once you have learned how to set up turrets on your own, you may notice that they sort of "drag" along as the ship turns. This can be exploited to create interesting tails and similar effects that depend on a ship's movement.
So here is the "snake ship". (Shut up, it's beautiful)
Spoiler: show
Attachment:
SMscreen027.png
SMscreen027.png [ 29.1 KiB | Viewed 2005 times ]


In the next step, "dummy guns" have been added to each section (blue) that comes before a round section (red). One section is hidden for this screenshot. Basically, it is like the robotic arm tutorial, but it is not intended to detect any enemies. Set the range of all of the "dummy guns" to a low number. If they detect an enemy, the tail will go completely straight when the "snake" faces and enemy. Each "digit" of the tail will also only bend a number of degrees equal to its "dummy gun's" arc range. Remember this.
Spoiler: show
Attachment:
SMscreen028.png
SMscreen028.png [ 28.32 KiB | Viewed 2005 times ]


They are then set up to drive the round sections that come after the section that they are parented to. This will make them "drag" behind the ship in a sequence. The gracefulness of the "tail" is dependend on the "dummy guns" turning statistic. The more below the ship's turning statistic that the "dummy guns" are, the greater the appearance of the "dragging" effect. Remember that too.
Spoiler: show
Attachment:
SMscreen030.png
SMscreen030.png [ 32.85 KiB | Viewed 2005 times ]


Finally, they are placed over the center of the driver arrow to hide it. (And it looks nice too)
Spoiler: show
Attachment:
SMscreen031.png
SMscreen031.png [ 26.39 KiB | Viewed 2005 times ]


Here is the "snake" ship in action as it is turning. The turning rate of the ship is 1 point higher than that of the "dummy guns" in the tail, so the bend is fairly drastic for this example.
Spoiler: show
Attachment:
BFscreen01.jpg
BFscreen01.jpg [ 92.2 KiB | Viewed 2005 times ]


Attachments:
File comment: Load in shipmaker and click "save sb4 and shp" to play with it in the game.
Tutorial Snake Ship.sb4 [4.57 KiB]
Downloaded 112 times
File comment: Load in shipmaker and click "save sb4 and shp" to play with it in the game.
Turret Tutorial Ship.sb4 [8.59 KiB]
Downloaded 114 times

_________________
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore, I can take requests or write a tutorial for someone.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.


Last edited by Zalausai on Sat Apr 06, 2013 10:47 am, edited 6 times in total.
Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Mon Apr 01, 2013 6:31 pm 
Offline
Rear Admiral
Rear Admiral
User avatar

Joined: Fri Jul 27, 2012 3:30 am
Posts: 974
Wow, nice going zal. Even I can understand it (and that's saying something).

_________________
Deus Est Mechanicus

Owner of 'The Novian Empire', a Delphinius Gulf Wars faction.
Fleet Version 1.8 is finally available for download!
http://www.wyrdysm.com/phpBB3/viewtopic.php?f=70&t=7081


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Mon Apr 01, 2013 6:44 pm 
Offline
Commodore
Commodore
User avatar

Joined: Wed Apr 07, 2010 7:12 pm
Posts: 718
Don't forget the articulated tail tutorial!

_________________
Blue Planet wrote:


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Mon Apr 01, 2013 8:16 pm 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 937
Location: Looking for angels in the Maze of the Dead.
calvin1211 wrote:
Don't forget the articulated tail tutorial!

I classify that as moving sections. I'll put it on the list of planned tutorials (advanced moving sections: tails and tentacles) to do.

_________________
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore, I can take requests or write a tutorial for someone.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Wed Apr 03, 2013 12:39 pm 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 937
Location: Looking for angels in the Maze of the Dead.
The articulated arm section of this tutorial is complete. However I cannot guarantee its quality, I did the best I could explaining this complex technique as simply as possible.

_________________
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore, I can take requests or write a tutorial for someone.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Wed Apr 03, 2013 7:42 pm 
Offline
Moderator
User avatar

Joined: Wed Mar 03, 2010 3:46 pm
Posts: 342
Location: sent milady ;)
The bit about the arm's "claw" is actually fairly ingenious and I must admit I've never thought of it like that. GJ on the tutorial.

If you need something else to do with turrets, you could write a tutorial on those section-based drones that follow their target. Could be interesting.


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Wed Apr 03, 2013 10:27 pm 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 937
Location: Looking for angels in the Maze of the Dead.
May I ask that you point out an example ship. I've never seen that done before, so I'll need a specimen to reverse engineer.

_________________
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore, I can take requests or write a tutorial for someone.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Thu Apr 11, 2013 2:08 am 
Offline
Lieutenant, Junior Grade
Lieutenant, Junior Grade
User avatar

Joined: Wed Mar 13, 2013 11:46 pm
Posts: 22
Location: Inside a black hole
Nice thing about the snake thingy!!

_________________
Something awesome is hiding in there!!
Spoiler: show
NOPE


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Mon Aug 26, 2013 10:10 pm 
Offline
Captain
Captain
User avatar

Joined: Wed Aug 14, 2013 5:24 pm
Posts: 263
Location: Indonesia
Sorry for necro, but could you post a download for the robotic arm tutorial ship?

_________________
The Comerlian Family


Dammit, didn't realize Starsector is really hard.


Top
 Profile  
 
 Post subject: Re: Turret Tutorial
PostPosted: Tue Aug 27, 2013 7:28 am 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 937
Location: Looking for angels in the Maze of the Dead.
That ship was lost as it was overwritten. However, the FS 01 Oblivion on page 25 of my ships page uses articulated arms.
viewtopic.php?f=2&t=6959&start=360

The "Darkness Ogre 2" uses them nearly exactly as they appear in the tutorial. It appears on page 12 (bottom of the page).
viewtopic.php?f=2&t=6959&start=150

_________________
Has written a series of tutorials for the newbies
Zalausai's Tutorial Index

Created: Elements of Discord, Heaven's Grace, and Hell's Last Battalion.

I stop in from time to time to check in on the community. Though I don't spend much time with shipmaker anymore, I can take requests or write a tutorial for someone.
Proud parent since: 8/15/2013 (Baby Boy)

Good shipbuilders never die . . . they just fade away.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC + 8 hours


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group