Make a Platformer in GameMaker! Part 3 (Smooth Camera)

  Рет қаралды 19,053

Peyton Burnham

Peyton Burnham

Күн бұрын

Пікірлер: 85
@NeonWidow
@NeonWidow 9 ай бұрын
By far the best tutorial series I've come across. Thank you!
@Kai-0425
@Kai-0425 3 ай бұрын
Hey, just finished this episode, and I wanted to let you know that you are helping me learn game dev so much. I started with an old Shaun Spalding video, but things had changed in Gamemaker since then, and things were kind of buggy. Then i found your videos, and I started with your RPG series, with helped me learn a lot of things, then I decided to take a break from it and work on this! So, thank you for helping me, and so many other people. You're actually amazing. Oh, and FYI, f11 is normally the button to go fullscreen in games.
@ryanb2633
@ryanb2633 18 күн бұрын
You're my new favorite tutorial dev for sure. Quick, informative and not boring!
@poptartmools
@poptartmools Жыл бұрын
Its crazy how you even added a camera to this tutorial! Im so glad thought, Thanks a lot.
@peytonburnham4316
@peytonburnham4316 Жыл бұрын
I figured it would be a fun quasi-bonus video to have in here somewhere!
@True_Insomniac
@True_Insomniac 6 ай бұрын
IMPORTANT!!!: If your fullscreen thing doesn't work, make sure three things happen: 1. You went into the options, then windows, then graphics, and Allow fullscreen switching is on 2. You deleted the camera after the buffering room which already has a camera (must be a persistent object!) 3. You typed: if keyboard_check_pressed(vk_f11) { window_set_fullscreen(!window_get_fullscreen()); } (You can use any vk key, I just preffer f11)
@JoeKashuba
@JoeKashuba 5 ай бұрын
Thank you!
@True_Insomniac
@True_Insomniac 5 ай бұрын
@@JoeKashuba No worries :)
@CazthesillyWizard
@CazthesillyWizard 4 ай бұрын
Thank you so much
@True_Insomniac
@True_Insomniac 4 ай бұрын
@@CazthesillyWizard Happy to help!
@toyo8460
@toyo8460 4 ай бұрын
Thanks!
@bearwillow6108
@bearwillow6108 Жыл бұрын
Just joined your Patreon! Thank you so much for this amazing series!
@peytonburnham4316
@peytonburnham4316 Жыл бұрын
Thank you so much!!!
@BoPro_
@BoPro_ Жыл бұрын
Love the series!
@peytonburnham4316
@peytonburnham4316 11 ай бұрын
Thank you!!
@shadowSquall1
@shadowSquall1 Жыл бұрын
Great video. You've got a clear and easy to follow teaching style. While I have some version of what you've shown in the camera, the smoothing techniques and how to start the camera where the player starts was really useful! If you're taking suggestions, I'd love to see q more indepth camera tutorial for things like zooming/switching targets/panning over a scene/changing resolution etc. Either way, great job!
@peccunz
@peccunz Жыл бұрын
and the master of GML who helped me on my coding journey is back again wahoo!!!
@nevm5776
@nevm5776 3 ай бұрын
For some reason, the camera trail doesnt work for me, i literally followed every step as shown :(
@MasterHoshii
@MasterHoshii 2 ай бұрын
drag the oCamera object in the room
@o2arya104
@o2arya104 9 ай бұрын
geforce notification : *pops up* Peyton : You !? I HATE U!
@AlexBarrGameDev
@AlexBarrGameDev 11 ай бұрын
This is great! I'm loving this series. It's funny but the part about choosing a full screen button got me thinking. I ALWAYS use f4 as my full screen toggle button - I started using GameMaker 4.3 and a few weeks later 5.0 was released. Back then, all the function keys were hard coded and couldn't be changed. For every game project f5 was save game, f6 was load game and f4 was full screen. I can't remember what the other function keys did, but I was so used to pressing f4 to toggle full screen that when GameMaker Studio came out and you finally had the option to make it whatever you wanted, I just kept it out of habit.
@peytonburnham4316
@peytonburnham4316 11 ай бұрын
Thats interesting because i also use f4! When i was first learning gamemaker, it was in the wake of undertale which is f4 also. And thats probably why haha! So in a roundabout way that’s most likely also the reason i do that!
@AlexBarrGameDev
@AlexBarrGameDev 11 ай бұрын
@@peytonburnham4316 that’s awesome! Yeah I think undertale was started in GameMaker 7 or 8 so that definitely makes sense
@RemainingAxis565
@RemainingAxis565 Жыл бұрын
Anyone else here watching tutorials For fun?
@Dark_Peace
@Dark_Peace Жыл бұрын
Anyone else watching tutorials without even using this engine ?
@KarlJAisthegoat
@KarlJAisthegoat 9 ай бұрын
The fullscreen isnt working for me and i dont know Why i followed the instructions
@dethtreeorigin
@dethtreeorigin 9 ай бұрын
Hey don't know if you still need help but I saw that changing it to be like this allows it to work //Fullscreen toggle if keyboard_check_pressed(vk_f8) { if window_get_fullscreen() { window_set_fullscreen(false); } else { window_set_fullscreen(true); } }
@KarlJAisthegoat
@KarlJAisthegoat 9 ай бұрын
@@dethtreeorigin thanks ill check it out in the morning
@saphi20
@saphi20 Жыл бұрын
wouldnt having the buffer room on top cause problems later on if we add the main menu and stuff? or does the exit code prevent that?
@peytonburnham4316
@peytonburnham4316 Жыл бұрын
No it should be totally fine! Again it just spits you out to the next room in your room order so it really is *just* a buffer. You can absolutely put a main menu room or even a startup splash screen right after it and itll be fine! Just make sure any persistent objects you create there check to make sure you player exists and stuff like that!
@joshuadaugherty2267
@joshuadaugherty2267 3 ай бұрын
Make sure you put the camera code in the step event and not the create event. I was so confused why it wasn't following, but going to the players original position.
@deanallen3047
@deanallen3047 39 минут бұрын
Can anyone help followed everything exactly as far as im aware but keep getting error GM1030 the identifier 'y' is reserved and cannot be used as a variable name..? Object: OCamera Event: step at line 9 : cannot redeclare a builtin variable ?
@chaco-province
@chaco-province 27 күн бұрын
This doesn't work for me, I drag the camera object into my room and it stays like theres none, it doesn't scroll, nor follow the player. What can I do to fix it?
@raidenxmlfnf6664
@raidenxmlfnf6664 5 ай бұрын
The camTrailSpd is still same speed even if I lower it
@ZODDtheApostle
@ZODDtheApostle 4 ай бұрын
You must've forgotten to change the last line of code in //set camera coordinates It should be: camera_set_view_pos(view_camera[0], finalCamX, finalCamY); I made that mistake too lol
@nevm5776
@nevm5776 3 ай бұрын
@@ZODDtheApostle i have the same problem as the other guy, i literally followed every step, its the same for me
@happy_havok
@happy_havok 11 ай бұрын
Hey! Love this series so far! Just had a question that I can't seem to find an answer for, and I can't tell if it's just me missing something or not. But when I pressed the button to go fullscreen, it just says Resizing Swap Chain in the Output, and that's it. It doesn't toggle in or out of fullscreen. Do you or anyone else in the comments know what is going on?
@peytonburnham4316
@peytonburnham4316 11 ай бұрын
It sounds like you may have forgotten the ! before window_get_fullscreen()? so if you have window_set_fullscreen( window_get_fullscreen() ) instead of window_set_fullscreen( !window_get_fullscreen() ) then you would just be setting your fullscreen to be in the same state as it already is. If not you also may be accidentally using keyboard_check instead of keyboard_check_pressed? Otherwise I can't really think of anything! Sorry!
@happy_havok
@happy_havok 11 ай бұрын
@@peytonburnham4316 Thank you so much for the reply. I remembered both, but it still wasnt working. Then i literally just.... retyped it, and now it works. I... I don't know what changed, but you know what? I'll take it.
@CookiePubblePum
@CookiePubblePum 11 ай бұрын
i'm also having this problem, and i've written the code exactly as shown in the video. i've tried it with different buttons and it still hasn't worked. i've copy pasted the code into this comment // fullscreen toggle if keyboard_check_pressed(vk_f8) { window_set_fullscreen( !window_get_fullscreen() ); } i'm not sure why it doesn't work :/
@etogodoy
@etogodoy 11 ай бұрын
I'm having this problem too, just finished the video. I tryed some game optios>windows>graphics options, like checked "Allow fullscreen switching", "Start fullscreen" and others, but still doesn't work. update: just testing stuff, if I leave it like window_set_fullscreen(true); it toggle the fullscreen all right (just doesn't toggle off, obviously)
@siamemex1555
@siamemex1555 10 ай бұрын
Hi, I hope you managed to sort out the "Resizing Swap Chain" issue. I was having the same issue, it was due to me not deleting the camera from the rm_mainGame. I had one oCamera in rm_init and another oCamera in rm_gameMain. Deleting the oCamera from the rm_mainGame solved my issue.
@CraigHodson-e8m
@CraigHodson-e8m 4 ай бұрын
I cant believe how long I spent looking for one typing error! it finally works though. on to the next
@rekefisk4761
@rekefisk4761 5 ай бұрын
Thank you! You gave me the solution to all my problems.
@evilbot2099
@evilbot2099 3 ай бұрын
what would i do if i wanted the camera to keep the player lower on screen, if for example the room was big and it couldn't clamp to the bottom?
@5-Volts
@5-Volts 3 ай бұрын
my fullscreen dont work
@KoolDude-lf9jh
@KoolDude-lf9jh 2 ай бұрын
Same
@KoolDude-lf9jh
@KoolDude-lf9jh 2 ай бұрын
Keep scrolling down someone already explained
@DanielFelistoque
@DanielFelistoque 11 күн бұрын
How can i do a splitscreen game with cameras follow each one of the players?
@hyperdespite
@hyperdespite 2 ай бұрын
What happened to _camX and Y in Step event ? There is no var _camX ?
@-Ton-
@-Ton- 2 ай бұрын
For some reason my _camHeight is purple instead of yellow and the camera breaks because of it. How do you fix this?
@chickenlover2345
@chickenlover2345 Ай бұрын
Did u declare it as a variable in a previous line of code? If it's yellow, it means for that code file (create, step, roomstart, etc.) that variable is only accesseble to that file, and it turns pruple. But if it's not declared as a variable with var, then it turns purple, and it's considered a local variable for the entire object. Hope this helps!
@-Ton-
@-Ton- Ай бұрын
​@@chickenlover2345 thanks!
@twsamoht3165
@twsamoht3165 4 ай бұрын
I did everything and this works just fine ! I just have this strange graphic bugs where the pixels of some platforms strangely zigzags when I'm on fullscreen and moving. I don't know if someone had the same problem or have the solution. I'll eventually try to deal with it later
@ClockMaster_3100
@ClockMaster_3100 Жыл бұрын
Hey is it possible you could extend the Top-Down RPG series with how to make a Party system?
@nightshock906
@nightshock906 6 ай бұрын
Full screen did not work for me. I followed everything and when I hit f8 it says resizing swap chain… Then nothing happens.
@mutatedcode1056
@mutatedcode1056 6 ай бұрын
Try setting it to a different key.
@toyo8460
@toyo8460 4 ай бұрын
@@mutatedcode1056 I doubt that would change anything, make sure you have allow fullscreen switching on in settings under windows and then graphics and that there isn't a camera left in your main room.
@dillondow8603
@dillondow8603 4 ай бұрын
@@toyo8460 This is the solution. If you're getting "resizing swap chain" it likely means you left your camera in your main room after creating the initialize room and putting a camera in there. Two camera objects will mess things up
@Celcius3b
@Celcius3b Ай бұрын
@@dillondow8603 this was it after an hour of messing with tons of settings i forgot to remove the camera in the main room.
@NanoDun
@NanoDun 10 ай бұрын
Hey man I LOVE this series so much! I can't take you enough for doing this tutorial this is by far the best one i've seen. Also I know i'm late but i've got a question: my camera doesn't want to follow my player even though go at a low Y axis. (up) so my player will just get out of the camera's range and will continue to go up without the camera following. Got any ideas of what causes that?
@o2arya104
@o2arya104 9 ай бұрын
In ur //contrain cam to room, u must have clamped it 0 for the minimum value, but if ur player goes below 0 (in this case, above 0), the camera will stop following cause its not supposed to go above 0. Try changing the second value of the _camY = (a,b,c) to what fits ur game/ ur room size
@crimsononyoutube01
@crimsononyoutube01 3 ай бұрын
@@o2arya104 Thank you this fixed my issue
@Questionable_Insights
@Questionable_Insights Жыл бұрын
Hey, as long as it work with pixel art :)
@berserk9147
@berserk9147 8 ай бұрын
Not to be that guy but, did you teach how to make the characters run through lopes in the first 2 videos? because i watched those over and over and dont remember that.
@toyo8460
@toyo8460 4 ай бұрын
He said that this is the fiinished project, he recorded this afterwards.
@Fire_Jacket
@Fire_Jacket 7 ай бұрын
getting somewhere
@Chillbot17
@Chillbot17 Ай бұрын
I've encountered an issue with my camera. It remains seemingly consistent, capturing the dimensions of the room in the scaled up window, however there is a weird interaction when moving from a menu I added to the actual level. The main menu does not have the player, but the very next room does. What I thought would happen is that the code would keep checking for the player and show things as normal, the set dimensions for the initial camera just with extra space left out of the camera. But when I enter the level, which I set the width to be twice as large as the initialize and menu rooms, the camera views the whole room in a squashed perspective. Not sure how to fix it as, before the menu room was added, everything worked fine. Also I did make sure the camera object is persistent.
@chickenlover2345
@chickenlover2345 Ай бұрын
I'm pretty new to game design and coding and gamemaker in general. But maybe you could add the player secretly in the main menu, and just make it's code not work and his sprite not visible there? In theory it should be a cheap workaround, but like i said, I'm not the most experienced. Hope this helps!
Make a Platformer in GameMaker! Part 4 (Coyote Time)
16:06
Peyton Burnham
Рет қаралды 15 М.
AI Is Making You An Illiterate Programmer
27:22
ThePrimeTime
Рет қаралды 217 М.
To Brawl AND BEYOND!
00:51
Brawl Stars
Рет қаралды 17 МЛН
We Attempted The Impossible 😱
00:54
Topper Guild
Рет қаралды 56 МЛН
How to Make a Good 2D Camera
11:38
Game Maker's Toolkit
Рет қаралды 427 М.
The Sketchbook Series | Katsuya Terada
16:40
Trojan Horse Was a Unicorn
Рет қаралды 58 М.
Branzy Teaches Me Poker
5:48
BoosferExtra
Рет қаралды 98 М.
Beginner GameDev Mistakes - Ep 1
6:40
Sara Spalding
Рет қаралды 167 М.
The Future
4:31
Sara Spalding
Рет қаралды 33 М.
This Problem Changes Your Perspective On Game Dev
25:51
Jonas Tyroller
Рет қаралды 458 М.
Mario Games on Scratch
12:05
Toadfan
Рет қаралды 386 М.