diff --git a/xtrn/startrek/help.bin b/xtrn/startrek/help.bin new file mode 100644 index 0000000000000000000000000000000000000000..03d3e953ca6f38d75f6fec5b4bac7af3f65680f9 --- /dev/null +++ b/xtrn/startrek/help.bin @@ -0,0 +1 @@ +ÚÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿³ ³³ Navigation: ³³ Ü ÜÜ ÜÜ ³³ ÜÛÜÜÛÛÛÛ - Left arrow turns the ship counter-clockwise ³³ ßÛßßÛÛÛÛ - Right arrow turns the ship clockwise ³³ ß ßß ßß - Up arrow increases speed ³³ - Down arrow decreases speed ³³ ³³ Weapons: ³³ Ü ÛÜß ÜÜ ÜÜÜ ³³ - Press [spacebar] to fire ÜÛ ÜÛßß ÛÛÛÛÜÜÛÜ ³³ ÛÛÛÛÛ Üß þ þ ÛÛÛÛßßÛß ³³ ßÛÛÛß ßß ßßß ³³ <Press any key to continue> ³ÀÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÙ \ No newline at end of file diff --git a/xtrn/startrek/readme.txt b/xtrn/startrek/readme.txt new file mode 100644 index 0000000000000000000000000000000000000000..cdc097d3c122cd0ca49ce6304362c98a63581058 --- /dev/null +++ b/xtrn/startrek/readme.txt @@ -0,0 +1,54 @@ +Star Trek +For Synchronet 3.16 +------------------- +echicken -at- bbs.electronicchicken.com +February 2013 + + +Installation +------------ + +In SCFG (BBS->Configure in the Synchronet Control Panel on Windows,) go to +External Programs -> Online Programs (Doors), then choose an Externals section +to add Star Trek to. Create a new item with the following details, leaving +all over settings at their default values: + +¦Name Star Trek +¦Internal Code STARTREK +¦Start-up Directory ../xtrn/startrek +¦Command Line ?startrek.js +¦Multiple Concurrent Users Yes + + +Star Trek features an interBBS scoreboard. To use the scoreboard on my JSON +DB server, open 'server.ini', and edit the 'host' and 'port' values at the top +to read: + +host = bbs.electronicchicken.com +port = 10088 + +If you would rather host your own scoreboard, ensure that you are running the +JSON DB service (you should have something like the following in your +ctrl/services.ini file): + +[JSON] +Port=10088 +Options=STATIC | LOOP +Command=json-service.js + +And that you have the following section in ctrl/json-service.ini: + +[startrek] +dir=../xtrn/startrek/ + +(After editing services.ini or json-service.ini, you must recycle services or +restart Synchronet for the changes to take effect.) + + +Support +------- + +Post a message to 'echicken' in the Synchronet Sysops sub on Dovenet, find me +in #synchronet on irc.synchro.net, or contact me at bbs.electronicchicken.com. + +echicken \ No newline at end of file diff --git a/xtrn/startrek/server.ini b/xtrn/startrek/server.ini new file mode 100644 index 0000000000000000000000000000000000000000..e4842a1fcbb8b8e130a63b866706ca17f0bd7dce --- /dev/null +++ b/xtrn/startrek/server.ini @@ -0,0 +1,2 @@ +host=localhost +port=10088 \ No newline at end of file diff --git a/xtrn/startrek/sprites/borg.bin b/xtrn/startrek/sprites/borg.bin new file mode 100644 index 0000000000000000000000000000000000000000..c35de54347050b5bfb9a8214ae12ff73be4cc226 --- /dev/null +++ b/xtrn/startrek/sprites/borg.bin @@ -0,0 +1 @@ +°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü°x±x x²x±x±xÛxÛx Üß ß ßL ±x x x x±x±x²x±x Ü Üß|ÜO ܱx±x±x²xÛxÛx²x²x ß ÜOßßN ²x²x±x±x²x²xÛxÛx Ü ß Ü Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/borg.ini b/xtrn/startrek/sprites/borg.ini new file mode 100644 index 0000000000000000000000000000000000000000..7537b01cfac948b95dcb4b6e29698196d6999ce8 --- /dev/null +++ b/xtrn/startrek/sprites/borg.ini @@ -0,0 +1,16 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .75 +speedstep = .1 +minimumspeed = .75 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .5 +name = The Borg +type = ship +health = 5 +points = 3000 \ No newline at end of file diff --git a/xtrn/startrek/sprites/cardassian.bin b/xtrn/startrek/sprites/cardassian.bin new file mode 100644 index 0000000000000000000000000000000000000000..f52e76ad43eacaef1a0652500957cf2c1181a3c2 --- /dev/null +++ b/xtrn/startrek/sprites/cardassian.bin @@ -0,0 +1 @@ + ÞÝ Üß ß ßL ÛÛ Ü Üß|ÜO Ü ÜÜÜÛÛÜÜÜ ß ÜOßßN ßÜnÜnÜnÜnÜnÜnßÜ ß Ü Ü ÜÜß Üß ß ßL Û ÜÜÛÛß Ü Üß|ÜO ÜÜnÛÛÛÛ ß ÜOßßN ßÜnÜnÛÜÜ Ü ß Ü ÜÜßnÛ Üß ß ßL ÛÛÛÛÛÜÜÜÜ Üß|ÜO Ü ÛÛÛÛÛßßß ß ÜOßßN ßÜnÛ Ü ß Ü Ü ÜßnßnÛßß Üß ß ßL ßnÛÛÛÛ Ü Üß|ÜO ÜÛ ßßÛÛÜ ß ÜOßßN ßßÜ Ü ß Ü ÜÜßnßnßnßnßnßnÜÜß ß ßL ßßßÛÛßßßÜ Üß|ÜO Ü ÛÛ ß ÜOßßN ÞÝ Ü ß Ü Ü ßßÛßnßnÜ Üß ß ßL ÛÛÛÛßn Ü Üß|ÜO Ü ÜÛÛßß Û ß ÜOßßN Üßß Ü ß Ü Ü ÛßnÜÜß ß ßL ÜÜÜÛÛÛÛÛÜ Üß|ÜO Ü ßßßÛÛÛÛÛ ß ÜOßßN ÛÜnßÜ ß Ü Ü ßÜÜ Üß ß ßL ßÛÛÜÜ Û Ü Üß|ÜO Ü ÛÛÛÛÜn ß ÜOßßN ÜÜÛÜnÜnß Ü ß Ü Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/cardassian.ini b/xtrn/startrek/sprites/cardassian.ini new file mode 100644 index 0000000000000000000000000000000000000000..c54f44b0f2d7f4610c26d197f6d41e32bb9b8797 --- /dev/null +++ b/xtrn/startrek/sprites/cardassian.ini @@ -0,0 +1,16 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .25 +speedstep = .1 +minimumspeed = .5 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .5 +name = Cardassians +type = ship +health = 3 +points = 1000 \ No newline at end of file diff --git a/xtrn/startrek/sprites/enterprise.bin b/xtrn/startrek/sprites/enterprise.bin new file mode 100644 index 0000000000000000000000000000000000000000..947469a087d3c6fa6fcbe58a85cc88fe0a2083fd --- /dev/null +++ b/xtrn/startrek/sprites/enterprise.bin @@ -0,0 +1 @@ + ÜÛÛÛÛÜ Üß ß ßL ßÛÛÛÛß Ü Üß|ÜO Üßt ÛÛ ßt ß ÜOßßN ÜyßßÛÛßßÜy Ü ß Ü Ü ÜÛÛÛÜ Üß ß ßL Ü ßÛÛÛÛ Ü Üß|ÜO Üß ÛÜß ßß ß ÜOßßN ÛÛßÜyß Ü ß Ü ÜÜ ÜÜ ÜÜ Üß ß ßL ÜÛÜÜÛÛÛÛ Ü Üß|ÜO ÜßÛßßÛÛÛÛ ß ÜOßßN ß ßß ßß Ü ß Ü ÜÛÛÜßyÜ Üß ß ßL Ü ÛßÜ ÜÜ Ü Üß|ÜO Ü ß ÜÛÛÛÛ ß ÜOßßN ßÛÛÛß Ü ß Ü ÜßyÜÜÛÛÜÜßy Üß ß ßL Üt ÛÛ Üt Ü Üß|ÜO Ü ÜÛÛÛÛÜ ß ÜOßßN ßÛÛÛÛß Ü ß Ü Ü ÜßyÜÛÛ Üß ß ßL ÜÜ ÜßÛÜ Ü Üß|ÜO ÜÛÛÛÛÜ ß ß ÜOßßN ßÛÛÛß Ü ß Ü Ü ÜÜ ÜÜÜ Üß ß ßL ÛÛÛÛÜÜÛÜ Ü Üß|ÜO ÜÛÛÛÛßßÛß ß ÜOßßN ßß ßßß Ü ß Ü ÜÜÛÛÛÜ Üß ß ßL ÛÛÛÛß Ü Ü Üß|ÜO Ü ßß ßÜÛß ß ÜOßßN ßÜyßÛÛ Ü ß Ü Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/enterprise.ini b/xtrn/startrek/sprites/enterprise.ini new file mode 100644 index 0000000000000000000000000000000000000000..15bfca3a5225043883b9864d71fb75b50927f7bf --- /dev/null +++ b/xtrn/startrek/sprites/enterprise.ini @@ -0,0 +1,14 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .5 +speedstep = .1 +minimumspeed = .5 +maximumspeed = .1 +weapon = photonTorpedo +attackspeed = .3 +type = ship +health = 11 \ No newline at end of file diff --git a/xtrn/startrek/sprites/gorn.bin b/xtrn/startrek/sprites/gorn.bin new file mode 100644 index 0000000000000000000000000000000000000000..1234bf731a2b8f6bdf63497b3e338751834dc2e7 --- /dev/null +++ b/xtrn/startrek/sprites/gorn.bin @@ -0,0 +1,13 @@ + ÜÛÛÜ Ü ß ßÛßÛÛÛÛßÛ ß ßß~ß ßÞÝ ßß ÞÝ ßßß ßÜ ß + ß + ß ß ß Ü ÜÛßÛÜÛÛ Ü ß ßß +ß ÛÛÛÜ ß ßß~ß ß ÜÛ ßßß ßÜ Üzßß ß ß ß Ü ÜÜßßÛ Ü ß ßß + ÜÛÛÛÜ ß ßß~ß ßÜ + ßÛÛÛß ßßß ßÜ ßßÜÜÛ ß ß ß Ü ßzÜÜ Ü ß ß ßÛ ß ßß~ß ßß +Û ÛÛÛß ßßß ßÜ ßÛÜÛßÛÛß ß ß Ü Ü + Ü + Ü ß ßÞÝ ÜÜ ÞÝ ß ßß~ß ßÛÜÛÛÛÛÜÛ ßßß ßÜ ßÛÛß ß ß ß Ü ÜÜßz Ü ß ßÛß ß ßß~ß ßßÛÛÛ ÜÜ + ßßß ßÜÛÛßÛÜÛß ß ß ß Ü ÛßßÜÜ Ü ß ßÜÛÛÛÜ ß + ß ßß~ß ßßÛÛÛß Ü + ßßß ßÜ ÛÜÜßß ß ß ß Ü ÛÛÜÛßÛÜ Ü ß ßÜÛÛÛ ßß + ß ßß~ß ßÛÜ ßßß ßÜ ßßÜz ß ß ß Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/gorn.ini b/xtrn/startrek/sprites/gorn.ini new file mode 100644 index 0000000000000000000000000000000000000000..89c65bb40292a9742b0170058ed51143e0bf8be7 --- /dev/null +++ b/xtrn/startrek/sprites/gorn.ini @@ -0,0 +1,16 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .2 +speedstep = .1 +minimumspeed = .2 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .5 +name = Gorn +type = ship +health = 2 +points = 1000 \ No newline at end of file diff --git a/xtrn/startrek/sprites/klingon.bin b/xtrn/startrek/sprites/klingon.bin new file mode 100644 index 0000000000000000000000000000000000000000..65aefe592aee00fb4fc54815c79ce70ed00f1378 --- /dev/null +++ b/xtrn/startrek/sprites/klingon.bin @@ -0,0 +1,3 @@ + ÜÛÛÜ Üß ß ßL Ü ÛÛ ÜÜ Üß|ÜO Ü ÛÛÛÛÛÛÛÛ ß ÜOßßN ßÛÛß Ü ß Ü Ü Ü ÛÜß Üß ß ßL ÜÛ ÜÛßß Ü Üß|ÜO ÜÛÛÛÛÛ Üß ß ÜOßßN ßÛÛÛß Ü ß Ü Ü ÛÛß Üß ß ßL ÜÛÛÛÜÜÛÜÜ Üß|ÜO Ü ßÛÛÛßßÛß ß ÜOßßN ÛÛÜ Ü ß Ü Ü ÜÛÛÛÜ Üß ß ßL ÛÛÛÛÛ ßÜ Ü Üß|ÜO Ü ßÛ ßÛÜÜ ß ÜOßßN ß ÛßÜ Ü ß Ü Ü ÜÛÛÜ Üß ß ßL ÛÛÛÛÛÛÛÛÜ Üß|ÜO Ü ß ÛÛ ß ß ÜOßßN ßÛÛß Ü ß Ü Ü ÜÛÛÛÜ Üß ß ßL Üß ÛÛÛÛÛ Ü Üß|ÜO ÜÜÜÛß Ûß ß ÜOßßN ÜßÛ ß Ü ß Ü Ü +ßÛÛ Üß ß ßL ÜÛÜÜÛÛÛÜÜ Üß|ÜO Ü ßÛßßÛÛÛß ß ÜOßßN +ÜÛÛ Ü ß Ü Ü ßÜÛ Ü Üß ß ßL ßßÛÜ ÛÜ Ü Üß|ÜO ÜßÜ ÛÛÛÛÛ ß ÜOßßN ßÛÛÛß Ü ß Ü Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/klingon.ini b/xtrn/startrek/sprites/klingon.ini new file mode 100644 index 0000000000000000000000000000000000000000..125a1648fabdadb71a49039e8a6db133726a9768 --- /dev/null +++ b/xtrn/startrek/sprites/klingon.ini @@ -0,0 +1,16 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .8 +speedstep = .1 +minimumspeed = .8 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .5 +name = Klingons +type = ship +health = 3 +points = 1000 \ No newline at end of file diff --git a/xtrn/startrek/sprites/pakled.bin b/xtrn/startrek/sprites/pakled.bin new file mode 100644 index 0000000000000000000000000000000000000000..44a644c74d07ce7761882b9f11b2014c5086fac3 --- /dev/null +++ b/xtrn/startrek/sprites/pakled.bin @@ -0,0 +1 @@ + ÜN Üß ßL ÛÛÛ ÜÜßOß ß>ß>ß>ß>ß> ÜÜ ÜÛÛÛÛÜN Üß ßLÜ0ÛÛÛÛÜÜßOß Ü0ßß>Û ÜÜ Ü 0ÛÜÜ Üß ßL 0ÛÛÛÝNÜÜßOß 0Ûßß ÜÜ Ü ß0ÜÜ>Û Üß ßLß0ÛÛÛÛÜÜßOß ÛÛÛÛßN ÜÜ ÜÜ>Ü>Ü>Ü>Ü> Üß ßL ÛÛÛ ÜÜßOß ßN ÜÜ ÜÛÜ>Üß0 Üß ßLÛÛÛÛß0ÜÜßOß ßNÛÛÛÛ ÜÜ Ü ÜÜÛ 0 Üß ßLÞNÛÛÛ 0ÜÜßOß ßßÛ 0 ÜÜ ÜÜNÛÛÛÛ Üß ßLÛÛÛÛÜ0ÜÜßOß Ûß>ßÜ0 ÜÜ Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/pakled.ini b/xtrn/startrek/sprites/pakled.ini new file mode 100644 index 0000000000000000000000000000000000000000..7b739268df64c98f1a1a2c009ac89e82866aa7f8 --- /dev/null +++ b/xtrn/startrek/sprites/pakled.ini @@ -0,0 +1,16 @@ +width = 5 +height = 3 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = 1 +speedstep = .1 +minimumspeed = 1 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .7 +name = Pakleds +type = ship +health = 2 +points = 500 \ No newline at end of file diff --git a/xtrn/startrek/sprites/photonTorpedo.bin b/xtrn/startrek/sprites/photonTorpedo.bin new file mode 100644 index 0000000000000000000000000000000000000000..0dab8cb7cbad60d8e84b0329050bc65bcf4ee940 --- /dev/null +++ b/xtrn/startrek/sprites/photonTorpedo.bin @@ -0,0 +1 @@ +þþþþþþþþ \ No newline at end of file diff --git a/xtrn/startrek/sprites/photonTorpedo.ini b/xtrn/startrek/sprites/photonTorpedo.ini new file mode 100644 index 0000000000000000000000000000000000000000..c1d0dcaf247262fd95a6d65a14465f977d73f638 --- /dev/null +++ b/xtrn/startrek/sprites/photonTorpedo.ini @@ -0,0 +1,9 @@ +width = 1 +height = 1 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal +movement = rotating +constantmotion = 1 +speed = .03 +range = 20 +type = weapon \ No newline at end of file diff --git a/xtrn/startrek/sprites/romulan.bin b/xtrn/startrek/sprites/romulan.bin new file mode 100644 index 0000000000000000000000000000000000000000..0264b850aa2e442251d5d1024169bf7790d3e642 --- /dev/null +++ b/xtrn/startrek/sprites/romulan.bin @@ -0,0 +1,19 @@ + ÜÛÛÜ Üß ß ßL Ü + ÛÛ Ü +Ü Üß|ÜO Ü ÛÛÛÛÛÛÛÛ ß ÜOßßN ßÛÛß Ü ß Ü Ü Ü + ÛÜß Üß ß ßL ÜÛ ÜÛßß Ü Üß|ÜO ÜÛÛÛÛÛ Üß + ß ÜOßßN ßÛÛÛß Ü ß Ü Ü ÛÛß + Üß ß ßL ÜÛÛÛÜÜÛÜ Ü Üß|ÜO ÜßÛÛÛßßÛß ß ÜOßßN ÛÛÜ + Ü ß Ü Ü ÜÛÛÛÜ Üß ß ßL ÛÛÛÛÛ ßÜ +Ü Üß|ÜO Ü ßÛ ßÛÜÜ ß ÜOßßN ß + ÛßÜÜ ß Ü Ü ÜÛÛÜ Üß ß ßL ÛÛÛÛÛÛÛÛ Ü Üß|ÜO Üß + ÛÛ ß + ß ÜOßßN ßÛÛß Ü ß Ü Ü ÜÛÛÛÜ Üß ß ßL Ü +ß ÛÛÛÛÛÜ Üß|ÜO Ü ÜÜÛß Ûß ß ÜOßßN ÜßÛ ß + Ü ß Ü Ü +ß +ÛÛ Üß ß ßL ÜÛÜÜÛÛÛÜ Ü Üß|ÜO ÜßÛßßÛÛÛß ß ÜOßßN +Ü +ÛÛ Ü ß Ü ÜßÜÛ Ü + Üß ß ßL ßßÛÜ ÛÜ Ü Üß|ÜO Ü ß +Ü ÛÛÛÛÛ ß ÜOßßN ßÛÛÛß Ü ß Ü Ü \ No newline at end of file diff --git a/xtrn/startrek/sprites/romulan.ini b/xtrn/startrek/sprites/romulan.ini new file mode 100644 index 0000000000000000000000000000000000000000..7d1c554aa918ff4685ac52c554f3a75eeba21e5d --- /dev/null +++ b/xtrn/startrek/sprites/romulan.ini @@ -0,0 +1,16 @@ +width = 8 +height = 4 +bearings = n,ne,e,se,s,sw,w,nw +positions = normal,destroyed +movement = rotating +constantmotion = 1 +speed = .5 +speedstep = .1 +minimumspeed = .5 +maximumspeed = .05 +weapon = photonTorpedo +attackspeed = .5 +name = Romulans +type = ship +health = 4 +points = 2000 \ No newline at end of file diff --git a/xtrn/startrek/starfield.bin b/xtrn/startrek/starfield.bin new file mode 100644 index 0000000000000000000000000000000000000000..d20d5e49f690b0d02f36e8125f29ae59fa40d46f --- /dev/null +++ b/xtrn/startrek/starfield.bin @@ -0,0 +1 @@ +ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú ú \ No newline at end of file diff --git a/xtrn/startrek/startrek.bin b/xtrn/startrek/startrek.bin new file mode 100644 index 0000000000000000000000000000000000000000..e3d271f5aca79f7a839a5b17ecef56b4f15ea74e --- /dev/null +++ b/xtrn/startrek/startrek.bin @@ -0,0 +1,4 @@ + ÜÜÜßxßxßxßxßxÜÜÜ ú ú ÜÜßxßxßx°°°z°x°x±x±x±x²z°°ßxßxßxÜÜÜ ú ±ÜxÜx°°z°z±x°x°x°z°z±x°x°x°x°x±x°°°Üx²xÛ ú ú ²(±±²°°ÜxÜxÜx°°°z±x±xÜxÜxÜx²x±x±x°z°zÛ( ú ±°°²²²(²°²°²±²x²x²x±x±x²x°z°x±x±xÛ( ±°²(²°±±²°²°±±x±z²x°x±x±x°x±x±x°xÛ( star trek ú ±²°Û°²°°±²²(±²x²x±x±x±x²x°x°x°x°xÛ( ú by echicken ú ±°±²(±°°°±±°±²x°x±x°x²x°x²x°x°z²xÛ( ú ±²²°²(±±°°°±±±x°x°x²x±x±x°x°x°x±xÛ( ú ú ßß±±±°²(²(°°±±x±x°z°z°x²x²x²xßß ú ú ßßß±²(±²x±xßßß + + + ú ß ú ú ú ú Üß7ß7ÜÜ ú Üß7ß7ÜÜ ú ßÜxÜ7Ü7ß7ß7ÜÜ ú Ü°xÛÛ°xÜÜ ú ßÜxÜ7Ü7ß7ß7ÜÜ ßÜxÜxÜ7Ü7ß7ß7ÜÜ ±x°xÛÛÛ°x±xÛÛ°xÜ°x°x±x°x°x°xÜxÜ7Ü7ß7ß7ÜÜ ú ßÜxÜxÜ7Ü7ß7ß7±x°x°x°x±x°xÛÛÛ°xÛÛÛÛ°xÜ ßÜxÜxÜ7Ü7ß7ß7ÜÜ ú ßÜxÜxÜ7ÛÛÛ ß±x°x°xÛÜxÜxÜxÜxÜxßxßxßxßxßxßxßx xßxßxßxßxÜGÛÛ ú ú ßßÜGÜÜÜßxßxßxßxßx xÛÛÛÛÛ x°x°xÛÛÛÛÛ°x°xÛÛÛÛ°x°x°x°x±xÛ°xÜÜÜ ú ܱx±x°x°xÛÛÛÛÛÛÛ°x°xÛÛÛÛÛÛÛÛ±x±x±xÛÛ°x°x°x°xÛÛÛÛÛÛÛÛÛÛÛ°x°x°xÜ ú ±x±xÛÛÛÛÛ°xÛ°x°x°xÛÛÛÛÛÛÛÛ°x±x±x°x°x±x°xÛÛÛ°xÛÛÛÛÛÛÛÛÛÛÛÛÛÛÛ±x ú ßÜxÜx±x±xÛ±x°x±xÛÛÛÛ±x±x±x°x°xÛÛÛÛÛÛÛÛÛÛÛÛÛÛ°x±x±xÛÛ±x°x±x°x°x±x±xÜxÜxß ú ßßßßßÜxÜxÜxÜxÜxÜxÜxÜxÛÛÛ±x±x±x°x°x±x°x°xÛÛÛÜxÜxÜxÜxÜxÜxÜxÜxßßßßßß ú ßßßßßßßßßßßßßß ú <press any key to boldly something something> \ No newline at end of file diff --git a/xtrn/startrek/startrek.js b/xtrn/startrek/startrek.js new file mode 100644 index 0000000000000000000000000000000000000000..e440643de22349a42f5d5fa707cc9eafc02c055e --- /dev/null +++ b/xtrn/startrek/startrek.js @@ -0,0 +1,296 @@ +load("sbbsdefs.js"); +load("json-client.js"); +load("event-timer.js"); +load("frame.js"); +load("sprite.js"); + +var sysStatus, userInput, player, timer, waveTimer, jsonClient, serverIni; +var frame, splashFrame, fieldFrame, statusFrame, clockFrame, clockSubFrame, uhOhFrame, scoreFrame, helpFrame; +var player = { + round : 0, + score : 0, + sprite : {} +}; +var enemySprites = []; +var enemies = [ + "romulan", + "klingon", + "borg", + "cardassian", + "gorn", + "pakled" +]; + +var checkScreenEdge = function(sprite) { + if(sprite.x < -3) + sprite.moveTo(77, sprite.y); + if(sprite.y < -2) + sprite.moveTo(sprite.x, 23); + if(sprite.x > 77) + sprite.moveTo(-3, sprite.y); + if(sprite.y > 23) + sprite.moveTo(sprite.x, -2); +} + +var putEnemy = function(re) { + var rx = Math.floor(Math.random() * 73) + 1; + var ry = Math.floor(Math.random() * 20) + 1; + var s = new Sprite.Aerial(enemies[re], fieldFrame, rx, ry, 'n', 'normal'); + if(Sprite.checkOverlap(s).length > 0) { + s.remove(); + return false; + } + s.frame.draw(); + return true; +} + +var spawnEnemies = function() { + var re = Math.floor(Math.random() * enemies.length); + for(var x = 0; x < player.round; x++) { + while(!putEnemy(re)) { + } + } + if(player.round == 1) { + timer.addEvent(1000, true, countdown); + clockFrame.putmsg("Next wave: "); + countdown(); + } else { + player.sprite.ini.health = player.sprite.ini.health + 5; + } + player.round++; + putStats(); + uhOhFrame.top(); + statusFrame.top(); + timer.addEvent(250, 12, cycleWarning, [Sprite.aerials[Sprite.aerials.length - 1].ini.name]); + timer.addEvent(3000, false, removeWarning); +} + +var removeShip = function(s) { + Sprite.aerials[s].remove(); +} + +var cycleWarning = function(enemy) { + var c = Math.floor(Math.random() * 15) + 1; + uhOhFrame.clear(); + uhOhFrame.center("Oh no! " + enemy + "!", c); +} + +var removeWarning = function() { + uhOhFrame.clear(); + uhOhFrame.bottom(); +} + +var putStats = function() { + statusFrame.clear(); + statusFrame.putmsg( + format( + "[ESC] quit [H]elp | Round: %s Shields: %s Score: %s", + player.round - 1, player.sprite.ini.health - 1, player.score + ) + ); +} + +var countdown = function() { + clockSubFrame.clear(); + clockSubFrame.putmsg(parseInt(waveTimer.nextrun * .001)); +} + +var init = function() { + js.branch_limit = 0; + sysStatus = bbs.sys_status; + bbs.sys_status|=SS_MOFF; + KEY_WEAPON = " "; + + frame = new Frame(1, 1, 80, 24, 0); + splashFrame = new Frame(1, 1, 80, 24, 0, frame); + fieldFrame = new Frame(1, 1, 80, 24, 0, frame); + statusFrame = new Frame(1, 24, 66, 1, BG_BLUE|WHITE, frame); + clockFrame = new Frame(67, 24, 14, 1, BG_BLUE|WHITE, frame); + clockSubFrame = new Frame(78, 24, 2, 1, BG_BLUE|WHITE, clockFrame); + uhOhFrame = new Frame(1, 12, 80, 1, 0, frame); + scoreFrame = new Frame(1, 1, 80, 24, BG_BLACK|WHITE, frame); + helpFrame = new Frame(8, 4, 64, 16, 0, frame); + + uhOhFrame.transparent = true; + splashFrame.load(js.exec_dir + "startrek.bin", 80, 24); + fieldFrame.load(js.exec_dir + "starfield.bin", 80, 24); + helpFrame.load(js.exec_dir + "help.bin", 64, 16); + + player.sprite = new Sprite.Aerial("enterprise", fieldFrame, 40, 10, 'n', 'normal'); + + timer = new Timer(); + + var f = new File(js.exec_dir + "server.ini"); + f.open("r"); + serverIni = f.iniGetObject(); + f.close(); + + frame.open(); + scoreFrame.bottom(); + helpFrame.bottom(); + statusFrame.top(); + splashFrame.top(); + frame.draw(); +} + +var showHelp = function() { + helpFrame.top(); + frame.cycle(); + console.getkey(); + helpFrame.bottom(); +} + +var gamePlay = function() { + player.round = 1; + timer.addEvent(5000, 1, spawnEnemies); + waveTimer = timer.addEvent(30000, true, spawnEnemies); + putStats(); + while(!js.terminated) { + if(player.sprite.ini.health < 1) { + deathKnell(); + break; + } + userInput = console.inkey(K_NONE, 5); + if(ascii(userInput) == 27) + break; + else if(userInput.toUpperCase() == "H") + showHelp(); + player.sprite.getcmd(userInput); + for(var s = 0; s < Sprite.aerials.length; s++) { + if(!Sprite.aerials[s].open) + continue; + checkScreenEdge(Sprite.aerials[s]); + if( + Sprite.aerials[s].ini.type == "ship" + && + Sprite.aerials[s] != player.sprite + && + system.timer - Sprite.aerials[s].lastMove > Sprite.aerials[s].ini.speed + && + Sprite.aerials[s].pursue(player.sprite) + ) { + Sprite.aerials[s].getcmd(KEY_WEAPON); + } + var o = Sprite.checkOverlap(Sprite.aerials[s]); + if(!o) + continue; + for(var oo in o) { + if(!o[oo].open) + continue; + if(o[oo].ini.type == "weapon" && Sprite.aerials[s].ini.type == "weapon") { + Sprite.aerials[s].remove(); + o[oo].remove(); + } else if( + (o[oo].ini.type == "weapon" && Sprite.aerials[s].ini.type == "ship") + && + (o[oo].owner != Sprite.aerials[s]) + ) { + Sprite.aerials[s].ini.health = Sprite.aerials[s].ini.health - 1; + o[oo].remove(); + } else if( + o[oo].ini.type == "ship" && Sprite.aerials[s].ini.type == "ship" + && + o[oo].position != "destroyed" && Sprite.aerials[s].position != "destroyed" + ) { + Sprite.aerials[s].ini.health = 0; + o[oo].ini.health = 0; + } + if(Sprite.aerials[s] == player.sprite || o[oo] == player.sprite) + putStats(); + } + if(Sprite.aerials[s].ini.hasOwnProperty("health") && Sprite.aerials[s].ini.health < 1) { + Sprite.aerials[s].position = "destroyed"; + Sprite.aerials[s].open = false; + player.score = player.score + ((Sprite.aerials[s].ini.hasOwnProperty("points")) ? parseInt(Sprite.aerials[s].ini.points) * player.round : 0); + timer.addEvent(500, false, removeShip, [s]); + putStats(); + } + } + timer.cycle(); + Sprite.cycle(); + if(frame.cycle()) + console.gotoxy(80, 24); + } + waveTimer.abort = true; +} + +var deathKnell = function() { + uhOhFrame.top(); + for(var n = 0; n < 20; n++) { + cycleWarning("You done goofed"); + frame.cycle(); + mswait(200); + } +} + +var scoreBoard = function() { + var scoreObj = { + 'alias' : user.alias, + 'system' : system.name, + 'round' : player.round - 1, + 'score' : player.score, + 'when' : time() + }; + try { + jsonClient = new JSONClient(serverIni.host, serverIni.port); + var scores = jsonClient.read("STARTREK", "STARTREK.SCORES", 1); + if(scores === undefined) { + scores = []; + jsonClient.write("STARTREK", "STARTREK.SCORES", scores, 2); + } + jsonClient.push("STARTREK", "STARTREK.SCORES", scoreObj, 2); + jsonClient.disconnect(); + } catch(err) { + log(LOG_ERR, "JSON client error: " + err); + return false; + } + scoreFrame.center("Recent scores"); + scoreFrame.putmsg("\r\n\r\n"); + scoreFrame.putmsg( + format( + "%-30s%-30s%-10s%s\r\n\r\n", + "Player", "System", "Round", "Score" + ), + LIGHTCYAN + ); + scores.push(scoreObj); + shownUsers = []; + for(var s = scores.length - 1; s > (scores.length >= 19) ? scores.length - 20 : 0; s = s - 1) { + if(shownUsers.indexOf(scores[s].alias) >= 0) + continue; + shownUsers.push(scores[s].alias); + scoreFrame.putmsg( + format( + "%-30s%-30s%-10s%s\r\n", + scores[s].alias, scores[s].system, scores[s].round, scores[s].score + ) + ); + } + scoreFrame.crlf(); + scoreFrame.center("<Press any key>", LIGHTRED); + scoreFrame.top(); + frame.cycle(); + mswait(1000); + while(console.input_buffer_level > 0) { + console.inkey(); + } + console.getkey(); +} + +var main = function() { + console.getkey(); + splashFrame.close(); + gamePlay(); + scoreBoard(); +} + +var cleanUp = function() { + frame.close(); + console.clear(); + bbs.sys_status = sysStatus; +} + +init(); +main(); +cleanUp(); +exit(); \ No newline at end of file