iigniteus logo About News Programming Websites

Slaaf Eiland / Collapse - 1.5

    Posted on July 26, 2017

    A "Water-ocolypse" or water apocalypse has occurred. After years the survivors have adapted and now live on islands and boats. Diving for supplies or pirating is the only way to survive. You play as a discarded slave who is just trying to stay alive in a world that is out to bury you 30 leagues under.

    Slaaf Eiland (Collapse 1.5) Asset Preview

    What I have done:

    • Created an easy to use item system that highlights items that are interactive, allows you to pickup items, displays item icons in the bottom left corner as you pick them up to confirm interaction and list how much of each you grabbed.
    • A questing system with some options on how to complete: reach a point, collect certain items, or complete a certain number of quests.
    • A boat editing system: Place planks down in desired pattern around the mast and then you get to use that as your boat until you want to add more items or change it up.

    What I learned:

    • Creating unique prefabs in game and saving them.
    • How to make "interactive item system"
    • How to select items in game within a spherical radius and shade/highlight them.
    • How to make reflective waves and water.
    • How to make sound come from a certain 3D point.

    Questing System

    Different types of quests programmed so far

    • Collection quests:
      • To create all you need to do is call createCollectionQuest. The parameters are amount(int) and type(string).
    • Kill enemy quests:
      • To create all you need to do is call createKillQuest. The parameters are amount(int) and type of enemy(string).
    • Reach location quests:
      • To create all you need to do is call createLocationQuest. The parameters are location(Vector3 of a predetermined location) , name(string), and enable(bool pre-set to true).
        • Enable is for if you want to add a location quest to be added to the log but if you want it to only be achievable after something else is done.

    Once you have created the number of quests you want at that particular point in time just call createSetQuest(no parameters) and it will apply it to the quest log and organize everything.

    Boat Design

    This is still being worked on and is still kinda wonky.

    • Design:
      • When you start you will begin with 4 pallets in the middle, this is where the mast will be since boats need it in the middle so it doesn't tip the boat. The wheel will also be located by the front of this.
      • Boat Creation:
        • There are 8 options to configure
        • Plank:
          • This is the basic Pallet template. If you want a unique base for your boat you can replace it here.
        • Ghost Plank:
          • This is the holder for the game object that will follow the mouse. It needs a rigid body. If you plan of changing the base for the boat replace this here as well.
        • RB
          • Leave empty, this might be removed.
        • Planks:
          • Size:
            • The max amount of objects that can be put in the prefab.
          • Element:
            • A game object that will be set into the boat prefab once it is completed. You can assign any game objects here that you want them to start out with.
        • Boat Parent:
          • This will be the parent for the new boat prefab
        • Prefab:
          • This is where the boat will be saved so it can be used over and over even after the game is closed.
        • Camera:
          • The camera for the scene, you can adjust the angle and placement in the game object itself.
        • Do Window:
          • Enable the window that allows you to reset or complete the prefab.

    Interactive Items

    Different types of interactive items programmed so far and how to use them:

    • Keys:
      • Each key is assigned the "Interactive Item" script and the "IIGrabKey" script. It has 3 options to configure.
        • Who holds the key:
          • Useful for multiplayer where players can aquire other players keys on death or theft.
          • Also useful to assign to npcs to keep them out of certain areas, allow acces to areas, or to give the player through theft or on death.
        • What number the key is assigned to:
          • Prevents players from collecting duplicate keys. Thats a problem for multiplayer games where one player collects all keys for a area and locks himself or others in it.
        • What door it unlocks
          • Well keys need things to unlock right? Usable for one door or a predetermined prefab
    • Doors:
      • Each door is assigned the "Interactive Item" script and the "IIDoorScript".  It has 3 options to configure.
        • Locked:
          • Lock it if you plan on using a key or unlock after an event. If you want it to start unlocked then leave it unchecked and set the door number to 0 to leave space for keys.
        • Door number:
          • Assign the door to a key by using a number. Ex key number 1 unlocks all doors assigned to 1.
        • Pivot:
          • Assign the parent of the door to set where it needs to rotate around. Pretty basic and doesn't usually need to be tweaked, just leave it assigned to the parent in the prefab.
    • Item:
      • Each door is assigned the "Interactive Item" script and the "IIPickItem".  It has 3 options to configure but leave the first two alone unless you know what your doing.
        • Type:
          • Size:
            • If you have more than one thing to add to your inventory set the size to that many.
          • Element:
            • Just the name of the element your are collecting. You can assign a random amount to collect in the script itself. I will add in a simple interface soon.

    Every interactive item needs to be assigned with the interactive script and also have the II tag. If your script is not working make sure the tag is set, if you don't it will be a long debugging process.
    The interactive script itself 

    • It has 5 parameters that can be worked with.
      • Fade time:
        • You don't really need to adjust this. This is the time it takes to reset the texture after you use the scan ability. I recommend just leaving it at 0.
      • Shiny mat:
        • If you plan on using the scan ability then this is what the item will replace its texture as. The default texture is a golden yellow.
      • Normal mat:
        • If you do use the scan ability make sure to set your normal texture in here. The script will reset it to this after scan has faded.
      • Instruct sprite:
        • You can assign an image to this item. When scan is used it will show the 2D image in this slot. It can be used to show the key used to interact with this sprite. Useful if you have different keys to open doors, climb ladders, or interact with other stuff.
      • Script to enable:
        • The most important part. This is the script slot you use to assign the interactive script to go along with this(Ex. keys script, door script, and vendor scripts.). Make sure that the script is assigned to the same prefab and disabled.
    • Scanning
      • Any nearby items to the player in a set able radius is highlighted with its shiny mat and the instruct sprite is also shown. This ability is also tied to one of the UI pieces that will drain the longer you use it. Once drained it will slowly recharge, while it is recharging if it was fully drained then you can not use it. There is also an option to darken the edges of the screen as if you were focusing or channeling the scanning ability, this is currently turned off(it has to be enabled in the script).

1385164 Orig 6269935 Orig 7822172 Orig