Tutorial 1 ~ Introduction on LuaSTG Editor

From LuaSTG Wiki
Jump to navigation Jump to search

Introduction[edit | edit source]

Part 1 - What is the LuaSTG engine?[edit | edit source]

The LuaSTG engine was created by 隔壁的桌子, that later dropped the engine and was taken by Wuer (无耳). The engine is now maintained by Xiliusha, on GitHub. These tutorials are made for LuaSTG Ex Plus, specifically, which comes with a code generation tool that we call "editor". Many advanced users ditch the editor after some months of using the editor to code by hand instead of using that tool. However, I'm gonna focus on the editor for now, for new users to have an easier understanding of the engine.
LuaSTG was made for Windows, but some signs of running it on Linux or MacOS have been reported. I personally don't have any experience with any of those other systems, so I can't assure the engine will run on them 100% correctly.

Part 2 - What are these Tutorials?[edit | edit source]

The tutorials are based around this editor and THlib, a library that comes with it that has ZUN assets for a more refined look and more complex design, so that the user has a pre-made good-looking base. However, it is not recommended to publish a game using the assets that come with THlib. In comparision with Danmakufu, another danmaku-style engine, LuaSTG provides a GUI for newcomers, while Danmakufu doesn't. It's not necessarily superior, but on some aspects, each of those engines are better, or worse. It's up to the developer to choose which engine they'll develop on.

Part 3 - What Other Resources can I Use?[edit | edit source]

Unfortunately, unlike some other engines, LuaSTG documentation, resources and tutorials in general are very scarce. Your best bet is really this wiki, and the LuaSTG baidu forums, but even then, there is still currently very few things you can use to help the development of things utilizing this engine. Plus, the forums are in chinese, so it's gonna be really difficult if you don't know how to speak that language. To complement this, there are also very few developers that use this engine and speak english.
Anyway, together with tutorials on how to use the engine itself, I'm also gonna provide some other resources for you to use as a base, but if you'd like to edit them to fit your tastes, I will recommend some programs for you.

Program Function Usage
Pdn.png Paint.NET Image editing You can use this program to edit the various files I'll be providing throught the tutorials, and along with some plugins, you can even create some graphics yourself! I recommend this program a lot.
Mdbg.jpg MediBang Paint Image editing I recommend this program a lot because of it's wide variety of tools to use, and in case you want a more detailed look in your sprites, this program is very good for that.
Pts.png PaintTool Sai 1 or 2 Image editing A paid alternative to MediBang. I use it to draw for my projects.
Audc2.png Audacity Sound editing This is a free and open-source program that is perfect for editing audio, and is simple enough for you to make some customizations on the audios you can use on your projects.
Npp.png Notepad++ Text editing If you want to alter some default settings on LuaSTG's code, this is a great program to do that.

Part 4 - Tips Pre-Production[edit | edit source]

Before putting your idea on the paper, I have some tips for you, speaking from past experiences. Always think before doing something. For example, if you're going to do a pattern, don't just start programming things before having an idea of what to do previously. Since you're a starter, don't think you'll be doing a gigantic multi-phased survival attack just on your first try. It takes some time before you can really start doing some sicknasty stuff.
Also, make sure to replace the default assets when releasing a full game. If you're only releasing the stage, it is fine if you only share the data located in "mod" from it.

Part 5 - Getting and Playing on LuaSTG[edit | edit source]

You can download the engine on the main page of this wiki. Usually, games made on LuaSTG come in two formats:
Simple stages usually come with only the information needed to run it, and don't usually alter many things from the engine itself. You can relate it to simple scripts like danmakufu's. To open those, check if the files inside contain _editor_output.lua and root.lua. If those two files are present, then find the mod folder inside LuaSTG and put the game there. Then, open the launcher, and select the game, and play. Bigger games usually come with an executable with them, so just open those and play the game.

Overlook[edit | edit source]

Well, I guess this was a bit of it. I'll continue these tutorials soon. I suppose you've understood how they'll work, right? If not, please re-read. Talking about reading again, if you ever need to, please come back to these tutorials, rather, any of them, and read again, that'll help a lot, specially the previous one, since many terms I used, and will use, are explained there. In case you still don't understand, feel free to contact me, go to my profile and there are some ways to get in touch with me. Thanks for reading!