WYRDYSM GAMES

Home of Battleships Forever
It is currently Wed Aug 20, 2014 10:38 pm

All times are UTC + 8 hours




Post new topic Reply to topic  [ 4 posts ] 
Author Message
 Post subject: Simple Drone Tutorial
PostPosted: Wed Apr 17, 2013 10:11 am 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 931
Location: Looking for angels in the Maze of the Dead.
Simple Drone Tutorial

This tutorial will teach a shipbuilder how to create a simple drone-type object. It is essentially a section of the ship that is launched outward and fights for you.
This tutorial will require you to read and understand the Advanced Documentation, specifically about triggers and moving sections.
This will do until a newbie-friendly version is created.
It is also necessary to understand Turrets

So, we have our Tutorial ship (You should know how they look by now, like crap)
Spoiler: show
Attachment:
Drone Tutorial 1.png
Drone Tutorial 1.png [ 30.81 KiB | Viewed 590 times ]

All the pieces are laid out in the proper parenting relationship. Note the pattern. Round turret section, base section, round turret section, base section, etc. Each base section has a "Dummy gun". This will allow them to manipulate the "Drone" after it is "launched". Recreate it as shown.

Give each "dummy gun" a round section to drive. The center one will drive the first round section. This will put the "drone" in that direction near an enemy. The second one will keep the "drone" in front of the target ship. The third one will control the "drone's" positioning to face the target at all times.
Spoiler: show
Attachment:
Drone Tutorial 2.png
Drone Tutorial 2.png [ 30.93 KiB | Viewed 590 times ]


Each square section has triggers.
Spoiler: show
Attachment:
Drone Triggers.jpg
Drone Triggers.jpg [ 216.37 KiB | Viewed 590 times ]

These are simple. Just copy them as shown into each square section. Their functions are explained below.
Trigger 1: When the weapon acquires a target, the section will move itself to a certain point.
Trigger 2: When the weapon loses its target (or the target dies), the section will return to its starting point.

However, each section and turret will need to be configured individually (articulated robot arms: deja vu)
Each turret will have to have a 180 degree firing arc to make sure the drone functions properly.

The turret attached to the center of the ship is the "Launch" turret. It's range determines the point at which your "drone" will "launch". (This one is 1500)
Each square section is "set on trigger 1" and "set on trigger 2" for this turret. Note the direction of the teal arrows.
Spoiler: show
Attachment:
Drone Tutorial 3.png
Drone Tutorial 3.png [ 32.61 KiB | Viewed 590 times ]


The first square section (Bottom) will move outward a distance of half the range of the previous turret. Target Distance: 800
It needs to go out at an angle, so it doesn't overlap with the target. That would be retarded. Target Direction: 30
This will make it go out fairly far and at an angle to the ship's left. That's fine.

