Main      Site Guide    
Message Forum
SOAT update #18 - Year 2
Posted By: gremlinn, on host 24.25.220.173
Date: Friday, February 15, 2002, at 13:58:42
In Reply To: SOAT update #17 posted by gremlinn on Monday, February 4, 2002, at 22:31:01:

> 37 locations, 319150 bytes (8625 per location) [3/25/01]
> 54 locations, 438797 bytes (8126 per location) [4/08/01]
> 80 locations, 573649 bytes (7171 per location) [4/30/01]
> 95 locations, 794677 bytes (8365 per location) [5/21/01]
> 115 locations, 949191 bytes (8253 per location) [6/06/01]
> 132 locations, 1105293 bytes (8373 per location) [6/15/01]
> 145 locations, 1259378 bytes (8685 per location) [6/25/01]
> 152 locations, 1470894 bytes (9677 per location) [7/08/01]
> 155 locations, 1598537 bytes (10313 per location) [7/23/01]
> 158 locations, 1746880 bytes (11056 per location) [8/14/01]
> 166 locations, 1809922 bytes (10903 per location) [9/25/01]
> 179 locations, 2018080 bytes (11274 per location) [10/18/01]
> 209 locations, 2188235 bytes (10470 per location) [11/08/01]
> 220 locations, 2316166 bytes (10528 per location) [11/30/01]
> 285 locations, 2605419 bytes (9141 per location) [12/19/01]
> 296 locations, 2794886 bytes (9442 per location) [1/27/02]
> 301 locations, 2891546 bytes (9606 per location) [2/4/02]
>

So here it is, one year after I started writing SOAT. The latest numbers: 304 locations, 3038874 bytes (9996 per location). If you include OAT, I've kept pretty close to 10kB per day in the long run. I figured that when I eventually have a job, I'll be able to still average at least 5kB per day if I really tried. No matter what, it will be done eventually.

AGLL TECHNIQUE #1: DELAYED EXECUTION

Here's an AGLL coding technique that might be useful to people currently making games: say that you have two (or possibly several options) in which a huge chunk of text gets displayed to the player, and it's the same text for each option. Rather than copying that text into each option code block (like this...)

* 1 Select option 1.
---p Huge paragraph(s) of text...
* 2 Select option 2.
---p Huge paragraph(s) of text...
* 3 Select option 3.
---p Huge paragraph(s) of text...

...you can get away with only writing it out once by putting the "p" command outside all the option code blocks. You just have to make sure it doesn't get executed unless you've *just* selected one of those options on the previous turn. For example, if v0 is your temporary use variable:

c v0=1
---p Huge paragraph(s) of text...
---v 0 = 0
* 1 Select option 1.
---v 0 = 1
* 2 Select option 2.
---v 0 = 1
* 3 Select option 3.
---v 0 = 1

Another time you'd want to do this, and believe me when I say I've already used it dozens of times in SOAT, is when you want additional text to be displayed in the action description upon entering a location with a certain condition (and sometimes you can enter locations from many different directions). The conventional way to do this would be to add "P" blocks in *every* movement option that moves to a given location in *every* adjacent location, but you can just do a similar thing with your temp variable to cut down excess code (read the curly braces as HTML tag angle brackets):

~~~Location "loc1"~~~
c v0=1
---P {p}Immediately you are shocked to see...
---v 0 = 0
. Area description

...(location options)...

~~~Location "loc2"~~~
. Area description
^ 1 Go north.
---p You open the door and step outside the house.
---c v13>9
------v 0 = 1
---g loc1
^ 2 Jump through the window.
---p You jump through the front window, sending glass shards all over your lawn, but you are injured. You stand up and survey the damage.
---c v13>9
------v 0 = 1
---g loc1

...(other location options)...


~~~Location "loc3"~~~
. Area description
^ 1 Go west.
---p You head west along the path, and after an abrupt turn your house comes into sight.
---c v13>9
------v 0 = 1
---g loc1

...(other location options)...


In the above example, v13 reaching 10 triggers something to happen in the front yard of your house...something you'd want to alert the player to *immediately*. You could just put it in the area description, but I think it's a better effect to put it right in the action that brought you there. You can see how the appended text starting with "Immediately" gets tacked on upon entering that location from three different options in two adjacent locations, and it should naturally link up to whichever "p" text came before it. Depending on how complicated your game design gets, you may *have* to use a scheme like this to make things manageable, for example, if *any* option chosen in a location causes some huge chunk of code to be executed.

Of course, you can use this delayed execution technique to do other things, such as setting many variables at once. This is what I *should* have done with the timer puzzle in OAT and the mine cart puzzle in POAT, puzzles which had a variable decrementation block that executed *every* time the location code executed, and not just in controlled circumstances.

I hope this helps for some of the other people making/planning to make AGL games.

Replies To This Message

Post a Reply

Note: If you are posting a hint request for Adventure Games Live, be sure to specify which game you are talking about and list your inventory so other players know where you are in the game.

RinkChat Username:
Password:
Email: (optional)
Subject:
Message:
Link URL: (optional)
Link Title: (optional)

Make sure you read our message forum policy before posting.