• Hey! Guest! The 39th GMC Jam will take place between November 26th, 12:00 UTC and November 30th, 12:00 UTC. Why not join in! Click here to find out more!

surface

  1. 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...
  2. 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)...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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)) {...
  10. 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...
  11. 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.
  12. 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...
  13. 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...
  14. 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...
  15. N

    Windows [SOLVED] Allow my light surface to hurt the enemy

    I'm trying to get the light surface to damage the enemy when it touches it. [o_light_main] Create Event: surf = surface_create(room_width, room_height); surface_set_target(surf); draw_clear_alpha(c_black, 0); surface_reset_target(); Step Event: execute code: if (surface_exists(surf)) {...
  16. Q

    Legacy GM Creating a dynamically changing background

    Hello, I'm working on a rhythm game, and I want to implement a feature whereby when the player hits a correct note, the background begins to change color. To elaborate on that, I want it to form a "wave" effect, where the background changes in a straight line that moves until it reaches the...
  17. jobjorgos

    Legacy GM Day and Night Lighting Cycle error

    I tried to make a Day/Night lighting cycle with the object shown below, too bad every time i run the game i get this error: Variable obj_nightCycle.nightCycleSurf(100007, -2147483648) not set before reading it. at gml_Object_obj_nightCycle_DrawEvent_1 (line 1) -...
  18. leveller

    Question - IDE Surface Pro 4 & zooming within workspace

    The Surface Pro 3 & 4 have been excellent for me to use for GMS. Firstly a great laptop while out and about, secondly a good tablet and pen for designing/art. GMS 2 is really working out well for me and I'm enjoying learning the new UI. I do not know if this behaviour is common amongst laptops...
  19. Dani

    Legacy GM How to draw surfaces with subpixel enabled?

    Hello! I use a surface for drawing all shadows of all objects (characters, enemies, etc.) and avoid transparency overlap. Then I draw that "shadows surface" at the depth I want (below all objects, and above the floor tiles). It's a bit weird, but when I draw shadow sprites into a surface, and...
  20. XirmiX

    Legacy GM Any tips/coding structures on getting lighting going?

    I've benn hitting myself over the head with all of this lighting system mash. I checked out a few engines, looked at tutorials explaining how lighting and shadows work and how to implement them in the game, but nothing that could really help me get things working. What I have right now is...
Top