-
Notifications
You must be signed in to change notification settings - Fork 0
/
tutorial.txt
51 lines (43 loc) · 2.01 KB
/
tutorial.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Initial Tutorial
More will need be documented. However, starting a simple game is not hard at all. As of this writing, support for inventory
needs to be added.
Your main index.html:
Any Div that has an id of "StartRoomLoad" will be where the room image or movie will be displayed.
"StartRoomText" is the div id of where the text will be displayed.
Make sure to include all JS files in your script tag.
Your input or label or textbox needs to run the javascript function: iterateCmds(value that was typed in) . The Parser will
then take care of the rest.
A function is created for an item if you use the main item name followed by an underscore and the command. For example,
someone typing: "Look at the Dog" will have a function named dog_look() called.
A game object structure can contain multiple objects such as rooms, characters or items/objects. An object structure can be written like this and included in its own Javascript file(Make sure to add this to includes):
var GameObjects = {
'name id of your room all one word, no spaces': [
['RoomName', 'Name of your room, written however you want'],
['Id', '1 - You define this and can leave it blank. This is for future functionality'],
['ObjectType', 'Room, Item, Character'],
['RoomDesc', 'Your room Description'],
['RoomShortDesc', 'Your room short Description'],
['XRes', '320 size of image or movie'],
['YRes', '240'],
['RmImg', 'http://selmiak.bplaced.net/games/c64/zak/room/74_intro_00_256.png'],
['e', 'room1'],
['w', 'room1'],
['n', 'room1'],
['s', 'room1'],
['u', 'room1'],
['d', 'room1']
],
'room1': [
['RoomName', 'Title Screen'],
['RoomDesc', 'Your first room Desc'],
['Id', '1'],
['XRes', '320'],
['YRes', '240'],
['RmImg', 'http://selmiak.bplaced.net/games/c64/zak/room/74_intro_00_256.png'];
['w', 'titlescreen'],
['w', 'room1'],
['n', 'room1'],
['s', 'room1'],
['u', 'room1'],
['d', 'room1']
]