3 ms·
> 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 y
by 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?
- anonymoushn 2y ago> ...What? Here's where you dismissively suggested that evaluating and storing locations that might be asked for in the future was unnecessary: https://news.ycombinator.com/item?id=41266544 https://news.ycombinator.com/item?id=41266544 > Games without coroutines? That's almost every game ever made. Bullet hell games? None? Honestly it took several tries for me to come up with a game that lacks an internal language and VM (e.g. StarCraft and WoW have at least 1 and at least 2 respectively). Stephen's Sausage Roll seems like a potentially winning bet only because I don't think you can make all of it in PuzzleScript, which is what the author normally uses. > You realize most of these types of games originated in the 80s and 90s and were made in assembly right? There weren't any of these games prior to Batsugun in 1993. According to the people who have reverse engineered the games, the more well known DoDonPachi DaiOuJou in 2002 used the same level planner that Toaplan used for Batsugun. Assembly obviously has coroutines, but we know that these games did not use a coroutine implementation for their bullet patterns. I obviously don't work at CAVE and can't just ask the devs what they were thinking, but if you play these games on the original hardware, even though every bullet has no behaviors attached the game will start to run slow when there are a lot of bullets on screen (and the game seems to be tuned around this fact). So I expect that even if the developers wanted to make the sorts of things we have in modern games, they would run too slowly to be practical. To be fair, modern games that use danmakufu or ZUN's ECL or BulletML or Firedancer or Lua would probably have less distinction between "enemies" and "bullets" and the "enemies" in these games often do have some behavior attached. In the case of DoDonPachi DaiOuJou, each enemy that spawns uses one of a small fixed table of movement patterns. I'm not sure what the claim about "most of these types of games originating in a certain time period" really means. A majority of bullet hell games were probably made in the last decade, and that will probably continue to be true for a long time. If you mean that it's common for these games to contain references to games from the 90s, I agree, but that has nothing to do with whether modern games are written in assembly or how the behaviors are scripted.