Jump to content
A 2021 backup has been restored. Forums are closed and work in progress. Join our Discord server for more updates! ×
SoaH City Message Board

AutoScrolling Boss battles


J-MaxVG

Recommended Posts

I'm trying to design an auto scrolling boss level, I seem to have a problem with keeping Sonic and the boss in the view. The boss should always be on the right and Sonic should be able to move freely within the view's borders while running right.

Basically what I'm trying to figure out is, how in the world do I keep Sonic from going out of the view. I'm using Game Maker 8.1 for development.

Link to comment
Share on other sites

Make a condition where sonic's relative X and Y can be limited by a max and min.

At the start, you would make that condition 1, signifying that it should limited. Then at boss death, you would set it back to 0, letting the player have free control of Sonic.

Instead of just one condition, you could have 5. The first doing what I just described, 2 showing how low Sonic's X and Y coordinates can be, and the last 2 showing the maximum that they can be.

The only downside to this is that to my knowledge the 4 cannot be changed, their fixed... Well you might be able to change them by having Sonic pass through a invisible zone at the start of the Act that sets the 4 conditions to something else.

Link to comment
Share on other sites

Only problem is that Game Maker doesn't directly work with conditions. He'd need to use "if" for everything in that manner. (Other kewl ways too, advanced though)

Create the border and make it follow the view. If Sonic hits the right border, set his speed to something slower than the view is moving. If he hits the left border, set his speed to something faster than the view. He will sorta bounce off the edges, but won't be able to leave it. You can tune it to make it almost not notable. Alias, if the view moves at a speed of 4, make Sonic run at 3.5 when he hits the edge. It will be a minor bounce, and Sonic will stay in the view.

Link to comment
Share on other sites

Or the cheap way would be to just have the background and the floor moving while the view remains in one place to give the illusion that the level is moving. Then stop everything when the boss is defeated. Sonic's animation would always be set to running in this case until the boss is done.

Link to comment
Share on other sites

Or the cheap way would be to just have the background and the floor moving while the view remains in one place to give the illusion that the level is moving. Then stop everything when the boss is defeated. Sonic's animation would always be set to running in this case until the boss is done.

That wouldn't work, since Sonic wouldn't be pushed to the left if he's not moving. Also makes for some wonky controls, as you could make Sonic jump backwards, although he appears to be running to the right at high speed.

Link to comment
Share on other sites

I suppose you could be super lazy and glue Sonic to the left pane if he hits it and the player isn't pressing anything. (Then force him into his running animation.)

Also, just from my experience with MMF, if Sonic is clipping through the sensor, make the sensor bigger. He's probably clipping through it because he's moving so fast that the distance he travels in one frame is wider than the sensor.

Link to comment
Share on other sites

  • 2 weeks later...

Or technically speaking, Sonic does not have to be moving at a constant minimal speed. You can lock Sonic's running animation, give him a constant horizontal force to push him back to one side and draw a repeating floor and background and move it as if it would when Sonic is running at a certain speed. That way you eliminate huge jumps in position. It's almost as if he's running on a treadmill.

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...