Game Maker Studio 2 - The Basics of Cameras

  Рет қаралды 3,589

Let's Learn This Together

Let's Learn This Together

Күн бұрын

Пікірлер: 16
@tyrondeonarine1348
@tyrondeonarine1348 3 жыл бұрын
Needed this bro.
@chriscorbett2947
@chriscorbett2947 2 жыл бұрын
Your channel is awesome
@BanthaBoi
@BanthaBoi 7 ай бұрын
why is my view window still the same size as my room? My objects are just distorted. I can only see the bit I'm supposed to see through the camera but it's stretched across the viewport which is the size of the room. Yours works fine??
@shadow_dev1259
@shadow_dev1259 2 жыл бұрын
I'm a little bit late here but, how would I go about changing the window size of the camera using code? By window size I mean the size of the camera on my screen, not how much of the room I can see.
@LetsLearnThisTogether
@LetsLearnThisTogether 2 жыл бұрын
Do you mean viewport, like the window your game runs in and you can move around?
@lordnoda
@lordnoda Жыл бұрын
Bit late to this, but yes. How do you set the viewport programatically?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Look for the functions camera_set_ and you’ll find all of them there.
@bradenalexander2477
@bradenalexander2477 3 жыл бұрын
What is the advantage of creating an objCamera rather than using the preexisting ones?
@LetsLearnThisTogether
@LetsLearnThisTogether 3 жыл бұрын
Many. Split screen, mini maps, custom movement, etc.. Anything beyond having a camera simply follow a player, you’ll want your own.
@davidstaat4120
@davidstaat4120 Жыл бұрын
I'm encountering a weird bug where the player character shakes if the camera moves diagonally. Is there anything that can be done about that?
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Probably. Do you know that the player is moving, or does the camera move in a way that makes it look like the player is moving? If it’s the truly the player shaking and moving, there’s something wrong in your diagonal move code. A camera is just a view, it should not affect any objects moving, at least by default. You may have added in more code. If it’s the camera making the player look like they’re shaking, try to smooth out your camera moving a bit more. Maybe check if the camera is close to where it should be and immediately snap it there.
@davidstaat4120
@davidstaat4120 Жыл бұрын
​@@LetsLearnThisTogether I'm pretty sure it's the camera shaking. I think the problem that's occurring is that my diagonal move code uses the lengthdir_x and lengthdir_y functions. So it likely returns a decimal number. If the x and y speeds for the camera are set to -1 it's not matching the speed the character goes when moving diagonally. At least that's my guess. Here's my movement code if you want to take a look: key_down = keyboard_check(vk_down); key_up = keyboard_check(vk_up); key_right = keyboard_check(vk_right); key_left = keyboard_check(vk_left); hdir = key_right - key_left; vdir = key_down - key_up; if hdir != 0 or vdir != 0 { dir = point_direction(0,0, hdir, vdir); hsp = lengthdir_x(spd, dir); vsp = lengthdir_y(spd, dir); x += hsp; y += vsp; }
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
Lengthdir is great, but I think you need a snap in the eventually, otherwise it will ping pong around and never truly reach 0 when moving the camera. Your camera code looks good to me.
@Musicman995
@Musicman995 Жыл бұрын
i cant find the viewports/camera thing anywhere, it's just not there
@LetsLearnThisTogether
@LetsLearnThisTogether Жыл бұрын
They’ve changed a few things. You may need to open the room, and then make sure you’ve got the room selected in the asset browser. If you don’t see them still, try going to the menu at the top, layout -> reset layout. Then try again.
@deoxys_prime
@deoxys_prime Жыл бұрын
i did everything step by step and it turned my 1920 1080 window in to an ugly square
GameMaker Studio 2.3 - How to Create and Use Tile Sets + Auto Tiling
12:30
Let's Learn This Together
Рет қаралды 49 М.
Creating & Changing Rooms in GameMaker 2.3
23:19
Let's Learn This Together
Рет қаралды 28 М.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 120 МЛН
My Daughter's Dumplings Are Filled With Coins #funny #cute #comedy
00:18
Funny daughter's daily life
Рет қаралды 32 МЛН
This mother's baby is too unreliable.
00:13
FUNNY XIAOTING 666
Рет қаралды 39 МЛН
How to Use 9 (Nine) Slice in Game Maker Studio 2 - NEW FEATURE
8:05
Let's Learn This Together
Рет қаралды 3,3 М.
GMS2 Cameras: As Simple as Possible
13:27
PixelatedPope
Рет қаралды 66 М.
Organising Data | Menus: GMS2 [P1]
28:19
FriendlyCosmonaut
Рет қаралды 68 М.
3 ways for the camera to follow the player | GMS2.3 Tutorial
18:32
Arend Peter Teaches
Рет қаралды 9 М.
How to Make a Good 2D Camera
11:38
Game Maker's Toolkit
Рет қаралды 410 М.
How to Make a Menu System (with Submenus) in GameMaker Studio 2!
32:39
Peyton Burnham
Рет қаралды 160 М.
Common Mistakes Beginners Make In GameMaker
9:58
Let's Learn This Together
Рет қаралды 3,4 М.
Beginner's Guide to GameMaker
33:01
Sara Spalding
Рет қаралды 604 М.
I Made the Same Game in 8 Engines
12:34
Emeral
Рет қаралды 4,1 МЛН
GameMaker Tips & Tricks For Beginners 2023
19:39
Let's Learn This Together
Рет қаралды 6 М.
Watermelon magic box! #shorts by Leisi Crazy
00:20
Leisi Crazy
Рет қаралды 120 МЛН