The best way to control the scrolling of a shmup?

This forum is for discussing shmup development, tools, engines and techniques.
User avatar
Posts: 10
Joined: Sat Aug 18, 2012 11:46 am

The best way to control the scrolling of a shmup?

Postby Spidyy » Sat Aug 18, 2012 11:54 am

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!

Site Admin
User avatar
Posts: 240
Joined: Thu Jul 26, 2012 2:32 pm
Location: Melbourne

Re: The best way to control the scrolling of a shmup?

Postby monoRAIL » Sat Aug 18, 2012 1:34 pm

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.

User avatar
Posts: 10
Joined: Sat Aug 18, 2012 11:46 am

Re: The best way to control the scrolling of a shmup?

Postby Spidyy » Sat Aug 18, 2012 2:58 pm

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. =)

User avatar
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?

Postby TiaoFerreira » Sat Aug 18, 2012 5:06 pm

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.
SENTA A PÚA!

User avatar
Posts: 17
Joined: Mon Aug 20, 2012 7:12 am

Re: The best way to control the scrolling of a shmup?

Postby BPzeBanshee » Mon Aug 20, 2012 7:34 am

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.
Greetings from the land down under! :D

User avatar
Posts: 2
Joined: Tue Aug 21, 2012 1:47 am

Re: The best way to control the scrolling of a shmup?

Postby hima » Tue Aug 21, 2012 2:43 am

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.

User avatar
Posts: 76
Joined: Mon Aug 20, 2012 8:11 pm

Re: The best way to control the scrolling of a shmup?

Postby wondersonic » Tue Aug 21, 2012 9:27 am

hima wrote: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.


Good idea for the two cameras. I confess, I didn't think about it.

User avatar
Posts: 76
Joined: Mon Aug 20, 2012 8:11 pm

Re: The best way to control the scrolling of a shmup?

Postby wondersonic » Tue Aug 21, 2012 9:49 am

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:
(see at the 34th second).

On this screenshot from the unity3D editor:

Image

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!

User avatar
Posts: 76
Joined: Mon Aug 20, 2012 8:11 pm

Re: The best way to control the scrolling of a shmup?

Postby wondersonic » Tue Aug 21, 2012 11:14 am

A last thought, I've tested the free plugin iTween which allows to animate objects (including camera) along paths. Very powerful!

See demos here.

Finally, it comes with a path editor.

User avatar
Posts: 10
Joined: Sat Aug 18, 2012 11:46 am

Re: The best way to control the scrolling of a shmup?

Postby Spidyy » Tue Aug 21, 2012 5:59 pm

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 :

http://www.youtube.com/watch?v=eMAWEgY7VmA&feature=player_detailpage#t=44s

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.

Next

Return to Development

Who is online

Users browsing this forum: No registered users and 3 guests