Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
Tags

Thanks Luminy and Similia :) I'm glad you like.

I've been working hard on this game for the Myst Jam, and it's already a week since I started. There are only 3 days left and still a lot of work! That's tough, but I like it.

In my previous post I have shown how the graphics were prepared for the 360° views. Earlier, I have shown the interface of Adventure Maker. Now let's go a little further: how do I script the game? Don't worry I'll choose a very simple example. It's just to write a few lines of VBscript (Visual Basic), and show how easy it is in Adventure Maker.

First, let's imagine that we are in the first view of the game (from above). We turn the head around, and find a kind of notebook (a small computer device). The first time that we see it, it is closed, like this:

Let's call it (above) Frame1_closed.

Of course we can click on it, and it opens. We will call this other one (below) Frame2_opened:

Then we go back to the first view of the game (the panoramic 360), and when we come back and click again on the notebook, we want it to be already opened (Frame2), because we leaved it opened in our last visit. This is only possible if we define a variable. So in Adventure Maker I create a variable named Notebook_opened.

This variable can have 2 states, 0 or 1. If the variable Notebook_opened is set to 0, then the notebook will show closed (the game displays Frame1_closed). On the contrary, if the variable is set to 1, then the notebook will show opened (the game displays Frame2_opened). It is very easy, there are only 2 possible states. 0/1 for closed/opened.

How does it translate in Visual Basic? First let's write this script again with our own words:

1 - Go to the frame where the notebook is closed (Frame1_closed)
2 - If the notebook is closed, then open the notebook (change the variable Notebook_opened from 0 to 1), or the contrary
3 - Go back to the 360 panorama.

When we have these steps defined and know exactly what we want to do, it's easy: we only need to translate our words in Visual Basic language. Even if you don't know Visual Basic, Adventure Maker comes with a good documentation that allows to find easily the good code. This is the result:

1 _ Action.GoToFrame "Frame1_closed"
2 _ If Notebook_opened = 0 Then
_ Notebook_opened = 1
_ Else
_ Notebook_opened = 0
_ End If
3 _ Action.GoToFrame "360_Panorama"

And that's all. You can notice that at step 2 I have switched the value: if it was at 0 then it becomes 1, and if it was at 1 it becomes 0. As a result, we can open/close the notebook as much as we want in the game, and it is saved in memory.

There are a very lot of possibilities. You can look at the full list of language options in Adventure Maker here. For example :

Action.CreateTimedEvent 5, "Action.Message ""Amazing!""" 

will wait 5 seconds before it displays the text "Amazing". It's just a matter of syntax!