surfaces

  1. G

    GMS 2.3+ Drawing A Colored Shape Below A Surface With Text Colors The Outline Of The Text

    This is a weird issue and I couldn't find a specific forum thread. You'll notice in the video below that there is a blinking rectangle being drawn below a surface on the thumb of a scrollbar user control. For some reason, the outline of the text being drawn to the surface of the thumb button...
  2. Tymo

    GMS 2.3+ Problem with scaling the surfaces.

    Hi there, I'm a beginner and I come with a problem that I'm struggling with for a while. I searched on the internet but I have no luck so, my game is low resolution (640x360) and I use surface_resize to upscaled two times for a good look, I also use a vibrant light system with shaders that I...
  3. M

    Camera Jitter using Lerp - Instances and Surfaces

    I discovered something while building a very smooth camera and using the lerp function. It seems the camera will jitter as it gets very close to the object its following if the lerp value is below 1.0 Mine is 0.05 I began to solve this by using "div" instead of "/" in any division calls inside...
  4. M

    Saturation Shader [SOLVED]

    I have a de-saturation shader that works on instances. I want to draw the same shader over the floor to cover the floor tiles. I only want the shader to cover the walls and the floor, so drawing on the application surface is out. I've tried using surfaces but no luck. Any ideas on how to go...
  5. S

    SOLVED I can't seem to be able to remove part of a surface...

    gpu_set_blendmode(bm_subtract); if room == rm_village { draw_rectangle_color(3434,3520,3551,3567,c_white,c_white,c_white,c_white,0); } Hello. I'm drawing to a surface (ingame water reflection) which reflects instances onto the surface. There's certain pixels I don't want to be reflective...
  6. H

    GML Quick question (surfaces/draw events)

    If I use the 3 different draw events to manipulate a surface, is it enough to check if it exists just in the Draw Begin event?
  7. B

    GMS 2 Scripts drawing surfaces, memory leak.

    So originally I've got 16 sets of this code block messily creating a surface each all within a single draw event; since they're all similar blocks I decided to figure out scripts and tidy it up since the variables are easy enough. I translated it directly into a script with no changes in logic...
  8. R

    SOLVED draw_background() function not working properly in HTML5

    I have an issue with an HTML export, however this works flawlessly in a Windows compile. Problem: background change isn't detected in draw event. My draw event contains this piece of code: if surface_exists(surf_action) { surface_set_target(surf_action); //...
  9. Tiago Carvalho

    GMS 2 Can a drawn surface be bigger than a room?

    Good afternoon. I am using surfaces to create a lighting system (dark rectangle that overlays the room) , starting at -100 x and -100 y, and being bigger than room width by 100 and room height by 100. When using screen shake, there are parts of the room that are not overlayed, only near the...
  10. Tobey

    GMS 2 (SOLVED) FC Depth System and Surfaces

    I recently redid my depth "system" which was just depth = -y, and followed Friendly Cosmonauts tutorial on it (). It works great; however, I have a gore system that uses a surface which gives blood a splatter effect. Unfortunately, this surface is being drawn over everything: How do I...
  11. FoxyOfJungle

    SOLVED [DISCUSSION] I need opinions (and help) regarding building an interface (views, surfaces, cameras, Draw GUI...)

    Hello ! Look at this interface image: This is an interface. I want to use the DRAW GUI event to draw ALL the interface of the program I'm doing (everything inside it...), however, I need to draw the camera view in this middle area (where is the rabbit). The questions: 1 - How would I do...
  12. Daniel Mallett

    GMS 2.3+ I thought I had the hang of surfaces

    I thought I had this down obviously not. I have the following code. if !surface_exists(game_surface) { game_surface = surface_create(1920, 1080); surface_set_target(game_surface); draw_clear_alpha(c_white, 1); draw_sprite(spr_bat, 0, 0); // NOT a problem...
  13. M

    SOLVED How can I display some objects above a surface and some objects below it?

    I'm wanting to make a fog-of-war that allows the terrain to be seen, but the players, items, bullets, and so on, not be seen unless within LOS of a player. How can I do this? I am not against using a different fog-of-war system though I'd like to avoid doing this as the system I'm using now...
  14. Andymakeer

    GMS 2 Surface blend turns overlapped text black

    Hey guys! So I was playing with surfaces and blend_modes and found out its possible to customize the blending results. I was trying to draw text to an alpha-cleared surface, but the result was kinda ugly. Then, after studying a little, i was able to "ignore" the surface color and alpha blend...
  15. hughrock18

    SOLVED Overlaying 2 or More Sprites

    I COMPLETELY understand the concept of using surfaces (or shaders) to overlay one sprite image on top (or below) another. Is that the only way(s) to do it though? If I want to, for example, overlay a player sprite with an armor sprite (sub images and all), are surfaces/shaders the only ways to...
  16. P

    SOLVED Can I use Drawing Surface Functions in Draw GUI Event???

    Actually the questions lies in the heading, but here is the code that contains problem: //Draw Gui Event //Editor Window Draw9SlicedBox(spr_level_editor_button,0,0,editor_window_width,editor_window_height); //Buttons DrawSetText(editor_font,c_white,fa_middle,fa_center) for(var...
  17. Z

    (SOLVED) Lag issue, but solved ONLY when ALT+ENTER?

    Hi everyone, for a long time I have been fighting lag in my game. The lag did do something good however; I learned to optimize so many things, that the lag was reduced by a ton. I can basically have like 2000 instances running a small (but clever) amount of code and the lag doesn't really...
  18. Archdemon

    Shaders and Surfaces quick question

    So I am making a little platformer with my nephew (trying to get him into programming; he seems to have a liking for it.) And I am using shaders and surfaces within a single room at the moment, but I am noticing that the shader seems to also affect the surface making for some let's just say...
  19. Tony M

    Shaders [SOLVED] Dark outline around sprites introduced when I added a shader and surface to project

    Hi, I have successfully implemented a full screen wave shader that I adapted from here: https://marketplace.yoyogames.com/assets/261/free-shaders The shader itself works quite well, but has unfortunately introduced an issue with my sprites. Sprites with semi transparent edges (anti-aliasing)...
  20. TheCheeseMaster

    SOLVED Choppy Framerate When Drawing Surfaces

    Hello, I'm trying to figure out how to fix the seemingly lower framerate as well as objects jumping around a tiny bit when surfaces are being drawn. Here's an example: Here's my code: Draw GUI Begin: if(tea_active == true) { /// @description Draw Tea Effect...
Top