Design and logic for user-facing site https://exmods.org
25'ten fazla konu seçemezsiniz Konular bir harf veya rakamla başlamalı, kısa çizgiler ('-') içerebilir ve en fazla 35 karakter uzunluğunda olabilir.

104 satır
8.5KB

  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta name="theme-color" content="#20c420" />
  5. <meta name="author" content="Exmods community" />
  6. <meta name="keywords" content="exmods,gamecraft,modding,mod" />
  7. <meta name="og:type" content="website" />
  8. <meta name="og:title" content="Exmods" />
  9. <meta name="og:description" content="Gamecraft modding website" />
  10. <meta name="description" content="Gamecraft modding website" />
  11. <meta name="og:image" content="../static/favicon.png" />
  12. <meta name="og:url" content="https://www.exmods.org" />
  13. <meta charset="UTF-8" />
  14. <link rel="icon" href="../static/favicon.png" type="image/x-icon"/>
  15. <link rel="shortcut icon" href="../static/favicon.png" type="image/x-icon"/>
  16. <link rel="stylesheet" href="../static/style.css" type="text/css" />
  17. <title>Exmods | The Power of GamecraftScripting</title>
  18. </head>
  19. <body>
  20. <h3><a href="index.html" title="You know your browser has a back button, right?">Back to list</a></h3>
  21. <h1>The Power of GamecraftScripting,</h1>
  22. <h2>Or Why You Should Learn Python for Gamecraft</h2>
  23. <div class="text-content">
  24. <p>
  25. <span class="tab"></span>
  26. You should learn <a href="https://www.python.org/">Python</a>.
  27. </p>
  28. <p>
  29. <span class="tab"></span>
  30. If you're not interested in learning a programming language, you should reconsider.
  31. Computers are steadily taking over every industry (that they haven't already taken over), and their potential doesn't stop at work.
  32. To completely unlock the potential of computers, you have to be able to tell the computer exactly what you want it to do.
  33. Running a program restricts you to existing computer applications and to existing computer potential, but a computer language removes that restriction.
  34. With that sort of power at your fingertips, you can do anything from making a rocket fly (model and full-scale) to hacking the Pentagon (not recommended) to annoying your siblings (true story).
  35. Python is one of the easiest programming languages to learn, which makes it a great first language to grasp the basics of programming.
  36. In fact, it's the first programming language I learned.
  37. Python is also the second most popular programming language, according to <a href="https://insights.stackoverflow.com/survey/2019#technology">StackOverflow's latest developer survey</a>.
  38. The most popular language, according to that survey, is JavaScript, but that's a
  39. <a href="https://en.wikipedia.org/wiki/ECMAScript#Versions" title="Error support was added in the third major update">strange</a>
  40. <a href="https://stackoverflow.com/a/35458829" title="Consistent operation and performance, what's that?">beast</a> that I try to stay away from.
  41. If work and play aren't enough to make you interested in learning Python, I'm not sure what is.
  42. </p>
  43. <p>
  44. <span class="tab"></span>
  45. GamecraftScripting provides Python integration for Gamecraft using <a href="https://ironpython.net/">IronPython</a>,
  46. allowing for Python code to use C# APIs like the
  47. <a href="https://git.exmods.org/modtainers/GamecraftModdingAPI">GamecraftModdingAPI</a>.
  48. That means you can write a Python script to do anything that mods like <a href="https://git.exmods.org/NGnius/Pixi">Pixi</a>
  49. and <a href="https://git.exmods.org/ExtraCommands/extracommands">ExtraCommands</a> do.
  50. I usually use Python to test my C# mods before I release them publicly, so I call tell you first-hand that Python is just as powerful as C# without its complexity.
  51. I've also used GamecraftScripting to prototype functionality, since Python is easy to write.
  52. But you don't even need to know C# to write a Python script for Gamecraft.
  53. </p>
  54. <p>
  55. <span class="tab"></span>
  56. The abilities that Python offers don't end at mods, either.
  57. I've heard a few people expressing the desire for actual variables in Gamecraft, which can be done with one line of code in Python.
  58. You can run a Python script to do things that in-game logic gates can't accomplish on their own.
  59. Python scripts can even interface seamlessly with signals and wires using the GamecraftModdingAPI, and you can run a script from any console block for seamless integration.
  60. This can be a powerful tool for gamemakers, with uses from teleporting a player to another player's location to creating automatically-generated game sections.
  61. Gamecraft circuit system is <a href="https://en.wikipedia.org/wiki/Turing_completeness">Turing complete</a>
  62. (just like <a href="https://www.youtube.com/watch?v=uNjxe8ShM-8">PowerPoint</a>!), but it's limited to accessing in-game information.
  63. But you could write a script to access the internet or to play a minigame using a level stored as a text file!
  64. If you're feeling brave, you could even pass that information as data to be processed by Gamecraft logic circuits.
  65. As a real-world example, I'm currently working on adding animations into a game using a combination of in-game logic, Pixi and Python to make it work.
  66. The power of programming offers infinite capabilities for gamemakers and tinkerers alike.
  67. </p>
  68. <p>
  69. <span class="tab"></span>
  70. Usually, when writing code, I use an Integrated Development Environment (IDE) to make the task easier.
  71. An IDE provides the user with an all-in-one solution to program and run code with sprinkles on top, like auto-complete and spell-checking.
  72. Recently, I added some similar functionality to GamecraftScripting.
  73. Using the ToggleIDE command, in modded Gamecraft, GamecraftScripting will enable some of the features an IDE would normally have.
  74. The ToggleIDE functionality is still a work in progress, but right now it offers improved command auto-complete but you'll still need to use an external text-editor to write your code.
  75. In the future, hopefully I can expand its functionality to editing text directly in Gamecraft, to make it a truly integrated IDE experience.
  76. Once you've developed a script that you want to include with your game, there's also a tool to package the Python code into the game.
  77. This tool simplifies distribution so you don't have to worry about getting another file to players somehow.
  78. Using built-in tools, GamecraftScripting can make learning Python easy by replacing the IDE with the familiarity of Gamecraft and your preferred text editor.
  79. </p>
  80. <p>
  81. <span class="tab"></span>
  82. Now that your head is bursting with the amazing possibilities that Python and GamecraftScripting offer, let me bring you back to Earth with some of its limitations.
  83. GamecraftScripting's Python support is held back by IronPython's development speed, so GamecraftScripting only supports Python2.7,
  84. which is officially unsupported by the Python Software Foundation as of January 2020, unfortunately.
  85. This shouldn't affect you, but you'll have to avoid tutorials and functionality for Python3 and instead seek out stuff that supports Python2.7 versions.
  86. Hopefully in the near future I'll be able to upgrade to IronPython3 to remove this limitation.
  87. The other notable issue with GamecraftScripting's Python is it can't use most external Python libraries.
  88. All of Python's standard libraries are supported, but a lot of Python's amazing package library doesn't like Python running in Gamecraft (or any other C# app that uses IronPython).
  89. So far I haven't had any problems with those limitations, so I'm sure you won't be limited by them either.
  90. </p>
  91. <p>
  92. <span class="tab"></span>
  93. So what are you waiting for? Python and GamecraftScripting are out there, waiting for you to dive in and learn something that you'll be able to use for years to come.
  94. If you're lucky, you'll even have make some cool Gamecraft creations while you're at it!
  95. </p>
  96. </div>
  97. <footer>
  98. 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>
  99. </footer>
  100. </body>
  101. </html>