diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 1d517e0..3311e11 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -119,7 +119,7 @@ a good idea to carry this around with you..." command "study" -define-item "Life" +define-item "Card" description " ................................... ................................... @@ -129,8 +129,7 @@ ................................... ................................... " - fixed - + define-item "Magic map" description "This is a strange map. It always seems to be changing. One moment it will show you one thing, the next something completely diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 1d517e0..3311e11 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -119,7 +119,7 @@ a good idea to carry this around with you..." command "study" -define-item "Life" +define-item "Card" description " ................................... ................................... @@ -129,8 +129,7 @@ ................................... ................................... " - fixed - + define-item "Magic map" description "This is a strange map. It always seems to be changing. One moment it will show you one thing, the next something completely diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index c9e3365..2d7d259 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -9,6 +9,7 @@ (defun eat (player &optional arg) "Allow the player to eat something." + ;; XXX If any other edibles are added, split this function up (cond ((null arg) (format t "~&What do you want to eat?")) ;; Berries can be eaten any time, but don't have any effect ((and (equalp arg "berries") diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 1d517e0..3311e11 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -119,7 +119,7 @@ a good idea to carry this around with you..." command "study" -define-item "Life" +define-item "Card" description " ................................... ................................... @@ -129,8 +129,7 @@ ................................... ................................... " - fixed - + define-item "Magic map" description "This is a strange map. It always seems to be changing. One moment it will show you one thing, the next something completely diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index c9e3365..2d7d259 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -9,6 +9,7 @@ (defun eat (player &optional arg) "Allow the player to eat something." + ;; XXX If any other edibles are added, split this function up (cond ((null arg) (format t "~&What do you want to eat?")) ;; Berries can be eaten any time, but don't have any effect ((and (equalp arg "berries") diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5e16ced..fce7dbb 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -6,7 +6,7 @@ ; author: Daniel Vedder ; date: 07/06/2017 -name-world "100 Acre Wood" +name-world "100 Acre Wood" ;TODO Remove this load-file "pooh-extensions.lisp" load-file "woodland-map.lisp" @@ -22,7 +22,7 @@ strength 1 dexterity 4 constitution 4 - + define-player "Christopher Robin" description "Christopher Robin is my game dev character." place "Piglet's porch" ;Development diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 1d517e0..3311e11 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -119,7 +119,7 @@ a good idea to carry this around with you..." command "study" -define-item "Life" +define-item "Card" description " ................................... ................................... @@ -129,8 +129,7 @@ ................................... ................................... " - fixed - + define-item "Magic map" description "This is a strange map. It always seems to be changing. One moment it will show you one thing, the next something completely diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index c9e3365..2d7d259 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -9,6 +9,7 @@ (defun eat (player &optional arg) "Allow the player to eat something." + ;; XXX If any other edibles are added, split this function up (cond ((null arg) (format t "~&What do you want to eat?")) ;; Berries can be eaten any time, but don't have any effect ((and (equalp arg "berries") diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5e16ced..fce7dbb 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -6,7 +6,7 @@ ; author: Daniel Vedder ; date: 07/06/2017 -name-world "100 Acre Wood" +name-world "100 Acre Wood" ;TODO Remove this load-file "pooh-extensions.lisp" load-file "woodland-map.lisp" @@ -22,7 +22,7 @@ strength 1 dexterity 4 constitution 4 - + define-player "Christopher Robin" description "Christopher Robin is my game dev character." place "Piglet's porch" ;Development diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index a8d5840..d965b4f 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -15,7 +15,6 @@ item "Hunny" item "Jar" item "Map" - hidden "Lamp" ;XXX development define-place "Pooh's porch" description "You are standing in front of your very own home - Pooh's home. @@ -86,7 +85,7 @@ description "You can feel the ground becoming soft underneath your feet as you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of - the trees. Here and there, are willow bends its branches." + the trees. Here and there a willow bends its branches." item "Stick" neighbour "Central woods" neighbour "Eastern woods" @@ -155,6 +154,7 @@ the sky." neighbour "Hill" npc "Christopher Robin" + item "Card" requires "Magic map" define-place "Bridge" @@ -315,13 +315,3 @@ neighbour "Sandy pit" neighbour "Rapids" exit-hook "misty-forest" - -define-place "The World" - description "Well, so you have dared it at last. With the 100 Acre Wood at - your back, you face the Great Unknown. Many adventures lie behind - you, but the greatest one is still to come. Will you brave it? - - It is called: Life." - requires "Maturity" - neighbour "Bridge" - item "Life" \ No newline at end of file diff --git a/ATL/Pooh/items.atl b/ATL/Pooh/items.atl index 1d517e0..3311e11 100644 --- a/ATL/Pooh/items.atl +++ b/ATL/Pooh/items.atl @@ -119,7 +119,7 @@ a good idea to carry this around with you..." command "study" -define-item "Life" +define-item "Card" description " ................................... ................................... @@ -129,8 +129,7 @@ ................................... ................................... " - fixed - + define-item "Magic map" description "This is a strange map. It always seems to be changing. One moment it will show you one thing, the next something completely diff --git a/ATL/Pooh/pooh-extensions.lisp b/ATL/Pooh/pooh-extensions.lisp index c9e3365..2d7d259 100644 --- a/ATL/Pooh/pooh-extensions.lisp +++ b/ATL/Pooh/pooh-extensions.lisp @@ -9,6 +9,7 @@ (defun eat (player &optional arg) "Allow the player to eat something." + ;; XXX If any other edibles are added, split this function up (cond ((null arg) (format t "~&What do you want to eat?")) ;; Berries can be eaten any time, but don't have any effect ((and (equalp arg "berries") diff --git a/ATL/Pooh/pooh.atl b/ATL/Pooh/pooh.atl index 5e16ced..fce7dbb 100644 --- a/ATL/Pooh/pooh.atl +++ b/ATL/Pooh/pooh.atl @@ -6,7 +6,7 @@ ; author: Daniel Vedder ; date: 07/06/2017 -name-world "100 Acre Wood" +name-world "100 Acre Wood" ;TODO Remove this load-file "pooh-extensions.lisp" load-file "woodland-map.lisp" @@ -22,7 +22,7 @@ strength 1 dexterity 4 constitution 4 - + define-player "Christopher Robin" description "Christopher Robin is my game dev character." place "Piglet's porch" ;Development diff --git a/ATL/Pooh/woods.atl b/ATL/Pooh/woods.atl index a8d5840..d965b4f 100644 --- a/ATL/Pooh/woods.atl +++ b/ATL/Pooh/woods.atl @@ -15,7 +15,6 @@ item "Hunny" item "Jar" item "Map" - hidden "Lamp" ;XXX development define-place "Pooh's porch" description "You are standing in front of your very own home - Pooh's home. @@ -86,7 +85,7 @@ description "You can feel the ground becoming soft underneath your feet as you approach the marshes and bogs to the south of the 100 Acre wood. Plenty of moss grows around the roots of - the trees. Here and there, are willow bends its branches." + the trees. Here and there a willow bends its branches." item "Stick" neighbour "Central woods" neighbour "Eastern woods" @@ -155,6 +154,7 @@ the sky." neighbour "Hill" npc "Christopher Robin" + item "Card" requires "Magic map" define-place "Bridge" @@ -315,13 +315,3 @@ neighbour "Sandy pit" neighbour "Rapids" exit-hook "misty-forest" - -define-place "The World" - description "Well, so you have dared it at last. With the 100 Acre Wood at - your back, you face the Great Unknown. Many adventures lie behind - you, but the greatest one is still to come. Will you brave it? - - It is called: Life." - requires "Maturity" - neighbour "Bridge" - item "Life" \ No newline at end of file diff --git a/doc/HACKING b/doc/HACKING index e69de29..fef0ff7 100644 --- a/doc/HACKING +++ b/doc/HACKING @@ -0,0 +1,186 @@ +========================== +|| PROGRAMMING ATLANTIS || +========================== + +So you want to create your own game worlds? Great! Here's what you need to know: + +The Atlantis framework itself is written in Common Lisp, a programming language +with a long history that is nonetheless considered somewhat arcane by many +programmers today. Fortunately, you do not need to know it in order to create a +basic game (though it does help if you want to do more advanced stuff). + +The majority of coding for a game is done in a custom language called ATL. This +is a simple descriptive language that should be very easy to pick up, especially +if you have some previous programming experience. Looking at some of the +existing game files (e.g. in the folder ATL/Pooh) will already give you a feel +for the language. The full reference is found below. + +This guide is intended to get you started. It is not intended to be a full and +exhaustive reference to the framework - you are still going to have to do some +work on your own. But it should see you on your way to creating your very own +game world. (And if you have questions, don't hesitate to contact me.) + + +ATL SYNTAX + +ATL is line-oriented, with each line being of the form ' '. +There must be whitespace between the keyword and the value, and string values +must be enclosed by double quotes. (A "string" in programming jargon is a series +of alphanumeric characters, what you might call a "text".) Strings spanning +multiple lines are concatenated, with leading and trailing whitespace being +trimmed. Comments begin with a semi-colon and continue to the end of the line. + +Most ATL code consists of define blocks. These describe one entity of the game, +such as a player, an item or a room (for the full list, see below). A define +block consists of a define command and one to several option commands. It is +structured as follows: + +define- "" +