From bdc49b0a31a70028675f535234d592f3d4502922 Mon Sep 17 00:00:00 2001 From: bdsmgeek Date: Sun, 17 Nov 2019 22:29:11 -0500 Subject: [PATCH 1/3] Fixed error on build, Fleshed out game example. --- bin/Game.html | 1301 +++++++++++++++++++- src/engine/config/StoryInit.tw | 3 + src/engine/js/achievement.js | 14 - src/engine/passages/refresh.tw | 9 + src/game/characters/character/character.tw | 10 + src/game/items/item/item.tw | 6 + src/game/rooms/hallway/hallway.tw | 7 + src/game/rooms/room/room.tw | 7 + src/game/setup/GameSetup.tw | 34 + 9 files changed, 1333 insertions(+), 58 deletions(-) delete mode 100755 src/engine/js/achievement.js create mode 100644 src/engine/passages/refresh.tw create mode 100644 src/game/characters/character/character.tw create mode 100644 src/game/items/item/item.tw create mode 100644 src/game/rooms/hallway/hallway.tw create mode 100644 src/game/rooms/room/room.tw diff --git a/bin/Game.html b/bin/Game.html index d623b22..037d824 100755 --- a/bin/Game.html +++ b/bin/Game.html @@ -2,13 +2,13 @@ -SugarCube +Game Title - - - - - - - - - + + + + + + + +
@@ -111,16 +100,1240 @@
Your browser lacks required capabilities. Please upgrade it or switch to another to continue.
Loading…
- + diff --git a/src/engine/config/StoryInit.tw b/src/engine/config/StoryInit.tw index 3d1f3f5..4e6b66b 100755 --- a/src/engine/config/StoryInit.tw +++ b/src/engine/config/StoryInit.tw @@ -13,3 +13,6 @@ <> <> + +:: StorySettings +ifid:8c8a169c-fa4e-4119-b838-18ce6420f83a \ No newline at end of file diff --git a/src/engine/js/achievement.js b/src/engine/js/achievement.js deleted file mode 100755 index 3275cfb..0000000 --- a/src/engine/js/achievement.js +++ /dev/null @@ -1,14 +0,0 @@ -// <> macro -Macro.add('achievement', { - handler : function () { - - var $wrapper = $(document.createElement('div')); - var className = "ach"; - var content = "

Achievement!

