Thursday, October 31, 2013

Level Editor Video - The Inside Scoop

Continuing the subject of my final post, right here comes a post about the creation of our most current video...

What we wanted to do in this video was to show how swiftly you can create something playable using our Level Editor. So we decided to take 30 minutes to build one thing, use yet another ten minutes at most to do some gameplay scripting and then finally show it all in game.

To make it all viewable with out spending far more than 40 minutes watching a video we time lapsed it all down to about eight minutes. Although working on the video we also wanted to add a voice, describing what was going on, but it did not perform extremely properly. To make this appropriately, you need to create down what you want to say very first, then record and edit the material after the spoken text. So it got challenging to make a voice that would have sufficient time to properly say what was going on during the quite quickly level editing (due to the time lapse). As I was battling with this problem I had a chat with Thomas, who joked that I could "write it all in verse", which I thought was truly a pretty very good notion. Then I could have some voice speaking, producing the video much more intriguing but not require to be overly distinct in what is stated, so it could be a lot more freely added to the visual editing going on in the video.

It took me about 4-six hours to write the entire point for the full video and then one more two hours to record and edit the voice. Then I showed Thomas the video...

He got a bit worried, with great cause, that the video could give the wrong impression about the game. Is the game a parody on the horror genre? Or what is genuinely going on? So after some discussion we decided that we need to possibly skip the voice altogether and only add some nice music or else the video would go on consuming time we need to have to invest on the game!

To cut items short, here you have the final demonstration of our Level Editor! We have shortened it a bit, then removed the actual scripting component as we felt it looked more challenging than it actually is. But to give you all the goodies, at the bottom of the post you can discover the script with comments, to give you a view of the quantity of script necessary (and to show that a lot of gameplay is accomplished automatically by the objects in the game). I have also, for everybody's pleasures, added the original verse. It really is not structured correctly but hey let us call it free-type verse.

Have you got any inquiries about the editing or scripting of levels for Amnesia? Shout them out in the comments!

The Video (our first HD release!):

Gameplay Script:
As you can see, if we take away the comments (in green) it is a total of 19 lines of script code!

// This is the initial setup that is carried out when starting the level
void OnStart()

// Verify if Player enters the location called AreaExit, if so then do the CollideExit function
AddEntityCollideCallback("Player", "AreaExit", "CollideExit", true, 1)

// Check if Player makes use of any of the two keys on the desk or door if so do the UseKey function
AddUseItemCallback("usedesk", "key_desk", "desk", "UseKey", correct)
AddUseItemCallback("useexit", "key_exit", "mansion_1", "UseKey",accurate)

// A timer that will activate a function right after 120 seconds
AddTimer("enemy", 120, "TimerActivateEnemy")

// This says to play the music file 04_amb.ogg, that it ought to loop, play at volume 1, start with a 3 second fade, have a priority of and that it will resume where it ended if the music is stopped and played once again.
PlayMusic("04_amb.ogg", correct, 1, 3, , correct)

// Adds a quest for the player, escape is the name to use in scripts and XXVideo is an entry in the file that consists of all the text for Amnesia.
AddQuest("escape", "XXVideo")

// As this level is for testing, we give the player a lantern at the begin of the level
GiveItemFromFile("lantern", "lantern.ent")

// The timer function that is referred to as right after 120 seconds from start off of level
void TimerActivateEnemy(string &in asTimer)

// Slide the door open leading to the space with the enemy
SetMoveObjectState("door_1", 1)

// Activate the enemy
SetEntityActive("grunt_standard_1", true)

// Play an further sound to warn the player
PlaySoundAtEntity("enemyBoo", "notice", "door_1", )

// Give the enemy a patrol node so that he will commence to move into the huge room
AddEnemyPatrolNode("grunt_normal_1", "PathNodeArea_five", , "")

// Function for when using keys on the desk and door
void UseKey(string &in asItem, string &in asEntity)

// Set the entity(desk or door) to unlocked
SetSwingDoorLocked(asEntity, false, correct)

// Get rid of the item employed from the inventory

// Function triggered as player enters the exit location
void CollideExit(string &in asParent, string &in asChild, int alState)

// Show quest complete message, making use of XXVideo entry in the text file.
CompleteQuest("escape", "XXVideo")

// Change the map to 02_entrance_hall, player start off in location PlayerStartArea_1
ChangeMap("02_entrance_hall", "PlayerStartArea_1", "", "")

