• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

Cut scene with views

M

Marc Malak

Guest
Im not sure on how to do this but my game is a 2d platformer and what j want is for the view to start somehwere high (which i know how to set) then for the view to like move down at a constant speed until it reaches the player. But i thought about it and i have 2 issues.

1: my view 0 follows my player so if i try to set it somehwere high then for it to go down it wont because its stuck to my player.

2: also im not sure how to manipulate the view so that i can make it move down at a speed then stop it at the player.

So i was wandering if anyone had anyodea of how to achieve this
 

Simon Gust

Member
In the room Editor under views there is an Option for how fast the view follows the Player.
upload_2017-5-23_13-21-26.png
Set both to 4 or something.

To put your view somewhere, write
Code:
view_xview = 500;
view_yview = 100;
You just have to get the right coordinates.
 
M

Marc Malak

Guest
In the room Editor under views there is an Option for how fast the view follows the Player.
View attachment 9871
Set both to 4 or something.

To put your view somewhere, write
Code:
view_xview = 500;
view_yview = 100;
You just have to get the right coordinates.
Wait ok i have like a basic animatio at the start which runs then after animating a player object is created. So i dont want to base that movement around the player. Is there a way to just set the view in room to a position then move it until the right position for where the player is supposed to spawn?
 

Simon Gust

Member
You can set the views starting Positions in the views tab. <View in Room>
Once you create the Player object, write in it's create Event
Code:
view_object = obj_player;
Make sure that in the views tab, no object as <Object following> is selected.
 

DukeSoft

Member
I usually do some stuff myself with the view code...

Code:
target_x = obj_player.x-view_wview[0]/2;
target_y = obj_player.y-view_hview[0]/2;

if (view_xview[0] != target_x) {
    view_xview[0] = (view_xview[0]-target_x)*0.1;
}

if (view_yview[0] != target_y) {
    view_yview[0] = (view_yview[0]-target_y)*0.1;
}
 
S

SayBaconOneMoreTime

Guest
My method for animating in a room is to have an object which controls the position of the view, and then have it contain a variable which controls where the view actually focuses on. It's based on Shaun Spalding's dynamic camera system tutorial, but a little bit more advanced. Is that something close to what you are after?
 
M

Marc Malak

Guest
I usually do some stuff myself with the view code...

Code:
target_x = obj_player.x-view_wview[0]/2;
target_y = obj_player.y-view_hview[0]/2;

if (view_xview[0] != target_x) {
    view_xview[0] = (view_xview[0]-target_x)*0.1;
}

if (view_yview[0] != target_y) {
    view_yview[0] = (view_yview[0]-target_y)*0.1;
}
thank you!!
 

Yal

šŸ§ *penguin noises*
GMC Elder
I heard an interview quote from the devs behind Freedom Planet recently where they mentioned they switched over to Visual Novel-style cutscenes instead of full animation because it was too much work to make the cutscenes in the first game, they had to make scenes from scratch every time. I can totally get behind that thinking from my own experiences, too. Keep that in mind when designing cutscenes, and try to make reusable systems whenever possible to cut down on the amount of redundant work you need to do.
 
Top