surface

  1. Ashin

    GML When clicking on an object, the coordinates of the mouse and the object are different

    When an object is clicked, it is intended to be processed in a specific way. (GML Version v2024.2.0.132) I created an interface object and instantiated an icon object with its GUI event. Next, I created a step event for the icon object so that it could switch to the weapon by the icon when the...
  2. J

    [SOLVED] Issue trying to imitate visual effect with shaders and surfaces

    Hey, so I've been trying to recreate an effect shown in the video "Weird POV effect" by Chris Long (Couldn't share link because it immediately flagged the post for review ¯\_(ツ)_/¯). Basically it's an optical illusion designed to make it so things are only visible when they are in motion, and...
  3. D1Project

    GameMaker sprite_add_from_surface and the number of textures

    Hi! I'm creating a sprite within the game using sprite_create_from_surface. Then I'm adding images using sprite_add_from_surface. The result is 1 sprite that holds 16 images. Does it create 1 texture page or 16 texture pages? I'm a little bit confused by the manual as it says this for...
  4. B

    Draw on surface same as video surface, will be used as texture on vertex

    Hi, I wonder if it's possible to draw on the same surface as the video ( video_draw() ) is being projected on. I searched for days about topics on this and experimented on many ways. But no results. The video is rendered perfectly as a texture on a vertex buffer by using: var tex2 =...
  5. GarbageHaus

    GameMaker [SOLVED]Unable to Draw to Surface (BETA Build)

    It's been a very long time since I posted on the forums but this one has me stumped. I'm using the Beta Build of GMS2 which has some nice features so it might be a bug with it but I sort of doubt that since this is the first time I've needed to use surfaces. I am trying to get a small sprite...
  6. konjerk

    Layering surfaces with blend mode hacks

    Hello, I am doing some tricks using surfaces for my project, and I'd love to get an answer if what I'd prefer to do is possible or not. I have sprites drawn to a surface that have edge pixels with alpha levels. Those don't render great to a surface as we all know (if we read about surfaces and...
  7. Metzger

    GameMaker Drawing shadows also draws everything else

    Hiya! I really need help with this. I have problems when I draw shadows from wall objects (obj_floor). When the room is large enough in this case 2048x960 when moving from right to left the further left you advance the more the shawdows are drawn as the mirror image of the room. This happens...
  8. Tangerine

    GameMaker It is possible to draw a tilemap scaled?

    How can I draw a tilemap but scaled? My game is resolution is very low, because of that, drawing stuff inside a surface makes all elements inside to jitter. when the camera moves. My workaround for this is to draw everything inside the surface scaled to the aspect ratio of the game window. And...
  9. evigouroux

    GameMaker Interlaping shadows

    Hello everyone, first time posting here. Sorry for any mistakes I may make, english is not my first language. I've been having trouble following this tutorial and adapting it to my need. I haven't been using any shader as they were, so far, not needed for what I was doing. In a nutshell : I'm...
  10. chirpy

    GameMaker view_set_surface_id : is power of two size required?

    Say I have this pixel-perfect view surface that I'll upscale later to fit the screen. For html5 target, does it need to have the next-power-of-two size as the manual of surface_create (highly) recommended? If that's the case, it seems that I need a camera of matching size, which will capture...
  11. Tangerine

    GameMaker How to draw a layer into a surface?

    Hello! I would want to draw the "Instances" layer into a surface. I know it's possible by using the layer begin and end scripts. However the problem is that some instances from that layer create and draw surfaces in their draw events and seems that is not possible to create surfaces after...
  12. B

    High resolution application surface with rotating pixel art?

    I have a pixel art game with some rotating sprites. Setting the application surface to match the camera view size allows my sprites to rotate freely while still matching the rest of the pixel art. However this causes some issues relating to sub-pixel camera movement, where the camera can see the...
  13. MaxLos

    SOLVED Noob question about surface blending

    Hi, I have a noob question about surface blending. If I have two different surfaces with a semi-transparent shape being drawn on them, is it possible to make it so they don't blend together when they're overlapping each other? So for example in this gif the circular shadow is blending with the...
  14. R

    SOLVED Surface stops working

    Hello everyone, I need help to better understand what is happening. I'm using a surface to create a shadow and light effect in my game: The problem is that my surface, which is responsible for making everything dark and creating lighting, is "disabled" when I use another surface on top. This...
  15. G

    GML Drawing to a surface 'within' object's sprite

    Hello, I have an object that is a text entry box that scrolls to the right if the number of characters exceeds the width of the box. To accomplish this, I have created a surface and drawn the entry box texture as well as the entered text to it. The scrolling works, but once scrolling starts...
  16. C

    Scaling down a Draw GUI function - different room sizes, neither show GUI

    The game begins in the main_menu room, which is 576 x 324. The menu sprite is 106 x 122 and is supposed to pop up when you select the settings icon object. The second room is 820 x 140, but has a view/camera that gets the display as shown: o_settings_icon (on left click)...
  17. 2

    GameMaker Does Texture Page Size Determine Max Surface Size

    Do texture page sizes also determine the maximum size a surface can be?
  18. David Lorenz

    GML SDF Font drawn on Surfaces appears distorted

    Hello, everyone! I have Menus with a lot of pages of scrollable text. In order to optimize, I draw everything on different surfaces only one time and then draw the surfaces, getting much higher FPS. I recently started using a SDF Font to get a sharper pixelated look, but when I use it on...
  19. T

    Loop over all pixels in a shader to calculate an average

    Hey, I'm trying to calculate a kind of average of all the pixels on a surface. For now I'm doing it in a step event with the function surface_getpixel but it's painfully slow so I'm trying to do it with a shader. The problem is I don't want to loop through all the pixels individually as a...
  20. OK_Boom

    SOLVED Help with surface shadows

    Hi Im a noob, I'm making a low-res point and click game. Im trying to create shadows using surfaces to fix the issue with opacity overlap. When I create the surface I get this slight delay/jitter when the shadow sprite follows the player_object, specifically when moving diagonally. Game...
Top