you achieved something
\\"; - - $wrapper - .wiki(content) - .addClass(className) - .appendTo(this.output); - } -}); diff --git a/src/engine/passages/refresh.tw b/src/engine/passages/refresh.tw new file mode 100644 index 0000000..4d1ce62 --- /dev/null +++ b/src/engine/passages/refresh.tw @@ -0,0 +1,9 @@ +/* Passage Refresh Widget + Description: + Simple widget to refresh the current passage. + Options: + Use: + <> +*/ +:: Refresh Widget [widget nobr] +<><><><> \ No newline at end of file diff --git a/src/game/characters/character/character.tw b/src/game/characters/character/character.tw new file mode 100644 index 0000000..697f3e0 --- /dev/null +++ b/src/game/characters/character/character.tw @@ -0,0 +1,10 @@ +:: character_examine +A character. + +<> +<> + +:: character_dialog_conversation +Hello! + +<> \ No newline at end of file diff --git a/src/game/items/item/item.tw b/src/game/items/item/item.tw new file mode 100644 index 0000000..2164186 --- /dev/null +++ b/src/game/items/item/item.tw @@ -0,0 +1,6 @@ +:: item_examine +An item. + +<><><> + +<> diff --git a/src/game/rooms/hallway/hallway.tw b/src/game/rooms/hallway/hallway.tw new file mode 100644 index 0000000..0564420 --- /dev/null +++ b/src/game/rooms/hallway/hallway.tw @@ -0,0 +1,7 @@ +:: hallway_title +Hallway + +:: hallway_description +A hallway. + +:: hallway_image \ No newline at end of file diff --git a/src/game/rooms/room/room.tw b/src/game/rooms/room/room.tw new file mode 100644 index 0000000..5288d40 --- /dev/null +++ b/src/game/rooms/room/room.tw @@ -0,0 +1,7 @@ +:: room_title +Room + +:: room_description +A room. + +:: room_image \ No newline at end of file diff --git a/src/game/setup/GameSetup.tw b/src/game/setup/GameSetup.tw index 4016ce1..d291d15 100755 --- a/src/game/setup/GameSetup.tw +++ b/src/game/setup/GameSetup.tw @@ -1,3 +1,37 @@ :: GameSetup /* Put your variable setup here and NOT in StoryInit */ + +/* Initialize Rooms */ +<> +<> +<> + +<> +<> +<> + +/* Add exits */ +<> +<> + +/* Setup the player. */ +<> + +/* Initialize Items */ +<> +<> + +/* Add Items to Rooms */ +<> + +/* Initialize Characters */ +<> +<> + +/* Place Characters in Rooms*/ +<> + +/* Initialize Character Conversations*/ +<> + From 4fc23bb51721b6c04a33e2883623ab18a33b40c7 Mon Sep 17 00:00:00 2001 From: bdsmgeek Date: Sun, 17 Nov 2019 22:33:50 -0500 Subject: [PATCH 2/3] changed structure so github pages can be utilized --- compile.bat | 4 ++-- compile.sh | 2 +- {bin => docs}/Game.html | 0 3 files changed, 3 insertions(+), 3 deletions(-) rename {bin => docs}/Game.html (100%) mode change 100755 => 100644 diff --git a/compile.bat b/compile.bat index b4ba19c..aabb501 100755 --- a/compile.bat +++ b/compile.bat @@ -7,9 +7,9 @@ pushd %~dp0 :: Run the appropriate compiler for the user's CPU architecture. if %PROCESSOR_ARCHITECTURE% == AMD64 ( - CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0bin/Game.html" "%~dp0src" + CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0docs/Game.html" "%~dp0src" ) else ( - CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0bin/Game.html" "%~dp0src*" + CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0docs/Game.html" "%~dp0src*" ) popd diff --git a/compile.sh b/compile.sh index 56baa9b..ab90693 100644 --- a/compile.sh +++ b/compile.sh @@ -1,3 +1,3 @@ #! /bin/bash -devTools/tweeGo/tweego_nix64 -o bin/Game.html src/* +devTools/tweeGo/tweego_nix64 -o docs/Game.html src/* diff --git a/bin/Game.html b/docs/Game.html old mode 100755 new mode 100644 similarity index 100% rename from bin/Game.html rename to docs/Game.html From 9a7dd25772af7480eaae47132eda3636fe4a8cca Mon Sep 17 00:00:00 2001 From: bdsmgeek Date: Sun, 17 Nov 2019 22:45:34 -0500 Subject: [PATCH 3/3] fixed the required index.html format for github pages --- compile.bat | 4 ++-- compile.sh | 2 +- docs/{Game.html => index.html} | 0 src/engine/config/StoryInit.tw | 3 --- 4 files changed, 3 insertions(+), 6 deletions(-) rename docs/{Game.html => index.html} (100%) diff --git a/compile.bat b/compile.bat index aabb501..797ed9b 100755 --- a/compile.bat +++ b/compile.bat @@ -7,9 +7,9 @@ pushd %~dp0 :: Run the appropriate compiler for the user's CPU architecture. if %PROCESSOR_ARCHITECTURE% == AMD64 ( - CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0docs/Game.html" "%~dp0src" + CALL "%~dp0devTools\tweeGo\tweego_win64.exe" -o "%~dp0docs/index.html" "%~dp0src" ) else ( - CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0docs/Game.html" "%~dp0src*" + CALL "%~dp0devTools\tweeGo\tweego_win86.exe" -o "%~dp0docs/index.html" "%~dp0src*" ) popd diff --git a/compile.sh b/compile.sh index ab90693..ce2d476 100644 --- a/compile.sh +++ b/compile.sh @@ -1,3 +1,3 @@ #! /bin/bash -devTools/tweeGo/tweego_nix64 -o docs/Game.html src/* +devTools/tweeGo/tweego_nix64 -o docs/index.html src/* diff --git a/docs/Game.html b/docs/index.html similarity index 100% rename from docs/Game.html rename to docs/index.html diff --git a/src/engine/config/StoryInit.tw b/src/engine/config/StoryInit.tw index 4e6b66b..3d1f3f5 100755 --- a/src/engine/config/StoryInit.tw +++ b/src/engine/config/StoryInit.tw @@ -13,6 +13,3 @@ <> <> - -:: StorySettings -ifid:8c8a169c-fa4e-4119-b838-18ce6420f83a \ No newline at end of file