The first "dummy gun" (parented to the bottom square) is set an an angle of -60.
Since the section that it is on will be going to the left and outward, it will probably be to the side of the target as well. With the angle set to anticipate this (pointing to the ship's right and slightly ahead) it can place the "drone" slightly in front of the target.

The second square section (Middle) will ride along with the first. We need to get it in front of the target. Since the first if going off to the ship's left, it'll have to go to the ship's right instead. It is set up to go to the ship's right a distance equal to the Target Y of the first section.
Target Distance: 400
Target Angle: 270
This will keep it near the center of the front of the ship as it moves outward.

The second "dummy gun" (Parented to the middle square) will control the "drone" to keep it facing the target instead of putting it into position (that's taken care of by the previous sections and turrets). This one is facing the opposite direction (180). It doesn't really matter what direction that it faces, as long as it faces the same as the Target Angle of the following section. The range should be about half that of the previous turrets, so the "drone" doesn't get distracted.

The last square section (Top) will be the "Drone" itself. It should move outward a little from the previous setup to appear a autonomous. Just a little bit is okay for the look.
Target Distance: 100
Target Angle: 180 (Backwards)
It will launch back towards the ship (same as the second turret), but that is not really important, since the previous turret setup will spin it around towards the target anyway.

The last "dummy gun" (Parented to top square) will drive the "Drone" itself. It will choose the direction that the "Drone" shoots in. This one does not necessarily need a 180 degree firing arc like the others, but it does help out at times. Don't forget to put a weapon on the last round section that you intend for the "Drone" to actually use. Link it to the last "dummy gun" with the arrow going in the proper direction.


Now, hide all of them except the last round section and weapon (Don't forget to give them and the "dummy guns" some decent HP). This will complete the illusion of a "Drone" section. Alternatively, there is a particular sprite that makes things disappear (because it is entirely transparent), but they cannot be edited easily after that. That will not be covered here.
Spoiler: show
Attachment:
Drone Tutorial 4.png
Drone Tutorial 4.png [ 24.82 KiB | Viewed 590 times ]


Now, when you're all done with testing and programming this particular "drone", put the first round section (highlighted in image 5) under the "dummy gun" that is in the center of the ship. All of the other sections, "dummy guns", and parts of the 'drone" system can be hidden under another section of the ship. It looks neater to put them all in the same coordinates, so it looks very clean overall. (Image 6)
Spoiler: show
Attachment:
Drone Tutorial 5.png
Drone Tutorial 5.png [ 29.37 KiB | Viewed 590 times ]

Attachment:
Drone Tutorial 6.png
Drone Tutorial 6.png [ 17.78 KiB | Viewed 590 times ]


Here is the Test ship in the sandbox with a functioning "drone". It is still choppily animated compared to the original specimen, but it has been simplified.
Spoiler: show
Attachment:
Drone Test Finale.jpg
Drone Test Finale.jpg [ 211.62 KiB | Viewed 590 times ]


Drone Test has everything laid out for editing and viewing (Still at alpha 0 though)
Drone Test 2 has everything hidden under the wing of the ship. (Image 6)
Attachment:
Drone Test.zip [17.08 KiB]
Downloaded 34 times


Original Specimen
Spoiler: show
Drone Demo

Anonymous wrote:
Demo 1 has all the "controller" sections visible so you can select them in SM. If you want to "unfold" them, go into preview mode (F11) and press W.

Demo 2 has everything as it should be: replaced with the blank sprites from the Repack


This tutorial was much more complex than most of my normal work. Please report any errors to me via PM so that I can correct them.
Zalausai

_________________
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 Thu Apr 18, 2013 1:54 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Thu Apr 18, 2013 4:39 am 
Offline
Vice Admiral
Vice Admiral

Joined: Mon Jan 21, 2008 4:34 am
Posts: 1270
Location: Halifax, Canada
Nicely done, when this came out I went through the trouble of figuring it out, so I know how much work it takes.
A couple things:
I may be wrong but I believe it was Eri Erin who made this, so the quote from Anonymous should probably be attributed to him.
Also, to make the section unshootable and invisible, he used a sprite that was all one colour. Since BSF takes its transparency colour from the top left pixel, this meant the whole thing was transparent.
Great stuff though, well written and it actually makes a difficult topic quite easy to understand.

_________________
My Random Very Old Ships, Fleets, and Links to Other Ships and Fleets
My (Not Particularly) New Ships
My New Encounters - C&C Wanted


Top
 Profile  
 
PostPosted: Thu Apr 18, 2013 1:57 pm 
Offline
The Tutorialist
The Tutorialist
User avatar

Joined: Tue Feb 12, 2013 11:42 am
Posts: 931
Location: Looking for angels in the Maze of the Dead.
I fixed some typos and removed credit to the specimen. Credit will be rewritten when I can confirm who it came from.
Thanks for your support.

_________________
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  
 
PostPosted: Thu Apr 18, 2013 8:51 pm 
Offline
Moderator
User avatar

Joined: Wed Mar 03, 2010 3:46 pm
Posts: 338
Location: sent ;)
bretty good :DDDDD

I'm not quite sure it's a simplification, since (if I'm not mistaken) you've added two extra turrets that weren't there in the original. But you've put it in a properly followable tutorial form and that's great.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 4 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:  
Powered by phpBB® Forum Software © phpBB Group