surface

  1. J

    How to change direction a surface is facing?

    I have this code for creating a boost flare when pressing a button. if (!surface_exists(flare)){ flare = surface_create(124, 103); } surface_set_target(flare); draw_sprite(Boost, image_i, 80, 76); gpu_set_colorwriteenable(1,1,1,0)...
  2. FoxyOfJungle

    GMS 2.3+ surface_save(application_surface) alpha blending problem...

    Hi! #1 - I have this code in the Step Event of an object: if keyboard_check_pressed(vk_space) { surface_save(application_surface, "ImageFile.png"); } #2 - Result: As you can see, there is a color difference in anything with transparency (like the shadow of the player) between the...
  3. M

    GMS 2.3+ I want to know how to exempt draw_surface for GUI or Obj

    My problem is my GUI and Portrait is always dark when i used surface or shader (Image is below) I want GUI and Portrait always set default color please help (are there any function or ways to solve this?) GUI and surface they are already different instance layer (GUI is above surface)
  4. P

    GML Apply surface only on part of screen

    Recently I came upon this CRT filter and wanted to use it in my project. Essentially how it works is through one object, which draws the filter in the Draw GUI event. Here four passes are done to run each component of the filter (downscaling, scanline filter, screen distorting and...
  5. 3

    SOLVED Voronoi Diagrams gets drawn in wrong colors.

    I followed this youtube tutorial to create Voronoi Diagrams using surfaces in game maker 2. so far it works but my colors are not really random but they are all a dark redish. I could not figure out where this happens, though. oMapGeneration /// Create Event randomize(); // Create surface...
  6. Antikore

    SOLVED Sending an image through network

    I've been playing around with GMS 1.4 native networking the last days and I'm doing pretty good, but the challenge I'm facing now is so much more complicated than I've expected. My idea is to send an small image (240 x 135) from the server to the client. As I'm doing my tests on my own computer...
  7. frootloop69

    GML [SOLVED] Per-pixel Destructible Bases using surfaces - only part of the image gets destroyed

    Hi all, hoping someone can help me out here. I'm making a space invaders type game and I want to add per-pixel destructible bases - something similar to the original Space Invaders game. Its mostly working, but I run into a strange problem. The bases seem to get destroyed fine up until the last...
  8. M

    SOLVED Drawing a Shader Meant for the Whole Screen on a Smaller Surface

    I'm 4 days into making my game and I want a glitch effect for when enemies are damaged, I found bktGlitch which is a really, really good shader from what I can tell. It is meant for use on the application_surface. However, I'd love to use it on my o_simpleEnemy. So I figured out how to make my...
  9. A

    SOLVED surfaces not working

    Hi! so i wanted to mess around with surfaces for an UI and it dint work it dint draw the surfaces i tried following a tutorial that worked right before but now it just doenst work it doesnt draw the surface please help. CODE: if surface_exists(surf){ surface_set_target(surf)...
  10. ikonhero

    SOLVED Problem with pause / freeze using surface; image appears stretched.

    Hi, I'm trying to make my game freeze / pause by deactivating all instances from a seperate pause instance. Before deactivating all instances I make a copy of the application surface. After all instances are deactivated I draw this surface in the draw event of the oPause instance. However, the...
  11. TheCheeseMaster

    SOLVED Surface Drawing Stuttering

    Hi there, Basically what I'm trying to achieve is this: -have "cloud shadows" moving across the screen -draw the cloud shadows with an alpha I can control (all with the same value at any given time) -have the cloud shadows create a uniform shadow colour when overlapping, rather than having two...
  12. Forestherd

    GMS 2.3+ surface_set_target() not working in HTML5

    Hello! I am currently trying to apply a water shader over the entirety of my game view. Here's what its supposed to look like (Windows). Water is rendered on the bottom half of the screen with a slight distortion effect: However, this effect does not render on the HTML5 export. Here's what it...
  13. H

    SOLVED Question about Draw Pipeline (I think)

    In a case like this: // in Draw GUI surface_set_target ( blur_surface ) ; shader_set ( shd_blur ) ; draw_surface_stretched ( application_surface , 0 , 0 , blur_surface_width , blur_surface_height ) ; // where blur surface is smaller does the shader apply to the app_surface before or after it's...
  14. S

    view_surface_id question

    Is it possible to set the view_surface_id for a view to a surface, draw only a few sprites to that surface, then set the view_surface_id to another surface and draw everything else there? I can't seem to do this and I'm wondering if you can only set the view_surface_id to one surface per frame...
  15. jf_knight

    Shaders Three-layer surface shader stack

    I'm implementing three surfaces and applying a shader to each. However, only the first and last shader seems to appear, the second does not. They are order-specific. Am I doing my shader stack wrong? obj_target DRAW event if !surface_exists(main_surface) { main_surface =...
  16. DonMaklesso

    [SOLVED] Sending surface over network

    Hi, I've been trying to send an application_surface in a buffer (I'm using a server-client system) and displaying it in the client's game so that he would "see what the server sees" but this doesn't seem to work. It doesn't crash or anything just nothing happens. Here's the code: // Server -...
  17. Pelican Police

    Legacy GM Is it possible to edit game maker texture pages like a surface?

    For example, if you wanted to tint/change the game environment, you could redraw all the sprites in their new form directly to the texture page, rather than doing it in real time every step using a shader or even image blend. I'm sure this could lead to other problems, similar to the problems...
  18. C

    Pixel Perfect and "Pixel Snapped" GUI

    Hi guys, I need to make my GUI layer "pixel-perfect", and found no clue around here.. The blue cube is being drawn in the "Draw GUI" event The white cube is being drawn in the "Draw" event //I want the blue cube to behavior like the white one while rotating. //But found nothing like this for...
  19. Starfag

    Weird contour around sprites when surface is drawn (OpenGL only?)

    Hi! I'm using surfaces to copy the screen content before deactivating all other instances (like a pause screen). When the surface is drawn, it presents a weird contour around objects (see image). You can see that there is a gray contour around the door, the wardrobe, the mat and even the corner...
  20. Ponzalskov

    GMS 2.3+ [SOLVED] Help with Sprites not drawing on super simple test project.

    As the title reads, its a project with 1 sprite (16x16) 1 object (with a Draw Event with 6 lines of code 1 room (with an Instances layer and Background layer) Any sprite is not showing, neither tiles (i've tried before but simplified to the minimum to show the basic and main problem). No error...
Top