The best way to control the scrolling of a shmup?
15 posts
• Page 1 of 2 • 1, 2
The best way to control the scrolling of a shmup?
Hey friends!
Just, wow, what happened here? Their was so many post before but all are gone like that...
Well I have a question. I'm making a horizontal shmup, and I'm willing to make it with a path-based scrolling, like Dodonpachi Daifukkatsu and Mushihimesama Futari where the camera don't simply goes up, but do some sliding.
I'm having difficulties to choose the best way to control such camera.
- Do I use a speed-based control, where I say the camera wich speed to go between 2 points of the path
- Do I use a time-based control, where I say the camera to do all the way in a defined time and control the variation with key-frame on a timeline or what...
- Or do you have another kind of control wich would be intuitive and easy to configure?
Well I hope I'm not the only one wich have those kind of thought. :]
Long life to shmup-dev!
Just, wow, what happened here? Their was so many post before but all are gone like that...

Well I have a question. I'm making a horizontal shmup, and I'm willing to make it with a path-based scrolling, like Dodonpachi Daifukkatsu and Mushihimesama Futari where the camera don't simply goes up, but do some sliding.
I'm having difficulties to choose the best way to control such camera.
- Do I use a speed-based control, where I say the camera wich speed to go between 2 points of the path
- Do I use a time-based control, where I say the camera to do all the way in a defined time and control the variation with key-frame on a timeline or what...
- Or do you have another kind of control wich would be intuitive and easy to configure?
Well I hope I'm not the only one wich have those kind of thought. :]
Long life to shmup-dev!
Spidyy
Re: The best way to control the scrolling of a shmup?
Hi Spidyy - you can find an explanation for the new forum here: http://www.shmup-dev.com/?p=10
There's also a link to the old forum and lots of other news stories on the new frontpage.
As for your camera controls, it sounds like you're thinking of designing your game so that the player and camera move along the level as the stage progresses.
I prefer to have my camera static, and make the background scroll past. From the player's point of view it all looks the same, but it makes your code much simpler as now all your player movement and camera movement are relative to a fixed point (the world origin). You only need to move your camera in one dimension when the player is near the edge of the screen and you want the view to scroll with them slightly.
There's also a link to the old forum and lots of other news stories on the new frontpage.
As for your camera controls, it sounds like you're thinking of designing your game so that the player and camera move along the level as the stage progresses.
I prefer to have my camera static, and make the background scroll past. From the player's point of view it all looks the same, but it makes your code much simpler as now all your player movement and camera movement are relative to a fixed point (the world origin). You only need to move your camera in one dimension when the player is near the edge of the screen and you want the view to scroll with them slightly.
| | | |
Re: The best way to control the scrolling of a shmup?
Thanks for the explanation.
Well, I'm using Unity and it transform parenting system. It is simpler for me to move the camera, with the objects attached to it, than move the whole background.
But in a way, the problem is still the same, I need to move something. =)
Well, I'm using Unity and it transform parenting system. It is simpler for me to move the camera, with the objects attached to it, than move the whole background.
But in a way, the problem is still the same, I need to move something. =)
Spidyy
- TiaoFerreira
-
- Posts: 54
- Joined: Sun Jul 29, 2012 1:54 am
- Location: Natal - RN, Brasil
Re: The best way to control the scrolling of a shmup?
Show us an example what you want. If I understand you, you want to move background elements, when move player ship?
It is possible to do using inverted axis for elements, for example: if you move your ship to up, background moves to down. This cause an effect of considerable speed. You can use simple scroll from right to left side of screen, and apply the inverted axis for vertical controls.
I don't know if this you want, this is the reason that we need to see what you have ready.
It is possible to do using inverted axis for elements, for example: if you move your ship to up, background moves to down. This cause an effect of considerable speed. You can use simple scroll from right to left side of screen, and apply the inverted axis for vertical controls.
I don't know if this you want, this is the reason that we need to see what you have ready.
SENTA A PÚA!
- BPzeBanshee
-
- Posts: 17
- Joined: Mon Aug 20, 2012 7:12 am
Re: The best way to control the scrolling of a shmup?
I'm not terribly familiar with the Unity engine but thundersonic of Shmups Forums might be able to help you out as he is now using the Unity engine for Thunder Force IV Rebirth.
I'm not sure if this will help you considering I don't use Unity, but this is a question that has stumped me considerably in Game Maker as well, especially considering the ship tends to lag behind or ahead of the screen if you aren't using set variables when scrolling. I came up with three methods in the end:
1. Have a single room of game size (320x320, 240x320 window so with wobble scrolling) with the backgrounds appear to scroll down, and then scroll faster when the boss appears.
2. Have a room of game size width but height being very high (preliminary height of some 6/8000, 320 width in 240x320 window with wobble scrolling), setting to the bottom of the room at the start and then moving the view up.
3. Have a room of whatever size and having the view scroll at a set speed and change direction on how close it is to the end of the room (240x320 and no wobble scrolling because I couldn't figure out how to keep it without going weird).
http://www.youtube.com/watch?v=AOqcPELLO_8 - not the best game in the world (especially if you've been spoiled by Cave) but that's a fine example of the first method to simulate the appearance of going in different directions, and I suspect it's how Cave does it to some extent in its games. If you can make your view equivalent in Unity actually move around a room with the smoothness of what's in that video, and then go to a background-looping basis for boss sequences I'll be very impressed.
I'm not sure if this will help you considering I don't use Unity, but this is a question that has stumped me considerably in Game Maker as well, especially considering the ship tends to lag behind or ahead of the screen if you aren't using set variables when scrolling. I came up with three methods in the end:
1. Have a single room of game size (320x320, 240x320 window so with wobble scrolling) with the backgrounds appear to scroll down, and then scroll faster when the boss appears.
2. Have a room of game size width but height being very high (preliminary height of some 6/8000, 320 width in 240x320 window with wobble scrolling), setting to the bottom of the room at the start and then moving the view up.
3. Have a room of whatever size and having the view scroll at a set speed and change direction on how close it is to the end of the room (240x320 and no wobble scrolling because I couldn't figure out how to keep it without going weird).
http://www.youtube.com/watch?v=AOqcPELLO_8 - not the best game in the world (especially if you've been spoiled by Cave) but that's a fine example of the first method to simulate the appearance of going in different directions, and I suspect it's how Cave does it to some extent in its games. If you can make your view equivalent in Unity actually move around a room with the smoothness of what's in that video, and then go to a background-looping basis for boss sequences I'll be very impressed.
Greetings from the land down under! 

Re: The best way to control the scrolling of a shmup?
In Unity, you can have more than one camera and control the layer of camera's view. So what I did was separating between camera that see the characters/entities and camera for background.
From there, you can choose to move the camera or move the background, or both. I used both, depending on the situation, since I need a tiled background at some point of the stage.
From there, you can choose to move the camera or move the background, or both. I used both, depending on the situation, since I need a tiled background at some point of the stage.
- wondersonic
-
- Posts: 76
- Joined: Mon Aug 20, 2012 8:11 pm
Re: The best way to control the scrolling of a shmup?
I currently use two techniques under unity to manage the scrolling in my horizontal shmup.
For the first level:
A camera that scrolls. So that I can place enemies all along the path and they become active once they are visible (and inactive once they become invisible: this is an optimization).
The first level only allows to scroll up and down the camera with a window size larger than the screen:
().
On this screenshot from the unity3D editor:

you can see the plan where the ship and asteroids are flying, the plan where the stars are scrolling (a legacy ellipsoid particle emitter), the background being a skybox (or spacebox I should say). You can remark that there is a plan where there is the texture from the skybox. This is a trick. A render to texture object is used to render the skybox on it and I make the camera turn around a little so that we get the impression that the background is also moving (request from BPZeBanshee). In fact, to be clear, the background doesn't scroll but technically rotate.
Capping of the ship movements up and down also making the camera move is coded in the Ship object.
For the second level, I used a different technique as I needed to cap the camera movements all along the 3D corridors. Here I used invisible colliders that collides with an other collider attached to the camera. The camera moves at a given speed (as well as the ship, the bullets...). When the camera collider hit the collider at a going-up corridor entrance, the speed of the camera changes: meaning, it scrolls now vertically in the right direction (up or down) and when the camera hit an other collider an the end of the corridor section, then the camera goes straight forward (setting vertical speed to 0).
Hope that helps!
For the first level:
A camera that scrolls. So that I can place enemies all along the path and they become active once they are visible (and inactive once they become invisible: this is an optimization).
The first level only allows to scroll up and down the camera with a window size larger than the screen:
().
On this screenshot from the unity3D editor:

you can see the plan where the ship and asteroids are flying, the plan where the stars are scrolling (a legacy ellipsoid particle emitter), the background being a skybox (or spacebox I should say). You can remark that there is a plan where there is the texture from the skybox. This is a trick. A render to texture object is used to render the skybox on it and I make the camera turn around a little so that we get the impression that the background is also moving (request from BPZeBanshee). In fact, to be clear, the background doesn't scroll but technically rotate.
Capping of the ship movements up and down also making the camera move is coded in the Ship object.
For the second level, I used a different technique as I needed to cap the camera movements all along the 3D corridors. Here I used invisible colliders that collides with an other collider attached to the camera. The camera moves at a given speed (as well as the ship, the bullets...). When the camera collider hit the collider at a going-up corridor entrance, the speed of the camera changes: meaning, it scrolls now vertically in the right direction (up or down) and when the camera hit an other collider an the end of the corridor section, then the camera goes straight forward (setting vertical speed to 0).
Hope that helps!
- wondersonic
-
- Posts: 76
- Joined: Mon Aug 20, 2012 8:11 pm
Re: The best way to control the scrolling of a shmup?
A last thought, I've tested the free plugin which allows to animate objects (including camera) along paths. Very powerful!
See demos .
Finally, it comes with a path editor.
See demos .
Finally, it comes with a path editor.
Re: The best way to control the scrolling of a shmup?
Hey,
So yeah, I think I'll use iTween path to move my camera.
I will use a camera along an iTween path and activate my enemies when they become visible in the camera.
When I said path-based scrolling, I was meaning the background in dodonpachi don't scroll only verticaly, but move along a whole scene :
The fun things with it is I will be able to allow the player to "choose" its path, that way he will have multiple way to end a level.
So yeah, I think I'll use iTween path to move my camera.
I will use a camera along an iTween path and activate my enemies when they become visible in the camera.
When I said path-based scrolling, I was meaning the background in dodonpachi don't scroll only verticaly, but move along a whole scene :
The fun things with it is I will be able to allow the player to "choose" its path, that way he will have multiple way to end a level.
Spidyy
15 posts
• Page 1 of 2 • 1, 2
Who is online
Users browsing this forum: No registered users and 1 guest