We're going to start the show with a callback to my tutorial on collecting player data where we first saw a CSVDownloader, here we see the script pop up again, and boy are we glad to see it. This script can download CSV's and convert them into any data type we desire and in this case that will be the TermData below.
Well well would you look at that! We are now approach by TermData, a cute little script that'll format our CSV data into something we can make sense of at runtime. Yes Yes Yes this is how we store the data at run-time but don't feel afraid to spice that up and edit it to fit your darkest desires!
To complete our runtime-loading-trifecta we have the final piece of the puzzle, the TranslationLoader which is ultimately responsible for sorting that CSV junk into our itsy-bitsy TermData trunk. And our first NEW NEW NEW script for this tutorial!
Hold the Phone Martha! What am I supposed to do with all this good-good data???? Well here you are handsome, a brand spanking new class dedicated to translating whatever nonsense we want to spew towards that player so we can be exactly sure they understand just how badly they got bAMBOOZE'D!
In the words of the late Henry Ford, "let's automate that shit!" This next sssssssssscript will subscribe any sister TextMesh component to a Translator delegate which can immediately propagate any changes to the user display language for the final tour de force de fucking delegate magic?? Can you say "lazy-load" five times fast???? YEah BUDdy!
The Singleton helped us to obtain any service which derived from it. However we would prefer that every script not be a singleton. Instead we can make a singleton service whose job is to find other serviced! This script is called the Service Locator. It simply caches a reference to any Monobehaviours that are requested from it.
This script ensures that the rect transform of a VerticalLayoutGroup is sized proportionate the the number of children it has.
VertLayoutScalar.cs
This script ensures that a rect transform is sized to fit within the bounds of its parent.
BoundToParent.cs
This script updates a rect transform's location to follow another transform.
FollowTransform.cs
Paste this text into the "Add a New Format" section: https://www.maximumverbosity.net/twine/Entweedle/format.js
Step 2 of 2: Create a simple dialogue parser
Now that the twine data is in a clean format we can easily write a dialogue parser for Unity. I have included my solution below which includes two files. DialogueObject.cs defines the Node, Response, and Dialogue objects which use OOP to represent the story's text and links between nodes. DialogueController.cs defines methods to direct the dialogue system as your game runs, it also has a public event that your display classes can latch onto.
Dialogue Object.cs
Note: Entweedle changed their export format since writing this tutorial so please refer to this code for the parsing method:
Dialogue Controller.cs
Good Luck!
Now you can create your own user interface to show a branching narrative in your game. I thought it would be beneficial to show you my implementation for the game 22nd Street Traffick (playable here: mrventures.itch.io/22nd-street-traffick ) DialogueViewer.cs
After all my interviews (especially the ones in which I failed) I wrote down what one would have needed to know in order to answer the questions. This guide is not a tutorial, it's not here to teach you. It's to recall topics, help memorize formulae, and maybe serve for quick reference during a phone interview or on the job itself.
Hope it helps you!! Oh and I made some videos to walk you through it if you're into that. Good luck out there.
My Offers
Zynga (software engineer, intern): Offered: $32/hr with a $1500 after-tax housing stipend Accepted: offer unaltered Tilting Point (game design, intern): Offered: $11.25/hr Countered: $20/hr with a monthly $1200 after-tax housing stipend Accepted: $14.75/hr NCsoft (software engineer, intern): Offered: $30/hr Accepted: offer unaltered Facebook (software engineer, intern): Offered: $8,000 monthly stipend with company provided housing Accepted: initial offer unaltered Hangar 13 (software engineer, intern): Offered: $25/hr with company provided housing and a two-way flight Accepted: $25/hr with a housing stipend and a one-way flight Sony Santa Monica (gameplay engineer, intern): Offered: $30.25/hr with a sign-on bonus of $5500 (pre-tax) to cover housing and relocation Countered: the above but with a GDC pass Accepted: initial offer unaltered Manticore Games Offered: $30.00/hour Countered: $30.00/hour with $2,000 after-tax housing Accepted: $32.00/hour, round-trip flights, lunches catered Epic Games, Fortnite Offered: $30/hr, round-trip flights, Housing covered, Catered Lunches Accepted: initial offer unaltered |