Animated Tiles in Game Maker Studio

Поділитися
Вставка
  • Опубліковано 25 гру 2024

КОМЕНТАРІ •

  • @FioreFire
    @FioreFire 5 років тому +2

    seriously saved my life here, I was about to go down the dark and dangerous path of "objects everywhere for every animated tile"

  • @flystophe
    @flystophe 8 років тому

    Hey, pope. I really appreciate you making awesome videos about the most efficient way of doing things. This subject in particular is something I was worried about taking on, but now I can't wait to get started.

  • @strobosaur
    @strobosaur 8 років тому +1

    Genius. I was just in the need for something like this for an animated water tile i just managed to make that looked decent... Not only genius but simple as well, a winning combination any day :) Hope you keep the videos coming, the parallax series are excellent, and the pixel detective is also a good concept with great execution. Often when you are new, i feel you are in just as big of a need to know where things are usually going wrong, as opposed to only being told the way to do things right... But it's rare to see that kind of tutorial :)

    • @PixelatedPope
      @PixelatedPope  8 років тому

      Wow. Thanks for the kind words! And thanks for watching, I'm glad you are enjoying the vids.

  • @ndmt1225
    @ndmt1225 7 років тому +4

    Very useful system. Thanks for sharing!

  • @Mitchfork
    @Mitchfork 8 років тому

    This is also compatible with external map editors like Tiled if you set up your tilesets correctly. Thanks for the scripts, this was very helpful.

  • @Bloopaz
    @Bloopaz 4 роки тому

    THANK YOU
    YOU HAVE SAVED MY LIFE
    I AM ETERNALLY GRATEFUL

    • @Bloopaz
      @Bloopaz 2 роки тому

      that was 2 years ago?

  • @igneor2d2
    @igneor2d2 5 років тому +3

    Very Usefull! How can I to reference your work for acknowledgements? Can I to use directly your librarys in a game?

  • @helderlimaletsgo
    @helderlimaletsgo 8 років тому

    Holy smokes Pope, your tuts are awesome!!

    • @PixelatedPope
      @PixelatedPope  8 років тому

      Thanks! Glad you enjoy them.

    • @Zoltoks
      @Zoltoks 7 років тому

      Good tut, but for some reason my tiles are just flashing! :(

    • @PixelatedPope
      @PixelatedPope  7 років тому +1

      Flashing? Strange. If you want some help with it, you can PM a link to your project GMZ or you can hit me up on reddit or in the /r/gamemaker official discord channel.

    • @Zoltoks
      @Zoltoks 7 років тому

      PixelatedPope Thanks for the reply! I restarted gamemaker, and it fixed the issue. No idea what was going on! :)

  • @catvader7017
    @catvader7017 8 років тому

    Very cool :D cheers for helping us out on this!.

  • @AqareCover
    @AqareCover 7 років тому

    fantastic tutorial, thanks!

  • @jevilhumor
    @jevilhumor 5 років тому

    I got the following error after downloading the .gmz file for this project: In script animated_tile_init line 6 pos 7: Assignment operator expected. Keep in mind that I didn't edit anything yet. I'm using GMS 1.4. Is this only compatible with a different version or something?

    • @PixelatedPope
      @PixelatedPope  5 років тому

      I just opened it in 1.4.9999 and ran it with no problems. Try downloading it again? Join my Discord if you have further issues and we'll try to help you get it up and running: discord.gg/By6u9pC

  • @kurtisharen
    @kurtisharen 7 років тому

    So, on your channel I've found videos for parallax background scrolling, and tile animation. What about animated backgrounds? I would really like to figure out how to do something like Green Hill's background in Sonic the Hedgehog. It would need parallax scrolling for the water at various distances as well as the landscape in the far distance, but the water itself has a couple frames of animation. (No, I'm not wanting to copy Green Hill, but I figured it made a good example)
    Is there any way that you could do a video on how to animate backgrounds in a way that's compatible with your parallax scrolling tutorial?

    • @PixelatedPope
      @PixelatedPope  7 років тому

      This system will work for backgrounds already! Anywhere you are using the "base" background will be animated. Whether it's a tile, a background set in the room, or using draw_background()! No extra videos needed!

  • @memine5595
    @memine5595 8 років тому

    thanks handy. can gms have swf or svg tiles yet? or is it all still only pixel tiles

    • @PixelatedPope
      @PixelatedPope  8 років тому

      As far as I know, still just raster tiles. Maybe GMS2?

  • @BrotherBearBarras
    @BrotherBearBarras 4 роки тому

    It may be a dumb question, but... how would I combine this with your palette swapper?

    • @PixelatedPope
      @PixelatedPope  4 роки тому +1

      Not a dumb question at all. You can use the "depth swapper" feature of pal swapper to swap a specific depth or range of depths, including tiles using this system.

    • @BrotherBearBarras
      @BrotherBearBarras 4 роки тому

      @@PixelatedPope Just tried it... works like a charm. Thanks P. I was trying to turn the whole screen "gray-ish" for a split second, back to normal, and then split second again for when I bomb an area for my Zelda remake. I used your palette swapper for the objects and when you mentioned it I saw "pal_swap_set_tiles." You're the bomb dot com.

    • @BrotherBearBarras
      @BrotherBearBarras 4 роки тому

      @@PixelatedPope You seem to be THE Guru when it comes to GameMaker. Is there a way to use draw_text_ext, but convert the text drawn to a tile layer? I've been racking my brains with this one.

    • @PixelatedPope
      @PixelatedPope  4 роки тому

      @@BrotherBearBarras I'd be very interested to know why you need to do that. In GMS1 there isn't much of a difference from a tile and just drawing something. But UA-cam comments aren't the best way to discuss this sort of thing. I recommend joining the GM Discord server. Hundreds of amazing, helpful people that you can discuss GM with, and as a member you'll be able to directly message me.
      discordapp.com/invite/By6u9pC

    • @BrotherBearBarras
      @BrotherBearBarras 4 роки тому

      @@PixelatedPope With my textbox engine, I'd like to retain what is being written to the screen when transitioning. For some reason, with objects, it won't move correctly, but when I replace an object with a tile and then move the tile layer, it's perfect. I'll see if I can find you on the discord channel... ua-cam.com/video/WjJhQ8sD6p4/v-deo.html
      That's my textbox example.

  • @Skeksis27
    @Skeksis27 7 років тому

    Really nice system you have there! Is it possible to add more frames to an animation than a script argument limit?

    • @PixelatedPope
      @PixelatedPope  7 років тому

      The script argument limit has been removed in GMS1.4.

    • @enkiimuto1041
      @enkiimuto1041 7 років тому

      Wait.... WAS IT!?
      It is still on the documentation though.

    • @PixelatedPope
      @PixelatedPope  7 років тому +1

      Yup, as long as you use the argument array there is no limit.
      So don't do this: return argument0
      instead do this: return argument[0]
      And you won't be limited.

    • @enkiimuto1041
      @enkiimuto1041 7 років тому

      Got it, thanks mate!

  • @briansgenius
    @briansgenius 7 років тому

    The way I've always done it is to create an alarm system in a control obj like that with background_assign. Are there any reasons that my method might be worse in some way?

    • @PixelatedPope
      @PixelatedPope  7 років тому +1

      If it works, probably not. I mean, you'd have to use a different alarm for each sets of tiles that are animating on different timers... but you aren't likely to have THAT many different ones, so the number of available alarms isn't likely to be an issue. Your method is probably just fine. It's the background_assign that's the big time saver here.

  • @enkiimuto1041
    @enkiimuto1041 7 років тому

    This is amazing. Thanks.

  • @larryteslaspacexboringlawr739
    @larryteslaspacexboringlawr739 7 років тому

    thank you for gamemaker video

  • @1wolfcubb
    @1wolfcubb 8 років тому

    great tutorial Pope :) I was curious how this could apply to a health bar using animated tiles. Does gml have a way to mask out parts of the animated tile to fit inside a health bar?

    • @PixelatedPope
      @PixelatedPope  8 років тому +2

      Better to do that with a sprite. Here's a crude example file that messes with the idea: dl.dropboxusercontent.com/u/78249311/SpriteMaskingTest.gmz
      You should also be doing your health bar in your GUI event, and you can't really draw tiles in the gui event. So another reason to go sprites/surfaces. But maybe I'm misunderstanding what you wanted to accomplish. If that example doens't help you out, let me know and we'll find a solution for ya.

    • @1wolfcubb
      @1wolfcubb 8 років тому +1

      this helped a lot :) beginning to see why surfaces are popular with advanced gml devs.

  • @rendcycle6794
    @rendcycle6794 6 років тому

    Thanks for the video! I have a question: In GameMaker Studio 2, would it be possible to modify the visible animated tiles in real-time? For example selected animated water tiles in the screen changes to a different animated tile as it is affected by a nearby weather system like a storm. The animation of the affected water tiles becomes more wavy and violent as the storm passes over it.

    • @PixelatedPope
      @PixelatedPope  6 років тому

      What you would probably want to do is have two layers of animated tiles, one for "calm" and one for "storm" and turn the layers on and off based on your weather logic. I haven't actually done anything like this, but I imagine layer_set_visible() would be how you would do this. If you want to "gradually" fade between the two layers, you'd need to employ a shader to get alpha blending on a tile layer.

    • @rendcycle6794
      @rendcycle6794 6 років тому

      Good to know it is possible. Yes, it should gradually fade from calm to stormy animated tiles... but they should still remain seamless somehow. I'm new to GameMaker Studio 2 and I'm just researching whether I should use it for a 2D game project I have in mind instead of Unity. Thank you sir!

    • @PixelatedPope
      @PixelatedPope  6 років тому

      Sure! If you want some further help in your gamedev journey, you can join my discord server. Great place to talk to other aspiring game developers and get help when you get stuck. discord.gg/EWq57U

    • @rendcycle6794
      @rendcycle6794 6 років тому

      Ok, thank you very much! :-)

  • @nutzdeez3947
    @nutzdeez3947 8 років тому +1

    OMAGAWD! THANK YOU!!!

    • @PixelatedPope
      @PixelatedPope  8 років тому

      YOU'RE WELCOME! THANKS FOR WATCHING!

  • @CSanykdotCom
    @CSanykdotCom 8 років тому

    Nice video, and nice system you've developed -- but what about explaining what's going on inside those scripts? That's where the real interesting stuff is going on.

    • @PixelatedPope
      @PixelatedPope  8 років тому

      Honestly... inside the scripts is the real BORING stuff. All it's doing is pulling data out of the data grid. The only interesting scripts are the one that initializes the system (builds the data grid) and the one that adds a new set of tiles. All the other scripts inside of the update script could be replaced with ds_grid accessors.

  • @srchaos8301
    @srchaos8301 8 років тому

    Thank you very much Pope

  • @MiguelAngelValdepenaDelgado

    wow thank you excelent !!!!

  • @chrismulholland6202
    @chrismulholland6202 5 років тому

    Hey, I'm getting an error that says unknown function or script background_assign. Any ideas how to fix that?

    • @PixelatedPope
      @PixelatedPope  5 років тому +1

      Are you in GMS2?

    • @chrismulholland6202
      @chrismulholland6202 5 років тому

      @@PixelatedPope Yes I am

    • @PixelatedPope
      @PixelatedPope  5 років тому

      @@chrismulholland6202 GMS2 supports animated tiles natively. So you don't need this weird work around 😄

    • @chrismulholland6202
      @chrismulholland6202 5 років тому

      @@PixelatedPope What! I tried that and it didn't seem to work. Thanks for the speedy response though I'm sure I'm doing some small thing wrong.

    • @PixelatedPope
      @PixelatedPope  5 років тому

      @@chrismulholland6202 Well, if you get stuck, you can always join my Discord and ask for help there. Someone will be able to step you through getting it set up.
      discord.gg/By6u9pC

  • @jasonmehl7111
    @jasonmehl7111 5 років тому

    how do i use this with saving my game to an ini file?

    • @PixelatedPope
      @PixelatedPope  5 років тому

      This has nothing to do with save data.

  • @christovix4540
    @christovix4540 8 років тому

    This is so feakin' good to know. :O

  • @kryptoid98
    @kryptoid98 7 років тому

    When I try to launch the project files in either Game Maker Studio 2, Game Maker Studio 1.4 they both tell me to run GameMaker:Studio from inside Steam. Any idea's how to get around this? Need to look at those scripts lol

    • @PixelatedPope
      @PixelatedPope  7 років тому

      This solution will not work in GMS2. GMS2 has built in animated tiles, which are going to be WAY faster than my solution anyway.
      For GMS1, you need to run GMS1 and then instead of creating a new project or whatever, say "import project" and open the GMZ file.

    • @kryptoid98
      @kryptoid98 7 років тому

      Oh ok thanks!! ive just been trying to open the gmz files as is. Do you possibly have any links to animated tiles in GMS2? I hate to ask but all I can find is GMS1 or auto tiles for GMS2 unless auto tiles are the same thing as animate tiles but it doesnt seem that way.

    • @PixelatedPope
      @PixelatedPope  7 років тому

      Nope. They are just... built in. It's super easy.
      Open up your tile sheet and in the left "properties panel" you'll see 3 buttons: Brush Builder, Tile Animation, and Auto Tiling.
      Click on Tile Animation. This will open a new panel. Click the little + symbol that says "Add Animation" in the middle panel. Set the number of frames. Then click on the tiles you want to represent the individual frames of your animation in order. Set the desired FPS for the animation and you are good to go.
      From then on, if you "paint" tiles with any of the frames you selected to be part of the animation, they will be animated in game.
      It's a bit more restrictive than my system (number of frames has to be power of 2, I don't know of any way to pause them, etc), but it'll be MUCH faster performance wise. Almost not comparable on the performance side.

    • @kryptoid98
      @kryptoid98 7 років тому

      Thanks so much!! You have helped me learn so much its amazing, keep up the awesome work!

  • @magnus00125
    @magnus00125 6 років тому

    not enough information can i just download script and do the exact same
    downloaded script don't show up when putting into the folder GMS2

    • @PixelatedPope
      @PixelatedPope  6 років тому +3

      This only works for GMS1. GMS2 has support for animated tiles built in...

    • @magnus00125
      @magnus00125 6 років тому

      i found out

  • @voronoigames6550
    @voronoigames6550 6 років тому

    Awesome!

  • @TheScotty103
    @TheScotty103 7 років тому

    I imported the scripts into GMS but the compile error comes up with script missing, for all of the scripts. :(
    For example:
    Compile error in around line 0 : script missing "scripts\animated_tile_cleanup.gml"
    In Object obj_tile_animator, in Event DestroyEvent action number 1 at line 1 : unknown function or script animated_tile_cleanup
    Any clues?

    • @TheScotty103
      @TheScotty103 7 років тому

      Ok, I did 'Save all' instead of 'Save'. But now the tiles don't animate. :p

    • @TheScotty103
      @TheScotty103 7 років тому

      Helps if I use the right scripts and not the example scripts. Excellent Video, keep it up!

    • @PixelatedPope
      @PixelatedPope  7 років тому

      Thanks. So you're good? You got it all workin'?

  • @memine5595
    @memine5595 8 років тому

    shame ok thanks i cant wait to see what yoyogames have been upto building gms2 thanks

  • @Dan_D_Lion
    @Dan_D_Lion 4 роки тому

    how can i get this version of gms?

    • @PixelatedPope
      @PixelatedPope  4 роки тому +1

      I don't think you can anymore. But GMS2 natively supports animated tiles making this entire video unnecessary.

  • @gregoryoldham2111
    @gregoryoldham2111 4 роки тому

    You are God

  • @HS-eq3gk
    @HS-eq3gk 8 років тому +1

    Does it Work in Gamemaker 8

    • @PixelatedPope
      @PixelatedPope  8 років тому +2

      Unfortunately NONE of my guides and tutorials are designed to work for GM8. If any of them do, it is purely coincidental. I highly recommend you switch over to GMS (keep an eye on Humble Bundle, you never know when it will be on sale).

    • @HS-eq3gk
      @HS-eq3gk 8 років тому

      Thanks for replying. I tried it on GM8 and unforunately some functions did not work.Oh well. I have other reasons for staying with Gamemaker 8. Could you do a series on this amazing engine.(it may not work on GM:S) www.mediafire.com/file/65nhod7dyvbavaw/Most_Current_Engine.zip
      It is quite good and I would really apreciate you making a ame from it.
      great work

    • @irfanneox6601
      @irfanneox6601 7 років тому

      what is GM8? i jsut know GMS 1.x and GMS 2.x... :(

    • @eastpawz7986
      @eastpawz7986 7 років тому +1

      hacks software tutorials? LOL LOL LOL u must not be in the USA or just trolling this ... I could sell you a legit key or 20 USD GSM 1.4.. I have an unused license. You can either use it on the PC and then get a key for steam.

    • @enkiimuto1041
      @enkiimuto1041 7 років тому

      Before GMS Game Maker had several versions until it reached 8.1

  • @alexandremondo
    @alexandremondo 7 років тому

    How to set animation speed?

    • @PixelatedPope
      @PixelatedPope  7 років тому +1

      Second argument of the animated tile add script.

    • @alexandremondo
      @alexandremondo 7 років тому

      Thanks!! This is a great add to GM.

  • @JonPFS
    @JonPFS 6 років тому

    Lol... ive cheated it, ive used 2 diferente draws in the main tile sheet and only 2 animations... this way i have a 4 frames animation of the same draw. thanks very usefull tutorial

  • @EnigmatistSchism
    @EnigmatistSchism 7 років тому

    im not entirely sure why but im getting compile errors ..... anyone else get this problem?

    • @PixelatedPope
      @PixelatedPope  7 років тому

      What errors specifically? Are you on the latest version of GMS1?

    • @EnigmatistSchism
      @EnigmatistSchism 7 років тому

      youre exactly right about the problem .. twas the version thanks!

  • @sevensyv3142
    @sevensyv3142 7 років тому

    The link is broken :/

    • @PixelatedPope
      @PixelatedPope  7 років тому

      Yeah. Dropbox broke everything. Sorry. I'm fixing it.

  • @ALASKASCHOICEMUSICVIDEOS
    @ALASKASCHOICEMUSICVIDEOS 7 років тому

    ok ok interesting

  • @Syklonus
    @Syklonus 6 років тому

    I wonder if YOYO games watches these videos and goes "Shit, we'd better implement that feature".
    I'm guessing not.

    • @PixelatedPope
      @PixelatedPope  6 років тому

      I'm sure they were already thinking about this feature for GMS2 before my tutorial, but Nocturne did respond to the thread on the GMC with some nice words that made me feel all tingly. forum.yoyogames.com/index.php?threads/animated-tiles.10793/#post-71694

    • @Syklonus
      @Syklonus 6 років тому

      Nice. I've not upgraded to S2 yet so I'm unaware of the features. Are they still using the X/Y previous method for solid objects? I always found that to be a pain.

    • @PixelatedPope
      @PixelatedPope  6 років тому

      Yeah. The core of GML really didn't change much. A few things got renamed, but the big changes are to the room editor layer/tile system and the UI as a whole, obviously. It takes some getting used to (and I need to update my collision system to get it working again), but I wouldn't want to go back to GMS1 at this point. It's a clear upgrade after initial hurdles.

    • @PixelatedPope
      @PixelatedPope  6 років тому

      Also, if you ever just wanna chat GM, get help, or chill with other GameMaker users, you should check out my discord channel. discord.gg/FrJ5Sr

  • @chef2654
    @chef2654 8 років тому

    I thought my way of doing it was pretty efficient.. Guess not :/

    • @PixelatedPope
      @PixelatedPope  8 років тому +2

      Man, you should have seen my first pass at this back in GM8. I was using background edit to draw the frame backgrounds over the base backgrounds and it was SUPER slow, especially if the backgrounds were of any significant size.
      Your channel is really slick, dude! You obviously put a lot of effort into it. Subscribed.

    • @chef2654
      @chef2654 8 років тому

      PixelatedPope Wow man thanks a lot! Really appreciate it! Been sneaking peaks at your channel for a while, really nice indepth stuff :) sub4sub bro ;)

    • @1wolfcubb
      @1wolfcubb 8 років тому

      hey guys check out indieberg. he has a couple of cool projects on UA-cam. covers creating gml shaders in one project.

  • @aaronwise1089
    @aaronwise1089 7 років тому

    You could always use game maker studio 2