GameMaker Studio 2 Quick Tip: Hitflash (NO shader, NO white subimage)

Game



Pretty everyone knows this effect: The hitflash as a visual representation that an object (such as an enemy) was hit by an attack.

In GMS2, this is oftentimes achieved by either using a shader (shoutout to Shaun Spalding) which draws the sprite in solid white or by using a dedicated, solid-white subimage. Blending doesn’t really work since you can use blending to have a solid black sprite but not a solid white one.

However, this quick tip shows you a different approach, using an often overlooked function and basically just three easy lines of code.

Requirements are a basic understanding of Game Maker Studio 2 as I am not going into detail on how to create objects or how to fire events.

Intro and Outro Music: “Home Sweet Megalopolis” by TeknoAXE, licensed under a Creative Commons Attribution 4.0 International License

Nguồn: https://dccwo.org/

Xem thêm bài viết khác: https://dccwo.org/game/

17 thoughts on “GameMaker Studio 2 Quick Tip: Hitflash (NO shader, NO white subimage)

  1. This is great! Tried to make a 'camera' go black without using black-rounded-square-images. This worked perfectly!

  2. yeah. um. this would only apply if you have a single enemy like a boss or something but if you have mutiple monster sprtie (everygame ever) then this isnt that helpful because ur setting the collision as the sprite colliding with the bullet not the bullet colliding with the sprite

  3. Cooles Video! Ich liebe Game Maker Studio 2 (mache damit selbst ein Strategie-Spiel im Stil von Age of Empires) und mag Leute wie dich, die Tutorials dazu machen! Mein Abo hast du! 😀

  4. This whole YouTube thing is actually fun! Forgot to mention: If you have any ideas / requests – just contact me! Also, I will promise to invest in better gear further down the road if enough people subscribe and I can monetize this chanel.

Leave a Reply

Your email address will not be published. Required fields are marked *