1. JeanSwamp

    Apply Shader to everything within a sprite_width && sprite_height area

    Hello, I am trying to make some underwater effect in a sidescrolling game. Applying a fullscreen shader to create an underwater effect is pretty easy, but when you have in the same screen both water and terrain, this might get tricky. Basically I need to apply the shader to everything that the...
  2. duran can

    GMS 2 How can I draw an object only on the surface?

    I am a former game maker user, so I forgot too many techniques in gml. I want to draw an object only in the surface. But that object should be drawn with the entire draw event. Because if the object has draw_text in the draw event, I want it to be drawn. When I remove the draw event of the...
  3. zendraw

    SOLVED drawing to surfaces

    can i set any number of surfaces to draw to before i reset? or do i have to constantly reset after each set? surface_set_target(surf1); surface_set_target(surf2); surface_set_target(surf3); surface_reset_target();
  4. N

    SOLVED Surface with shaders displaying blank window

    Greetings developers! Recently I was playing with surfaces and shaders and I've managed to create (by following some tutorials) a simple lighting system with some shaders. It worked perfectly on my demo project but when I tried to apply it to my main project it didnt work at all... I don't...
  5. Adry

    Newb question: How to draw onto a surface?

    Hi! I'm trying to understand surfaces, not the application_surface, but rather an individual surface that I can manipulate.. This is probably a beginner question, but, as the title suggests, how do I draw onto a surface? More specifically, how do I draw my Layer background sprite onto its own...
  6. Mortalo

    HTML5 Bug with surface_reset_target in Draw GUI?

    So, I'm converting my game from windows to html5. I knew that there would be some changes needed, but I was not expecting that I will have to forget about any surface use in the GUI layer. TL;DR: In Draw GUI events, surface_reset_target makes drawing on the GUI layer to not work properly. Let...
  7. brice_platinum

    GML Sprite fade transitions using surfaces

    Hello everybody, I'm trying to make a simple fade effect between two sprites and i got in to a problem. This is what I am expecting to get I created 2 sprites with the pictures and a simple background with a blue dot in the middle. Now what I want is the first image starts to fade away at the...
  8. Daniel Mallett

    GMS 2 sufaces from other objects

    I have the following code under the draw event of an object. This creates a surface then pops some bits inside it. This code works fine. My problem is I want to draw things inside the surface from another object. I assumed I could prefix obj_differentobject. followed by the surface name. However...
  9. M

    Pausing the game doesn't draw the paused game background

    I'm using the following code to pause the game, it works fine and all, but the one quirk i cant seem to fix is that the while pausing the game takes a screenshot of the screen, it doesnt draw that screenshot to the screen while paused (i want the paused game's background to show behind the...
  10. Tthecreator

    Legacy GM GM drawing acting in unexplainable ways

    Hi there! I was working on my UI asset and came across a weird bug I just cannot wrap my head around. I was making a function called draw_square_rounded_colour, which is a combination of draw_rectangle_colour and draw_roundrect. (draw_roundrect_colour only has 2 colors instead of 4). I...
  11. Daniel Mallett

    GMS 2 Surfaces

    I am in the process of migrating some of my code from the application surface to 'an actual' surface. I have had no problems up until now. I want to resize my surface using the surface resize function. After doing this I get the width with the get surface width function and it reports...
  12. Tiago Carvalho

    How to make a printscreen from surface and sprite

    Good day, GameMakerz. I have been facing some troubles creating a printscreen system on an app I am creating. I am using a surface to have things drawn on the screen by the player (painting area) and I have a sprite drawn by the program on top of that surface. My issue is that I am not able...
  13. CodeManu

    GMS 2 Save surface with the "correct" alpha blending

    Hey all! I've been trying to export an surface (via surface_save method) into a .png, but due to how alpha blending works on surfaces it gets tinted (towards black as I'm using draw_clear_alpha(c_black,0) to clear the surface). I know this is the correct behaviour, and that It can be fixed by...
  14. Deadly Serious Media

    GML Area Spawning

    Hey everyone! So I'm working on our third GM game and needed a problem solved. Not sure if I did it right but it works for my purposes. We wanted destructable ground tiles but placing 8x8 px tiles all over the place was a pain. I build this simple object spawner. You place a ground marker in...
  15. YoSniper

    Legacy GM [SOLVED] Shadow with window around player

    [EDIT] I have figured out the problem. It was an issue with x and y relativity, as well as the size of the surface I was using. Hello all, I've posted about shadows and light sources before, but now I'm trying to create an object that darkens the area around the player the farther out you get...
  16. Golden Gremlin

    How to scale and draw application surface manually?

    I am trying to scale and manually draw my application surface to my fullscreen game window. Ultimately, I am doing this so that I can guarantee I am scaling by an integer when in fullscreen mode, to prevent pixel distortion. As a test, I am just trying to scale my application_surface by 2 and...
  17. Weastøne Entertainment

    GMS 2 [SOLVED] Pause screen with surfaces as background

    Hello there!, I am having some difficulties with surfaces when trying to use them as background; first of all, I'd like to use the draw gui event for that instead of the regular draw event. Then, there are two methods I am considering which are to create a sprite from the application surface...
  18. Kleber_Ferreira

    GML Creating sprite from surface on a certain layer

    I'll try to explain what I want to do the best I can. I've been looking into the function sprite_create_from_surface, so I can save a sprite from whatever is drawn in a certain spot on my screen. What I need for my design is actually to create this sprite "behind the curtains". The player...
  19. Daniel Mallett

    GMS 2 Depth

    When you draw somthing then draw something else, the last 'draw' code will cause that to be on top. Is there any way to tell the draw functions which layer I intend for it to be drawn regardless of its chronological position as it were?
  20. F

    Java Extension returns a Bitmap(img) as a Byte[] as a String and in GM change it back to sprite.How?

    Hi, so I have a java extension( java code: ). It has 1 function and the function have 1 argument that is a String called fname. And it returns a String. The function should get the file from the path of fname and if it's an image file, get it as a Bitmap. then I...