5 ms·
> Is that what the custom language is doing? Why would that be necessary? Sorry, I guess instead I should ask "How does your engine fire at locations that are
by anonymoushn 2y ago
> Is that what the custom language is doing? Why would that be necessary?
Sorry, I guess instead I should ask "How does your engine fire at locations that are evaluated in the past?" One way is to keep a queue.
Honestly this whole business of targeting locations in the past is not a dealbreaker to me. I don't know of games that need it. It's sufficient to implement this sort of delay by spawning some non-damaging thing under the player and having it spawn bullets later, or aiming at some time and then firing later.
> Even if you wanted to write new stuff, why not just use lua?
I listed some reasons here: https://news.ycombinator.com/item?id=41257693 https://news.ycombinator.com/item?id=41257693
- CyberDildonics 2y agoSorry, I guess instead I should ask "How does your engine fire at locations that are evaluated in the past?" One way is to keep a queue. Again, how does the language do it? If you query past values you can then know to keep track of past values. Also there is no reason to use coroutines to make game bullets. You can just let a function keep track of state if it needs to and call it every frame. At the core of all this is classic examples of over complicating things. As soon as someone declares they are making a brand new language with VM and coroutines to decide how bullets emit in a simple shooter, anyone else involved should be stepping in and putting a stop to it.
- anonymoushn 2y ago> Again, how does the language do it? If you query past values you can then know to keep track of past values. I don't think that asking for something causes you to have recorded it in the past! In the various languages you would aim and then wait. Here it is in Firedancer: aim() wait(18) and in BulletML: <action label="main"> <fire> <direction type="aim">0</direction> <bullet> <speed>1</speed> <action> <vanish/> </action> </bullet> </fire> <wait>18</wait> <fire> <direction type="sequence">0</direction> <bullet> <speed>2</speed> </bullet> </fire> </action> This is a bit of a hack. We fire a bullet that immediately disappears to set our firing direction for the direction type="sequence" that we will use 18 frames later. > Also there is no reason to use coroutines to make game bullets. You can just let a function keep track of state if it needs to and call it every frame. Quite uniformly, developers of bullet hell games do not want to separate their code into basic blocks delimited by any part that might involve time passing in the game, and they don't want to give up on subroutines existing. Turning all of your code inside-out and giving up on subroutines existing obviously makes the work extremely tedious and makes it hard to iterate or to know what's going on in some file you haven't touched in a week. I don't necessarily advocate for making a new language and VM, but if you review the tools people actually use for this stuff, nobody does what you say everyone should be doing. For a third example, here's a danmakufu tutorial in which we learn that we should make Marisa's laser not freeze the game by adding a yield to a loop: https://sparen.github.io/ph3tutorials/ph3u1l5.html https://sparen.github.io/ph3tutorials/ph3u1l5.html I have done this stuff in lua, but in any real game I would probably want the game state to be serializable.
- CyberDildonics 2y agoI don't think that asking for something causes you to have recorded it in the past! You don't think it's possible to read the file when the game loads, see a negative number, and save previous values? in which we learn that we should make Marisa's laser not freeze the game This seems to be a common theme with coroutines, the idea that it's solving a problem that can't be solved any other way (except for how it's been solved in the ten thousand other games over the last 40 years). I have done this stuff in lua, but in any real game I would probably want the game state to be serializable. http://lua-users.org/wiki/TableSerialization http://lua-users.org/wiki/TableSerialization
- anonymoushn 2y ago> You don't think it's possible to read the file when the game loads, see a negative number, and save previous values? That's why we were going to evaluate the locations that we could look into the past for on frames when we weren't looking for them. You decided it wasn't necessary to do so. Can you link some of the ten thousand bullet hell games that are written in your preferred style? It seems like so far we have a lot of games written in one style that include certain kinds of complex behaviors and a lot of games written in another style that do not include these. So I am mostly comparing all of the output of ABA Games, ZUN, and almost every Touhou fan shmup on the one side to nothing on the other, rather than saying "wow, it's so impressive that people were able to make the amazing bullet patterns in Stephen's Sausage Roll with just switch statements!"
- CyberDildonics 2y agoThat's why we were going to evaluate the locations that we could look into the past for on frames when we weren't looking for them. You decided it wasn't necessary to do so. ...What? Can you link some of the ten thousand bullet hell games that are written in your preferred style? Games without coroutines? That's almost every game ever made. You realize most of these types of games originated in the 80s and 90s and were made in assembly right?