Design and logic for user-facing site https://exmods.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

221 lines
16KB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta name="theme-color" content="#fdce72" />
  5. <meta name="author" content="NGnius" />
  6. <meta name="keywords" content="pixi,exmods,gamecraft,modding,mod" />
  7. <meta name="og:type" content="website" />
  8. <meta name="og:title" content="Pixi" />
  9. <meta name="og:description" content="Pixi mod for Gamecraft" />
  10. <meta name="description" content="Pixi mod for Gamecraft" />
  11. <meta name="og:image" content="../../mods/Pixi/pixi-logo.png" />
  12. <meta name="og:url" content="https://www.exmods.org/mods/Pixi" />
  13. <meta charset="UTF-8" />
  14. <link rel="icon" href="../../mods/Pixi/pixi-logo.png" type="image/x-icon"/>
  15. <link rel="shortcut icon" href="../../mods/Pixi/pixi-logo.png" type="image/x-icon"/>
  16. <!--<link rel="stylesheet" href="../../mods/Pixi/style.css" type="text/css" />-->
  17. <style type="text/css" style="display: none;" rel="stylesheet">
  18. body {text-align: left; background-color: #8a704e; animation-name: background-fade-in; animation-duration: 3s;}
  19. footer {text-align: right; width: clamp(100px, 96%, 1600px); border: 4px; border-style: solid; border-color: #d98c61; margin: auto; background-color: #ffd072; animation-name: foreground-fade-in; animation-duration: 3s;}
  20. .content-wrapper {width: clamp(100px, 96%, 1600px); padding: 0; margin: auto; border:0px; border-left: 4px; border-right: 4px; border-style: solid; border-color: #d98c61; background-color: #ffd072; animation-name: foreground-fade-in; animation-duration: 3s;}
  21. .content-title {text-align: center; font-size: 400%; font-weight: bold; padding-top: 1%;}
  22. .content-subtitle {text-align: center; font-size: 150%; vertical-align: middle;}
  23. .content-header {text-align: left; padding: 1%; padding-left: 12%; padding-top: 2%; font-size: 250%; vertical-align: middle; font-weight: bold; background-image: linear-gradient(to right, #d98c61FF, #ffd07200, #ffd07200);}
  24. .content-img-header {text-align: left; padding-left: 12%; padding-bottom: 1%; margin-top: -5%; font-size: 250%; vertical-align: middle; font-weight: bold;}
  25. .content-text {padding: 1%; line-height: 142%;}
  26. .tab { margin-left: 40px; }
  27. /* I feel like such a kid messing around with animations */
  28. @keyframes background-fade-in { from {background-color: #ffd072;} to {background-color: #8a704e;}}
  29. @keyframes foreground-fade-in { from {border-color: #8a704e;} to {border-color: #d98c61;}}
  30. @keyframes swoop { from {bottom: -50%;} to {bottom: 110%;}}
  31. </style>
  32. <title>Pixi</title>
  33. </head>
  34. <body>
  35. <div class="content-wrapper">
  36. <div style="width: 100%; background-image: linear-gradient( #FFFFFF00, #FFFFFF00, #ffd072FF ), url('../../mods/Pixi/pixi-world1-1-banner.png'); background-size: 100%; background-position: bottom; background-repeat: no-repeat;">
  37. <img src="../../mods/Pixi/pixi-world1-1-banner.png" width="40%" style="visibility: hidden;" />
  38. <div class="content-title" id="pixi-title">
  39. <div style="text-align: center;">
  40. <img src="../../mods/Pixi/pixi-logo.png" width="8%" style="vertical-align: middle;" />
  41. <span style="vertical-align: middle;">Pixi</span>
  42. <img src="../../mods/Pixi/pixi-logo.png" width="8%" style="vertical-align: middle; -webkit-transform: scaleX(-1); transform: scaleX(-1);" />
  43. </div>
  44. </div>
  45. <div class="content-subtitle">
  46. <span>Convert images, Robocraft bots and more into Gamecraft blocks.</span>
  47. </div>
  48. </div>
  49. <div class="content-text" id="pixi-intro-p">
  50. <p><span class="tab"></span>
  51. THIS DOES NOT WORK WITH TECHBLOX. Pixi adds two new commands,
  52. <i><b>Pixi</b></i> and <i><b>Pixi2</b></i>,
  53. to Gamecraft's command line to import images, and other stuff, into a game.
  54. Since Pixi places vanilla Gamecraft blocks, imported files should be visible without Pixi installed.
  55. See the background image above this?
  56. That's a picture of Super Mario Bros World 1-1 in Gamecraft using the <i>Pixi</i> command for image importing.
  57. </p>
  58. </div>
  59. <div class="content-header" id="pixi-installation">
  60. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  61. <span style="vertical-align: middle;">Installation</span>
  62. </div>
  63. <div class="content-text" id="pixi-installation-p">
  64. <p><span class="tab"></span>
  65. Download and run <a href="https://git.exmods.org/NorbiPeti/GCMM/releases">GCMM</a>, then select and install Pixi from the menu.
  66. </p>
  67. <p><span class="tab"></span>
  68. ADVANCED USERS (old way): Before installing Pixi, please patch Gamecraft with
  69. <a href="https://git.exmods.org/modtainers/GCIPA/releases">GCIPA</a> and install the latest version of
  70. <a href="https://git.exmods.org/modtainers/GamecraftModdingAPI/releases">GamecraftModdingAPI</a>.
  71. Once that's done, download <a href="https://git.exmods.org/NGnius/Pixi/releases">Pixi's latest release</a>
  72. and then copy <i>Pixi.dll</i> into the Plugins folder in Gamecraft's main folder.
  73. Alternately, follow the <a href="https://www.exmods.org/guides/install.html" title="link to installation guide">install guide</a>
  74. (ignore the part about a zip file -- move <i>Pixi.dll</i> into the Plugins folder instead).
  75. </p>
  76. </div>
  77. <div style="width: 100%; background-image: url('../../mods/Pixi/rc-pixi-gc2.png'); background-size: 100%; background-position: bottom; background-repeat: no-repeat;">
  78. <img src="../../mods/Pixi/rc-pixi-gc2.png" width="100%" style="visibility: hidden; vertical-align: middle;" />
  79. <div class="content-img-header" id="pixi-robots">
  80. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  81. <span style="vertical-align: middle;">Robot Importing</span>
  82. </div>
  83. </div>
  84. <div class="content-text" id="pixi-robots-p">
  85. <p>
  86. <i><b>Pixi "[bot search text]"</b></i> downloads the first search result from Robocraft's community Factory and places it beside you.
  87. <br/><br/>
  88. <i><b>Pixi2 "robot" "[bot search text]"</b></i> is the more verbose equivalent.
  89. </p>
  90. <p><span class="tab"></span>
  91. In the previous commands, anything between (and including) <i><b>[</b></i> and <i><b>]</b></i> is a command argument that you must replace.
  92. Do not remove the quotation marks -- those are required for the command to work.
  93. These commands also have a hidden scaling property which is set to 3 by default.
  94. Changing the scaling will disable conversion for all Robocraft blocks except simple blocks.
  95. </p>
  96. <p><span class="tab"></span>
  97. For example, if you want to import a robot from the CRF called Pixi Art, execute the command <span style="display:inline-block;"><i><b>Pixi "Pixi Art"</b></i></span> to load the robot into your Gamecraft game world.
  98. </p>
  99. <p><span class="tab"></span>
  100. Under the hood, robot importing reads the Robocraft robot save format from the <a href="https://factory.robocraftgame.com/">CRF</a> and places the equivalent Gamecraft blocks.
  101. For blocks which are in Gamecraft and Robocraft (full cubes, prisms, etc.), direct conversion occurs.
  102. If a block does not have a single-block equivalent in Gamecraft, the conversion algorithm will attempt to substitute in an existing blueprint for the block.
  103. Failing that, a text block with the name of the Robocraft block will be placed in its place.
  104. Currently Pixi comes with blueprints for struts, rods and wheels, but support for more blocks is ongoing.
  105. If you'd like a certain block blueprint to be added to Pixi, please contact NGnius on the <a href="https://discord.exmods.org">Exmods Discord server</a>.
  106. </p>
  107. </div>
  108. <div style="background-image: url('../../mods/Pixi/img-pixi-gc2.png'); background-size: 100%; background-position: bottom; background-repeat: no-repeat;">
  109. <img src="../../mods/Pixi/img-pixi-gc2.png" width="100%" style="visibility: hidden; vertical-align: middle;" />
  110. <div class="content-img-header" id="pixi-images">
  111. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  112. <span style="vertical-align: middle;">Image Importing</span>
  113. </div>
  114. </div>
  115. <div class="content-text" id="pixi-images-p">
  116. <p>
  117. <i><b>Pixi "[image filename]"</b></i> and equivalently <i><b>Pixi2 "canvas" "[image filename]"</b></i> convert an image to coloured blocks and places it beside you.
  118. High-opacity (>75%) pixels are converted to the block you're holding, medium-opacity (>50%) pixels are converted to glass and low-opacity (<50%) pixels are skipped.
  119. <br/><br/>
  120. <i><b>Pixi2 "text" "[image filename]"</b></i> converts an image to text and places a text block with that text beside you.
  121. <br/><br/>
  122. <i><b>Pixi2 "console" "[image filename]"</b></i> converts an image to text and places a console block beside you which changes the specified text block.
  123. </p>
  124. <p><span class="tab"></span>
  125. In the previous commands, anything between (and including) <i><b>[</b></i> and <i><b>]</b></i> is a command argument that you must replace.
  126. Do not remove the quotation marks -- those are required for the command to work.
  127. These commands assume that the specified image is in the same folder as Gamecraft.
  128. If your image is in a different folder, please provide the full filepath (eg C:\path\to\image\my_image.png) and put a @ before the quotation marks.
  129. The <i><b>Pixi</b></i> coloured block feature also has a hidden rotation property.
  130. By default, the image will be placed along the xy-plane (rotation 0,0,0).
  131. </p>
  132. <p><span class="tab"></span>
  133. For example, if you want to import an image called <i>pixi_art.png</i> that's stored in Gamecraft's installation directory, execute the command <span style="display:inline-block;"><i><b>Pixi "pixi_art.png"</b></i></span> to load the image as blocks.
  134. It's important to include the file extension, since Pixi isn't capable of black magic.
  135. </p>
  136. <p><span class="tab"></span>
  137. Image to blocks conversion with <i><b>Pixi</b></i> or <i><b>Pixi2 "canvas"</b></i> read a file in PNG or JPG format and converts every pixel to the nearest Gamecraft block colour.
  138. Adjacent blocks with the same colour are converted into a single scaled block to reduce the performance impact from larger images.
  139. The combination of colour quantization and optimisation usually results in a 50-75% reduction in block count for an image (compared to 1 block per pixel).
  140. </p>
  141. <p><span class="tab"></span>
  142. Image to text conversion with <i><b>Pixi2 "text"</b></i> and <i><b>Pixi2 "console"</b></i> converts every pixel from a PNG or JPG image file into a coloured square text character.
  143. This process does not optimise for similar adjacent pixels, so images will become more than 10x larger when converted to text.
  144. As a result, images larger than 64x64 pixels are very likely to cause issues with Gamecraft performance and stability.
  145. To ensure that everyone can enjoy your game, and to avoid save corruption, use Pixi's image to text commands sparingly and only for small images.
  146. </p>
  147. </div>
  148. <div class="content-header" id="pixi-commands">
  149. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  150. <span style="vertical-align: middle;">Pixi vs Pixi2</span>
  151. </div>
  152. <div class="content-text" id="pixi-commands-p">
  153. <p><span class="tab"></span>
  154. To make your life easier, <i><b>Pixi</b></i> and <i><b>Pixi2</b></i> guess what you want to do so you don't have to memorise niche incantations.
  155. To accomplish this, <i><b>Pixi "[thing]"</b></i> uses the thing to guess what to do.
  156. In the background, Pixi uses sneaky info like the file extension (or lack thereof) to guess correctly.
  157. Similarly, <i><b>Pixi2 "[spell]" "[thing]"</b></i> uses the spell to guess what to do.
  158. Behind the scenes, every importer has a name which Pixi uses to match the spell to a caster.
  159. </p>
  160. </div>
  161. <div class="content-header" id="pixi-dev">
  162. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  163. <span style="vertical-align: middle;">Development</span>
  164. </div>
  165. <div class="content-text" id="pixi-dev-p">
  166. <p><span class="tab"></span>
  167. You don't have to be a developer to help out! Please read the <a href="https://git.exmods.org/NGnius/Pixi#user-content-development">Development section</a> of Pixi's README if you're interested in contributing to Pixi.
  168. </p>
  169. </div>
  170. <div class="content-header" id="pixi-ack">
  171. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  172. <span style="vertical-align: middle;">Acknowledgements</span>
  173. </div>
  174. <div class="content-text" id="pixi-ack-p">
  175. <p><span class="tab"></span>
  176. PixiBot uses the Factory to download robots, which involves a partial re-implementation of
  177. <a href="https://github.com/NGnius/rcbup">rcbup</a>.
  178. Robot parsing uses information from
  179. <a href="https://github.com/dddontshoot/RoboCraftAssembler">RobocraftAssembler</a>.
  180. </p>
  181. <p><span class="tab"></span>
  182. Gamecraft interactions use the <a href="https://git.exmods.org/modtainers/GamecraftModdingAPI">GamecraftModdingAPI</a>.
  183. </p>
  184. <p><span class="tab"></span>
  185. Thanks to <b>TheGreenGoblin</b>, who created the Python app for converting images to coloured square characters which inspired the <i><b>Pixi2 "console"</b></i> and <i><b>Pixi2 "text"</b></i> commands.
  186. </p>
  187. <p><span class="tab"></span>
  188. Thanks to <b>Mr. Rotor</b> for all of the Robocraft blocks used in the <i><b>Pixi2 "robot"</b></i> command.
  189. </p>
  190. </div>
  191. <div class="content-header" id="pixi-disclaimer">
  192. <img src="../../mods/Pixi/pixi-logo.png" width="4%" style="vertical-align: middle;" />
  193. <span style="vertical-align: middle;">Disclaimer</span>
  194. </div>
  195. <div class="content-text" id="pixi-disclaimer-p">
  196. <p><span class="tab"></span>
  197. Pixi, Exmods and NGnius are not endorsed or supported by Gamecraft or FreeJam. Modify Gamecraft at your own risk.
  198. Read the <a href="https://git.exmods.org/NGnius/Pixi/src/branch/master/LICENSE">LICENSE</a> file for licensing information.
  199. Please don't sue this project or its contributors (that's what all disclaimers boil down to, right?).
  200. <br />
  201. For more information, refer to Pixi's source repository: <a href="https://git.exmods.org/NGnius/Pixi">https://git.exmods.org/NGnius/Pixi</a>
  202. <br /><br />
  203. Pixi is not magic and is actually just sufficiently advanced technology that's indistinguishable from magic.
  204. </p>
  205. </div>
  206. </div>
  207. <footer>
  208. <div style="padding: 0.5%; padding-left: 1%; padding-right: 1%;">
  209. Pixi is developed by <a href="https://twitter.com/NGniusness">NGnius</a>|hosted on exmods.org|<a href="https://git.exmods.org/ExMods/html-site">Site Repository</a>|<a href="https://exmods.org">Home</a>|<a href="https://discord.gg/2CtWzZT">Discord</a>|<a href="https://twitter.com/GamecraftMods">Twitter</a>
  210. </div>
  211. </footer>
  212. <!-- Ssshhhh! Sneaky stuff -->
  213. <div id="pixi-flight" style="position: relative; animation-name: swoop; animation-duration: 0.75s; bottom: 500%; text-align: center;">
  214. <img src="../../mods/Pixi/pixi-double.png" width="33%" />
  215. <script>var pfa = document.getElementById("pixi-flight"); pfa.addEventListener("webkitAnimationEnd", () => {pfa.style.display = "none"}); pfa.addEventListener("animationend", () => {pfa.style.display = "none"});</script>
  216. </div>
  217. </body>
  218. </html>