mask

  1. D

    GML How instance_position really works

    I am making a minimalistic puzzle game with hexagons. To check the nearest objects I am using instance_position. Searching a lot on web and forums I did not get enough information on how this function really works. So I decided to create a simple example to understand it and share with others...
  2. M

    GameMaker How to set the collision of an object right if I stretch the sprite

    What the title says. If I have an object with lets say a default sprite of 120 X 120 and I stretched that sprite in the drawevent of the object so like: draw event: draw_sprite_stretched(spr_button_start, subimage, x,y, 1000, 120) The object uses the old collision mask of the old sprite (the...
  3. David Lorenz

    Trouble with drawing Surfaces for Scrolling Menu

    Hello, everyone! I'm making a scrolling list inside a menu and bumped my head against my ignorance about Surfaces. First, I draw a group of sprites with a loop, considering that the position have to be set according to the menu's slider position "scrolling_y". for (var i = 0, yy = 0; i <...
  4. Antikore

    GameMaker Mask index is technically set but is not effective

    Hi, everyone! I'm getting issues using mask index. Let's say I have sprites for different type of players. One of them has a smaller mask, so when I change the player's sprite, I change the mask too. However, even when the mask index variable always contains the correct mask index (checking it...
  5. C

    GML How to Pull Collision Mask Vertices?

    Hello, I have a custom shader as a lighting system in my 2d game. I have point lights that move around, and they respect shadow casters via a sequence of vertices I pass to the shader. I spent quite some time writing an algorithm that traverses a sprite and attempts to create the necessary...
  6. L

    GML AUTOMATIC Shadow/Light Mask Generator for GML Lighting Engines (Script)

    AUTOMATIC SHADOW/LIGHT MASK CREATION FOR GML LIGHTING ENGINES! Hey Everyone! So a while back I was making a little top down shooter for fun, I experimented with various 2d lighting engines, most have the ability to create a "shadow", or "light mask" based on a sprite which allows shadows to be...
  7. Mehdi

    How can I do this?

    Hi friends and merry Christmas to all. Does anyone know how one could make such terrain? (Dark areas) Only a few points: This is non-physics, therefore box2d terrain generation is not needed. The terrain is not procedural, because the game is played in preset levels. The terrain is smooth &...
  8. Rafael Augusto

    Crashing when colliding

    Sometimes the car enters the object and gets stuck. How to make the car not enter solid objects in all collisions? See Attach file! // collision if place_meeting(x, y, Casa) || place_meeting(x, y, Casaa) || place_meeting(x, y, Casab) || place_meeting(x, y, Forest) || place_meeting(x, y...
  9. Rafael Augusto

    masks with image_angle

    How to rotate masks along with "image_angle"?
  10. FullCup

    SOLVED collision_rectangle working without mask...

    I put a mask_index of an object a empty sprite, so that in some conditions it doesn't collide with the object. The place_meeting works, when the mask_index is off it will not collide (what i want). ///It works //Mask off with (argument0) {if (condition) mask_index = spr_empty;}...
  11. Lady Glitch

    How to NOT scale mask?

    So it appears that scaling a sprite also scales its mask. No matter if I scale it by xscale/yslcale, draw manually with draw_sprite_ext(), change the mask from "same as sprite" to something different, or keep it as it is. With that, my bounding box collisions get messy. I would like to keep my...
  12. flyinian

    Question about collision mask rotation..

    I've been following this YouTube tutorial for collision masking and so far so good. The video is time stamped when the collision code is complete for visual representation. However, I'd like to make vehicles with collision but, noticed that the current collision system doesn't work with...
  13. FullCup

    Circle collision stuck in block.

    Could someone help me about the circle collision, I'm creating a game like 'Among Us' (movement), and I think a circle mask would be cool. However, it is hard to make the collision system so as not to get stuck in the block. How I'd like to do: You're just moving to the right, but the collision...
  14. N

    GMS 2.3 Not Generating Sprite Collision Masks

    Newly created sprites in GMS 2.3 don't have their collision masks generated. Automatic and Full Image modes do absolutely nothing, and masks can only be set and resized manually. Otherwise, mask coordinates stay at 0,0,0,0, as shown in the image below. Mask type has no effect either. I've tried...
  15. angelwire

    Asset - Scripts AEColorMask - Apply color to sprites with pixel-perfect precision [free]

    AEColorMask is a shader with a collection of scripts that let you apply a color to specific sprite areas using a mask Marketplace Link: https://marketplace.yoyogames.com/assets/9420/aecolormask-recolor-sprites With these scripts and shader you can color objects to add variety to your game...
  16. Dilawlaw

    SOLVED Problem with my mask position

    Hi guys, I am working on an 8-bit game and I have a problem with the collision mask of the player where it's not situated exactly as I see it on my sprite. I wrote a code to draw a rectangle showing my collision boundaries ( bbox_left, right top, and bottom). here is a zoomed picture of how the...
  17. sinigrimi

    GameMaker changes in the angle of the collision mask (rotation of the collision mask)

    can i change the angle (rotate) the collision mask? or do i need to change all sprites? :( screenshot below
  18. J

    Collision Object/Collision mask

    Helloo! I am using Game maker Drag & Drop and I have a problem with my collisions masks ( I guess?).. But first the problem: I have a collision object with a normal collsion set up, so my player should be able to walk on it and against it, but not through it. But since I scaled the collision...
  19. Architheutis

    [Solved!] Collision mask to be changed

    Hi there! I`m still in final works of my game. I remarked a simple, but annoying problem: My jump`N`running idle does everything he should. So far so good. But if I duck, he goes down on ground, to dodge incoming enemies. But because of a line in the code within my Player-object, the ducked...
  20. N

    Achieving a static pattern effect

    Hey all! I'm trying to achieve an effect where an object moves and displays a static pattern behind it. like this: https://imgur.com/gallery/1du6zXI/new I have been trying to achieve this with blendmodes, but with no success. Can this be achieved with blend modes? If not then how could it be...
Top