• Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!

surface

  1. David Richard

    Legacy GM Sprite from surface with alpha values

    I have been scratching my head over this little thing. Can someone help me out with this? What I want to do Draw an image with alpha values on a surface, a background part for example. Create a sprite from the surface with the correct background part's alpha values. Use that sprite for specific...
  2. B

    Legacy GM Having trouble deforming multiple regions of several surfaces with shader

    GM Version: 1.4 Target Platform: Windows Download: N/A Links: N/A (Sorry for just dumping hundreds of lines of code like this, but I don't know what to narrow it down to so I'm posting the whole thing.) I'm using fragment a fragment shader to add to the roster of customizations that can be...
  3. TotallyAverageGamez

    Copying a portion of a tilemap? draw_tilemap_ext?

    I would like to copy part of a tilemap to a surface so I can pass it to a shader. The problem is that there only seems to be one function for drawing / copying a tilemap; the draw_tilemap() function, which draws the entire thing (requiring the target surface be the size of the room, which is...
  4. C

    Android [SOLVED] Surface "disappears" after room_restart()

    Good morning Game Makers!, I started developing a game based on procedurally generated mazes. In my design, I used surface to draw shadows based on directional light. The game works in Windows as in Android enviroment... BUT In Windows enviroment, when I use a method like room_goto() or...
  5. H

    GMS 2 Drawing with alpha onto surfaces

    So I'm trying to draw an inventory using a surface, so I can easily manipulate how the whole inventory is drawn, I'm doing this by drawing the green slots onto the surface first, then the items, and then the numbers. Some of the items' sprites being drawn on have transparent sections. While the...
  6. P

    Legacy GM [SOLVED] Problem with lighting engine - surface

    So I decided to use this lighting engine, but there is couple of problems with it. For example when I'm trying to go fullscreen I get this: ########################################################################################## ERROR in action number 1 of Step Event0 for object obj_control...
  7. D

    [ RESOLVED ] Problem with Surface

    I have a surface that is being drawn to view_xview, view_yview. I added a zoom feature within my player to zoom the room view in/out a little. The problem I had is that the surface did not redraw when I zoomed out. To solve this problem, I tried a few different solutions. The most simple...
  8. P

    Question - Code Surfaces && Lighting

    CREATE: globalvar global_lighting; global_lighting = surface_create(room_width, room_height); STEP: surface_set_target(global_lighting); draw_set_color(c_gray); draw_rectangle(0, 0, room_width, room_height, false); surface_reset_target(); DRAW: gpu_set_blendenable(true)...
  9. T

    HTML5 Surface support in WebGL

    Hi, I build my game with HTML5 target and got error that surface_copy function is not supported. I tried to search any info about problems with game maker surface support in webgl but found nothing. Even official documentation doesn't mention it. Is there any workaround for this or roadmap...
  10. B

    Is there a way to save surfaces?

    I am working on an android game and I use surfaces to draw stuff on the screen. The problem is that whenever I minimize the game, the surface is lost. I was wondering if there's a way to save surfaces to a variable or some kind of data structure or maybe a file so I can recover the surface when...
  11. V

    Make surface solid?

    Hello, i have a top down game and surface. My player uses this code to move: //movement intput up = keyboard_check(ord("W")) and place_free(x,y-1); down = keyboard_check(ord("S")) and place_free(x,y+1); right = keyboard_check(ord("D")) and place_free(x+1,y); left = keyboard_check(ord("A")) and...
  12. Anixias

    Legacy GM Multiplayer - Send Surfaces

    So, I tried using buffer_get_surface and buffer_set_surface to send a surface of a dynamically created spaceship from the server to each client whenever a player changes their active ship. However, my cousin is unable to see any ships (except pirates, who use sprites defined in the actual...
  13. Anixias

    Legacy GM Super Weird Buffer Glitch [Solved]

    I've built a sort of drawing program into a game I'm making. The last thread I made regarding this drawing program is in regards to this same issue, but I've encountered a new glitch altogether. So, here's how it pretty much goes: Buffer A is a buffer grow, aligned 1, 1024 bytes. Surface A is...
  14. V

    Question - Code Potential bug with surface_copy_part()?

    I have converted a little project I was trying around with in Game Maker: Studio to GMS2 and had unexpected results. When trying to fix the problem I was able to trace it back to one particular function, namely surface_copy_part(). What I am experiencing, is that the resulting image will be...
  15. Goldoche

    [Solved] How do you draw overlapping shapes at <1 alpha without the alpha value stacking?

    I'm drawing a bunch of triangles on a surface at 0.7 alpha. Right now, if the triangles overlap it will create a darker value on the screen. However, I want all the shadows to be uniform in value on the screen. How would you do that? Screenshot: if (surface_exists(other.surface)) {...
  16. kamiyasi

    Making surface opaque?

    Hi. I'm using this surface here: ////////surf2 surface_set_target(surf2); draw_set_blend_mode_ext(bm_zero,bm_inv_src_color); ///cutout draw_surface(surf1,0,0); draw_set_blend_mode(bm_normal); surface_reset_target(); to make a transparent cutout of suf1, allowing the background behind it to...
  17. W

    Is there a way to use the application surface as a surface

    I don't know if I'm phrasing this right I only just started looking at stuff about surfaces today. But is there a way to make it so I can capture the application surface of the game and assign it to a variable so I can freeze it and have it fade away into the next room using an alpha decrease.
  18. Anixias

    Legacy GM Decal Surface Method

    I currently have a disabled decal object because I couldn't figure out an efficient method. I want to have a bunch of useless eye candy graphics be "caught" by a surface. I can do that part, and already have. I usually would make the surface cover the entire room. My issue is, I have a huge...
  19. M

    Legacy GM Using Buffers to store multiple Surfaces

    So, storing a single "frame" of a surface works fine. buff = buffer_create(320*240*4,buffer_fixed,4); buffer_get_surface(buff, application_surface, 0, 0, 0); What isn't fine is attempting to load multiple surfaces into a single buffer: buff = buffer_create(320*240*4*60,buffer_fixed,4); // Note...
  20. D

    Legacy GM [solved] Surface behaving weirdly.

    I have my global floor surface, which is a background for my game. After having some "fun" with shaders, my surfaces were generating the "reffering to non-existent" errors. I've fixed them by creating them everytime they're missing, in a Draw event. But now, the floor surface is on top of...
Top