egomassive, that's actually really interesting. What do you mean by "shoot every 2.7 seconds and 0.1 to 0.8 seconds"
Now that I've thought about it more, I don't think the "Every n
th seconds" command is coupled with random numbers. However there are many event which use a frame-rate based counter where events happen after a random number of frames. These are set up like:
If counter <= 0, then set counter to 100 + (a random number between 0 and 20).
If counter == 1, then act.
Subtract 1 from counter.I couldn't tell you which enemies use which methods or what the actual times/frame counts are, but if the shooters have no variation in their timing, then there probably isn't a random number involved there. However there are still random factors at work in their erratic movements and choosing which one will fire. At least that's how I recall it working.
How is momentum factored into the game? I know it's a general question, but it seems to me like Juni moves faster when she's jumping as opposed to when she's merely walking or running. And this has caused me to do some stuff where momentum would be the only explanation for the discrepancy.
Juni has momentum, but it's very small. All her movement is controlled by an extension for MMF. Programmers can't see how extensions work (which is incidentally why Nifflas is moving away from programming with MMF,) so I can't say for certain if jumping makes you run faster, but I don't think it does. There are maximum speeds for running, walking, and falling. But, these maximums are not speed limits. There is also a set rate of acceleration, which is very high. It takes almost no time to reach maximum speed or to stop. Theoretically, an enemy could be designed to throw Juni at a much faster speed. You can see this in upward movement. If Juni climbs and jumps she'll gain greater height than by jumping alone. Also, updrafts and spring platforms can accelerate her. In the source, when Juni jumps a speed value is added to her upward velocity (instant acceleration). Then, the gravity value reduces upward velocity until she lands or reaches her max falling speed. It's possible that the extension leaks some of this velocity into the horizontal direction, but doubtful.
edit: As an aside, I'd like to point out that Juni does move faster if you jump/run across the screen rather than only run, however she'll cross the screen in the same amount of time. All those jump arcs add to the distance traveled, so Juni will travel a greater distance in the same amount of time, therefore Juni moves faster.