Without having additional ado, a Christmas carol just for you:

Jens I am, Frictional Games I curse you damn -
"Bastard from hell, don't force me to tell!"

"You greater sing it like a snake or else you won't get that cake!"

"OK, OK I will spill it all!"

You see, I got a call for the duration of the fall... a dude handed it to me "Man, what can you do in 30 minutes brief, using that editor of yours, I've heard its like snort?"

Lo and behold, I told. See you do it like this. Half an hour building the base, 666 seconds to script, not even taking a piss. To not bore you stiff, verify my time-lapse I am fast as a mastiff, spend consideration or get lost in yet another HPL dimension.

With sets of 3D tiles, even youngsters will get smiles. Effortless as copy that floppy a room is crafted, damn it may well even get you drafted. Walls, windows, ceiling and floor comes in distinct flavours we all can adore, combine as it unfold, see how I create a prime so gold. Press B to compound create, it will save you from getting late.

Feisty as they are, Entities of numerous sort makes the planet go round, what ever you can uncover, make positive to use them sound. At instances like these, a light or two will certainly brighten the mood, exactly where art thou tease of a candle? Shine upon my wood so I can tweak it additional, it can not look as if created by a vandal.

A bed or cradle to take a nap, drawers and a table, you know, we even have a horse steady. Crap! Thomas - damn you and your ideas, "create it in verse" your words gave me this curse! I hope the christmas sock has practically nothing but peas (this must rime with concepts).

It is all pre-configured, place it and you won't have to go figure. What the player can do, we have currently turned to our consideration, it works as I mention: Doors swing, drawers pull, boxes carry, if a berry discovered it can be eaten, it will even crunch as you munch.

Entities of light is ideal placed in the dark, it will show their suitable mark. Some gameplay they have, with the player about it can astound - as the Tinderbox comes to use, sort of like a fuse. Paintings, paper and books you could have them all on hooks, but let's place them all at their correct places: Walls so fine with a painting of mine, a desk is very best if placed beneath papers and pen, the book from the den fits perfect by the pillow, perhaps some thing about Willow? Exactly where did I place my glasses? Argh, it did not rhyme with places, it need to be time for tea, why these long faces?

Adding a chest for treasures to preserve, it is as safe as it is accurate that a mouse says "meep". A important for a puzzle and tinderboxes, just for the dazzle, place them all in. Remember though, it will cost you a dime if you want to get them back, not gooey in slime.

In a closet so modest, Santa will fall. We poked him with a stick, to truly make him tick. Locked behind a door he can't get out, but as I will later shout - we can script some unsafe code, letting him get out locating a node. Like bread crumbs Santa can comply with, the player far better hide in hollow or far better yet! Escape the area avoiding Santa's evil bloom.

Speaking of which, let's brighten it all up in a hitch. Spotlights in windows, shadows will cast, a gobo can be added just as quick. Size and colour adjusted with ease, we guarantee you do not need to lease a skilled. This has all been really visional, just one far more thing. We require glory fitting for a king, rays from the windows to shine upon the gory inner element of our very technical art. Tweak it back and forth, you can truly make it worth by adding particles as pretty in the light as pickles are delight.

Let's continue on and write that script or else Frictional will throw me down the crypt!

Music, oh music, my kingdom for some music. With 1 line of code, some music will load.

Add a timer that when 60 seconds pass, a Santa will get on your ass. Add a noise, to make positive the player has a option. I forgot it at this point, but later I will make the door open as although pushed by a spring joint.

With a handful of lines of code two keys of use will be. On a desk and a door each will see, that there is no stopping me. Writing code must be made with care, not like here - I wrote a lot but "SetSwingDoorLocked" would have created a excellent knot. Erase it all and do it suitable although standing tall.

An location we placed, to verify if the player is appropriately paced. If they collide, we must take it with pride, load a new level and finish the player's ride. Took it for a test. But swiftly noticed what a mess! Some final minute fixes, must make it all perform with no any trixes. A patrol route right here, a eliminate item there, it starts to feel polished, if only the player knows it all clear. As a cooking show on Tv, I prepared some text in a file that will make it all worthwhile, with a huge bong a quest is heard producing the player adhere to the herd. One minute the timer was short, Santa came out furious and picky, I had to boost the timer in a quickie.

And so the carol reaches the final location, the player's faith I won't even mention. Take a look, hope we got you on the hook!

No comments:

Post a Comment