evi-luastg
evi-luastg
5 posts
A sideblog about LuaSTG
Don't wanna be here? Send us removal request.
evi-luastg · 4 years ago
Text
Resources for STG Game Design
Here are some resources I’ve found for designing STG’s (shooting games). I expect to update this at some point.
= = = = = = = = = = = = = = = =
= = = ENGINE SPECIFIC = = =
= = = = = = = = = = = = = = = = =
AFCD Tech: Guide to Danmakufu Ph3 (Programming in DNF; Some Tutorials Are Applicable to LuaSTG)
Ryann1908′s LuaSTG Tutorials (How To Use LuaSTG)
= = = = = = = = = = = = = = = = =
= = = GENERAL DESIGN = = =
= = = = = = = = = = = = = = = = =
AFCD Tech: Guide to Danmaku Design (Aesthetics, Theory)
How To Shmup by Electric Underground (Designed for Players First; Has Theories / Philosophy on the Design Behind Shmups)
Full Extent of The Jam (Player Guide; Need To Read This)
All Your Base Are Belong To Us? Shmups As A Source For Better Game Design by Luke McMillan (Big, 400 Page Thesis on History and Design of Shmups)
The Origin Of The Shmup Genre: A Historical Study from Gamasutra by Luke McMillan (Same Author as Above, More Accessible)
0 notes
evi-luastg · 4 years ago
Text
English Commentary on a Chinese LuaSTG Tutorial Pt 3
This part is about the remaining videos.
= = =
Video 4: https://www.bilibili.com/video/BV1st411N7Kg?p=4 tl;dr Some bits are unclear but from what I can tell, there are sections about symbols, infinite loops and sound
Content: There's about five parts / sections to this video.
The first part / stretch from 0:00 - 1:29 seems to be about symbols you can use in LuaSTG. If you've read the other posts, you'll know that the subtraction sign can be used to signify negative number, but it can also be used as a subtraction sign in formulas.
The other symbols are exactly as you can see.
+ is addition
*(asterisk) is for multiplication
/ (slash) is for division
Circular brackets are... circular brackets. In case you've forgotten high school maths, it's related to that "order of operations" stuff. I think it's also brought up to establish "this program uses circular brackets and not square brackets (that other programs might use)
I'm not too sure what ^ means, however. Likewise with %. My maths knowledge is pretty rusty... this unironically might be my first application of the topic since finishing high school ;\
I do remember (vaguely) something about percentages really being fractions. Maybe % is related to division in that case? I think ^ also means "to the power of". To the power of what? Dunno, just look it up. I told ya, I don't know maths.
= = =
The second part starts at around 1:57. I actually don't know what's happening in this part, so I'm skipping over it. A gentle reminder that the complicated setup in their example is because they're using the legacy LuaSTG editor. The Sharps editor can replicate the same thing wiht far less hassle using the "Create Simple Bullet Group" node (a node missing from the legacy editor)
= = =
At 03:00 (part 3 of the video) they bring up infinite loops. I'm not gonna make specific commentary on this because this is very basic level stuff. Here's a very useful link that can explain the concept better than I can. It's specifically for Danmakufu but the concept remains exactly the same. tl;dr don't make the game shoot bullets infinitely without pauses in between, and don't make the game wait infinitely either.
= = =
At 4:00 is part 4 of the video. I'm not actually sure what the topic is. I was certain it was about interval (reminder that interval doesn't exist for Repeat nodes in later editors, so it'd be about Wait nodes), but I actually really don't know. I will just comment on interesting stuff in the examples given.
At 4:52, you can see a formulas used in place of a value (i.e. increment 360/15. 360 divided by 15 is 24. If you put in 24 instead of 360/15 you'll get the exact same result).
At 5:40, you can see the Repeat node + Variable being used to determine the bullet spawning position. You have x%384-192 (value/position x on the grid) then 120 (position y on the grid). It looks like this:
(x%384-192,120)
It's basically taking the same concept from the last video (using Repeat + Variable) but instead of applying it to angle, it's being applied to the horizontal position of the bullet).
At 5:55, they use the Repeat with a Variable to increase the velocity / speed of each subsequent bullet in a bullet group. This is an example of another easier feature in the Sharps editor, as the Create Simple Bullet Group node has a Velocity begin + Velocity end feature.
At 6:01 is something interesting. They've placed a Repeat with a Variable instead of a Repeat with a Variable. You have a Bullet node, inside of a Repeat Node, inside another Repeat node. Take a closer look at the Variables; the second Repeat node's variable is ANOTHER variable [i.e. a2's initial value is a1's initial value]
I don't actually know what the tutorial is trying to explain but this process of putting a Repeat within a Repeat seems to be necessary when trying to use a Variable within a Variable. I've actually tried replicating the example with only one Repeat (i.e. use 1 Repeat Node, set Number of Variables to 2, Variables A1 and A2) but this just caused an error.
It seems that if you're going to use a Variable within a Variable, you will need at least two Repeat nodes; one establishing the first variable (A1), and a child node establishing the second variable (A2) that will make use of the first variable.
At 7:05 they go into adding sound. I don't know what else to add, this is pretty simple stuff. The video does conveniently mention which sound effects are the actual "bullet" sound effects (i.e. tan00, tan01, tan02, kira00, kira01 and kira02).
= = =
Video 5: https://www.bilibili.com/video/BV1st411N7Kg?p=5 tl;dr it's about RNG
They go into some Random Number Generators. This has been covered in Ryann1908's tutorials already; one in his longer tutorial (where he uses the function to mimic Sakuya's Eternal Meek spellcard) and one in his shorter tutorial (when it's been used to randomly pick a color for Marisa's stars shot). I've also mentioned Ran:Sign before; Ran:Sign is probably the least useful of these, because unlike Float or Int, where you can put a minimum and maximum value, Ran:Sign can only generate two values: either a positive 1 or negative 1. There is one parameter that actually benefits from this: throw it into a Bullet's Rotational Velocity parameter and see what happens.
This is all so basic that even the sparse LuaSTG Wiki has info on it.
= = =
Video 6: https://www.bilibili.com/video/BV1st411N7Kg?p=6 tl;dr The tutorial recreates two attacks from Touhou 7
This one was actually hard to understand until I recreated the pattern for myself. I don't know if this is exactly what is being said, but for the Chen section of the video:
When they're highlighting the slowest bullets, I'm 90% sure it's to say that these are the first bullets to fire. No, you read that right. The slowest bullets are the first bullets generated in the pattern. The secret sauce to this pattern is that each bullet has a higher velocity than the previous one, thanks to the magic that is Repeats and Variables.
When they're highlighting the fastest bullets, I think it's to mention those are the last bullets spawned. This should be true if we apply the logic from the previous section; if each bullet has a higher velocity than the previous one, the last bullets to spawn HAVE to have the highest velocity / be the fastest moving.
When they're highlight a single wave / barrage, I think it's to mention how the repeats work. With the way they've used Repeat, each wave is 15 bullets each, and the waves are fired 6 times (in 6 different angles).
You can recreate this by copying the same setup, just make sure you add a 2 frame Wait as a child of the first Repeat. It should go:
>Repeat 15 times >>Wait 2 frames >>Repeat 6 times >>>Create Simple Bullet
The Youmu recreation is a bit different. The "slowest bullets being the first bullets spawned" are the same. Unlike the "15 bullet barrage fired in 6 angles" with Chen's attack, it's actually "4 bullets fired from 16 angles" which definitely confused me (when I first saw the video, I assumed it was "16 bullets fired in 4 barrages). Note how they use Repeat + Variables again to decide the X and Y coordinates of the pattern.
There's a small section after the Youmu recreation. I do not know what it's explaining.
In the final section of the video, they show off a button that no longer exists in the Sharps editor that used to be in-between Pack Project and Run Project. From the design of the symbol, it seems to have been related to the Stage nodes?
= = =
Video 7: https://www.bilibili.com/video/BV1st411N7Kg?p=7 tl;dr ...I don't know what this video is about. It also doesn't need a tl;dr since it's only 30 seconds long...
Content: I really couldn't tell you what this video is trying to say. The first part uses some sort of "If Else" node which is something I'm especially out of my depth on. All I know about the "If Else" node is that you can use it to do multi-phase spellcard attacks (like most Stage 6 final spellcard attacks a la Miko or Shinmyoumau).
The rest of the video seems to be about making the Chen recreation more complete. They make two Repeats of Chen attacks (the first repeat is the one we saw before, with Orange bullets; the second repeat has Green bullets and fires in the opposite direction by changing the increment to a -7 instead of a +7). The attack also seems to have more RNG, as a Ran:Float has been added into the formula (a=Ran:Float(0,360), increment 7 -> a1=a, increment 60)
= = =
Video 8: https://www.bilibili.com/video/BV1st411N7Kg?p=8
tl;dr ...dunno. I think it's about running multiple tasks? It's a shortie. It's also the last tutorial in this series...
Content: The last video is a bit confusing. Considering the example shown at the end, where Mokou is firing two streams of bullets (the green bullets moving in a counter clockwise direction, and the blue swords in a clockwise direction), my guess is that it's about running two separate Repeat + Variable streams of bullets.
I read this in a different tutorial, but you can basically run multiple tasks at the same time. This knowledge can be very helpful if, for example, you ever wanted to make a boss use the Move To / Move By node while also firing bullets. I *think* that they're saying "you can do these two streams at the same time if you run them in different tasks". But I'm not 100% sure that's the case.
And to be honest, I don't think that, if that is what they're saying, that it's necessary. At least it's not for newer versions of LuaSTG. I know for sure that you could run those two streams (purple and cyan) in the same Repeat node if it was the Sharps editor. All you'd have to do is establish two Variables in the Repeat node, then give the separate Bullets / Bullet Group a specific node. Put both bullets as the child of a Repeat node and bam. That's it.
The last thing I'll note is that this video was last made in 2019. So the chances of a continuation seem slim...
= = =
Conclusion
So that was one tutorial down. There are actually three other Chinese tutorials, though this tutorial is the only one that is in a video format. The other tutorials, especially the one about coding in LuaSTG are harder to follow just bc of this difference.
If I get the time, I'll try to do commentaries on the other tutorials. I at the very least, plan to do ONE commentary on the others since I've been able to follow it very easily (it's this one. It has animated gifs and while it goes into some complicated concepts, it's been more rewarding to follow than the others).
You can find the other Chinese tutorials on the LuaSTG Shoutwiki. Note that while it shows 2 video tutorials, it's actually only 1 (the one we just covered) since the other video tutorial is no longer available on Bilibili
1 note · View note
evi-luastg · 4 years ago
Text
English Commentary on a Chinese LuaSTG Tutorial Pt 2
This part is about combining the Repeat node with Variables
Keep reading
2 notes · View notes
evi-luastg · 4 years ago
Text
English Commentary on a Chinese LuaSTG Tutorial Pt 1
Here are my personal notes on (one of) the LuaSTG tutorials I’m going through. Disclaimer: I don’t know Chinese, so this isn’t a translation of the tutorial. This post more has “sharing my homework” vibes. The tutorial, (which is linked on the LuaSTG Wiki) is here.
Keep reading
1 note · View note
evi-luastg · 4 years ago
Text
List of Common Errors in LuaSTG
This quick reference post is about common errors you might get when using LuaSTG. This post is a WIP. Updated 08 / 05 / 2021
= = = 
Troubleshooting in General
If you’ve done something in LuaSTG that “breaks” the game / causes your project to be unable to load when testing your project, I recommend using Ctrl Z and Ctrl Y (i.e. Undo and Redo) to retrace your steps. While it is tedious, using Undo and then trying to boot the game up after each undone step is one slow but surefire way of figuring out what step caused the error. 
= = = = = = = = = = = = = = = =
The Common Errors
= = = = = = = = = = = = = = = =
Creating an infinite “Repeat” node that only Waits or only shoots Bullets
This will probably the first error you run into. Basically, if you’re creating an infinitely repeating Repeat node, you don’t want the node to shoot Bullets without any Wait nodes and you don’t want an infinitely repeating Repat node that only has Wait in it. Doing either of these will crash the game because the game will be stuck in an infinite loop of either Waiting or Shooting Bullets on frame 1. To fix these problems, make sure you add whatever is missing (so if it’s Repeat with only Create Bullet, add a Wait node, and if it’s Repeat with only Wait, add a Create Bullet node)
Note that this ONLY applies if you’re using a Repeat node set to repeat infinitely. If the Repeat node isn’t repeating infinitely, you can leave Wait or Shoot by itself. The error only happens with Repeat nodes set to loop infinitely.
Defining [x] node etc. and not giving [x] node a name
This one is rather obvious but don’t forget that when you Define Bullet, Define Laser or Define Whatever you have to actually name that Node something. Even if it’s not being used, your newly created Node needs a name. This also applies to “Load [x] nodes” like “Load Background Music” or “Load Images”
Creating a “Load Background Music” node and leaving the “Loop end” and “Loop length” parameters blank
Don’t leave those parameters blank or LuaSTG crashes. Even if you don’t want your track to have a perfect loop, you have to put a 0 in both paremeters
Naming Variable
I have just discovered that variable names cannot have spaces. For example if you try to create a variable called “spawn angle” you will get an error. There must be no spaces (i.e. “spawnangle”)
Faulty Formulas
I have also noticed that when it comes to formulas, you don’t want to do soemthing like “30^3(variable iii)”. Put the ^ sign AFTER the brackets.
1 note · View note