• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

surface

  1. R

    Windows Glow effect on items

    Hello everyone, I'm creating an effect that gives brightness to items, using code from youtuber Matharoo (this effect here): the code itself works, but there's a problem with it that I can't resolve. //draw event if(!surface_exists(surf)) { surf = surface_create(sprite_width,sprite_height)...
  2. MrWolfyer

    Shaders Mixing/blurring all colors from a texture?

    Hi everyone! Recently I've been messing with shaders and I had a little problem. I just couldn't figure out a way to get every color from every pixel in a texture, and then mix it all up to create another texture that's just a single solid color. From what I've seen on ShaderToy, an easy way to...
  3. Tangerine

    GameMaker Scrolling surface in a 3D plane help.

    I'm trying to draw a scrolling surface as a texture on a plane. I managed to make it repeatable using gpu_set_tex_repeat. And next I submit the vertex buffer with the surface as a texture. That part works. But not sure how to make it scroll, when I use draw_sprite_tiled inside the surface it...
  4. J

    GameMaker [SOLVED] Draw object to surface after destroyed

    I'm trying to take advantage of game maker's surface system; the player can shoot bullets out of a gun and the casings of the bullets to be drawn to a surface so there's no performance cost, but I cannot for the life of me find a tutorial or thread relating to objects being drawn after they are...
  5. G

    SOLVED [GML] Code works in Draw GUI, but not Draw event

    I'm following Reverend Greg's Lighting tutorial, seen above: It was coming along nicely, but I ran into one little problem. I want to draw one specific particle system after the lighting shader is applied, so that the particles always appear illuminated, but the tutorial has the shader applied...
  6. Magicwaterz

    GML Drawing preset text sprites from string

    Hello! I'm trying to create a text sprite so that it can be scaled properly from the center origin. What I want the text sprite to look like is this one here: The main text is colored black (which may be changed if needed) with an outline (whose color and opacity can be changed if needed)...
  7. J

    Does the GUI surface layer get destroyed on room change?

    So a few hours ago I started playing around with the idea of a simple room transition screen effect. The effect would fade the screen to be completely black, switch rooms, and then fade back in. I have a persistent object that was suppose to handle the alpha variable, and then I draw a black...
  8. Tangerine

    GML Overlay surface with alpha help

    Hello! I'm doing an overlay in a surface this way: surface_set_target(surf); draw_clear_alpha(0, 0); draw_tilemap(tilemap, 0 - _cx, 0 - _cy); gpu_set_blendmode_ext(bm_dest_alpha, bm_inv_src_alpha); with (obj_circle_wave){ var _random = random(1); var _w = 5 + _random + w; var _h = 2 +...
  9. Kitsune Faroe

    GML Geting Image as an Array

    Is there a way to get Array from an Image(Sprite or Surface) with it's values? I want to make a Mask that also can be read and written with code. And if I can't get the Array, is there a better way to draw a Mask from an array without high cost on performance?
  10. Drewworks

    GML Alternative solution to using sprite_create_from_surface() and sprite_collision_mask()

    I have found that sprite_create_from_surface() is very process intensive and can cause a fair bit of lag when executed (from my little knowledge, supposedly this is due to GM having to create a new texture page and this takes a fair bit of time). I have been researching and trying to come up...
  11. FeetUpGaming

    HTML5 view_surface_id does nothing

    I've been stuck with this for a while. I'm setting the view_surface_id to a surface being checked to exist each step in pre draw but when drawing to the any layer (post draw, gui begin, gui end) it draws nothing. I've tried drawing it to 0, 0, 512, 512, viewx, viewy and just nothing happens...
  12. RadarTruck

    SOLVED Blendmodes bug when using application_surface

    First of all, please believe that I have fully understood the Guide To Using Blendmodes in F1, I understand that the way alpha blends is counter-intuitive, but it is not relevant to the problem I am having. Consider these two blend modes: //A gpu_set_blendmode_ext_sepalpha(bm_src_alpha...
  13. R

    SOLVED Surface usage problem

    Hi guys, I need help solving a problem with my surfaces. Well, I was doing some tests on my project to find possible bugs, and I ended up finding one on my surface. Basically I use 2 surfaces: one for the pause menu and one for the lighting effect, and here comes the problem. The pause menu...
  14. UEG_Productions

    SOLVED Surface errors?

    I am using a blood engine that uses a surface. When the window is resized, the game crashes whenever blood appears. The blood surface variable is defined by a game object which is present in every room. Is there a fix for this? Any help is greatly appreciated!
  15. Tangerine

    GML Drawing inside a surface stutter with smooth camera

    Hello! I'm trying to draw tilemaps inside a surface because I want to apply a shader to that surface in a future. My problem is that everything I draw inside that is relative to the camera's position doesn't move smoothly and starts jittering. My game is in low resolution (428x240) and my...
  16. M

    Scaling a Surface within a 2nd Surface

    I have my application surface scaled up by 4x so that rotated sprites have smoother edges. It works great for the whole screen. My issue is creating Sprite overlay surfaces for drawing an overlay sprite on top of a base sprite. The edges are fine until the base sprite is rotated. Once the base...
  17. Sbooc

    Surfaces Getting Drawn, Even Though I Don’t

    Hello, everyone! Usually I just read here to fix problems in my code. But now the time has come: I have a problem that I can not solve myself. šŸ˜­ I want to draw sprites in my room. However, these sprites should overlap each other in some cases. The recessive sprite is intended to get replaced by...
  18. D

    Weird issues with surfaces on Windows 10

    I guess to explain the weirdness, I need to explain how I'm using the surfaces So the issues I'm having isn't with my code but is with GMS2 itself. My code works exactly how I want it to. I can resize the game window, toggle full-screen, and run on Android with auto-rotate. It all works...
  19. KyleRansford

    How to do a Simple Fog of War in a Cave?

    How can I make it where when the player is in a cave, there is a circle around them as a cut out in a black cave? I don't think I want to use a tileset, since I would like the circle to be mostly round on the player. Using a Surface might work, but I don't know how to do it.
  20. S

    GameMaker layer_script_end not executed due to event_type=/=0

    Hi all, I have a tile layer in my room that I want to use as a surface together with other layers in a shader. In the object that sets the shader in the draw event, I have this in the create event to transfer the tile layer to a surface: SurfaceTileLayer = layer_get_id("LightingLayer")...
Top