surface

  1. zendraw

    GMS 2 draw surface over sprite

    i want to draw a surface over a sprite in a way that the sprite`s alphas are applied to the surface so the surface is like cut based on the sprite. i have some code from before that doesnt work now for some reason. draw_self(); if (surface_exists(surf)) { draw_surface_ext(surf...
  2. BELLER Lab

    GMS 2 Android Devices shader surface_copy problem

    Hi ! I'm trying to use a black hole shader that I found online (Made by flyingsaucerinvasion) on Android Device, the shader code is pretty simple (I just modified it to do a simple Alpha Transition) but the problem come from the Draw Event of the Black Hole : if(!surface_exists(surf)) surf =...
  3. H

    Struggling with "Surfaces" . ( GONNA FREAK OUT )

    I was working on a "digital design software" project on GMS2 and it requires a surface system as a matter of course but after a few failure in this project i've decided to create a brand new document and try learning how "Surfaces" actually work . i have a default room and an object in this new...
  4. JeanSwamp

    Unusual use of app surface GMS2

    Hello Game Makers, I am trying to do something with surfaces and I am not entirely sure how to make it work, specially due to distorsion problems. Basically I need to capture the whole screen into a surface, resize it and flip it a bit so the surface becomes displayed like such (Green being...
  5. mbeytekin

    SOLVED Sending a surface or buffer to a C++ DLL and getting processed image from it to a surface or buffer back

    I'm trying to send a surface to dll and process it in DLL, and after this get this processed image back. I tried send surface as buffer (argument as double) but it's not working. My mean goal is using opencv library in C++. Anyone can help please ?
  6. William Garrison

    GMS 2 Lights Cutting into eachother

    I just followed a tutorial on lights and finally got one that works with my system and current GMS. Great BYT for some reason my lights are cutting into each other. The gentleman in the video doesn't seem to have that issue as far as I can tell. I have double checked the code and cant find...
  7. witches

    SOLVED Dynamic Outline Shader from Surface

    Hey all. So I'm working on an outline method where I sample a surface texture of a couple of sprites and send that through a basic outline shader and basically clear and repeat. So far it works well, but there's a tiny outline of my sprites being created even when they're both being drawn onto...
  8. M

    Drawn shadows overlapping issue

    So in my top-down viewed game, I have cloud shadows (transparent sprites) that occasionally fly over the levels. They overlap tho, causing the overlapping section to go dark, and it looks bad. I tried learning to use Surfaces to overcome this issue..... but honestly i dont have much clue how to...
  9. Slothagami

    SOLVED Custom Shadow Color?

    I have been battling with the shadows in my games for quite a while now and can't seem to do this myself, I want to have shadows for each object, in the shape of their object, and using a different color based on the color behind the shadow (to fit with the color palette) I am very new to...
  10. MeltingCat

    GMS 2 Understanding the error 'Invalid surface dimensions'

    I have gotten this error 'Invalid surface dimensions' after using surface_resize in a room start event. The error occurs only sometimes - I can't quite figure out a pattern behind it and would like to know more what invalid surface dimensions might be. A google search brings nothing but one...
  11. JeanSwamp

    Apply Shader to everything within a sprite_width && sprite_height area

    Hello, I am trying to make some underwater effect in a sidescrolling game. Applying a fullscreen shader to create an underwater effect is pretty easy, but when you have in the same screen both water and terrain, this might get tricky. Basically I need to apply the shader to everything that the...
  12. duran can

    GMS 2 How can I draw an object only on the surface?

    I am a former game maker user, so I forgot too many techniques in gml. I want to draw an object only in the surface. But that object should be drawn with the entire draw event. Because if the object has draw_text in the draw event, I want it to be drawn. When I remove the draw event of the...
  13. zendraw

    SOLVED drawing to surfaces

    can i set any number of surfaces to draw to before i reset? or do i have to constantly reset after each set? surface_set_target(surf1); surface_set_target(surf2); surface_set_target(surf3); surface_reset_target();
  14. N

    SOLVED Surface with shaders displaying blank window

    Greetings developers! Recently I was playing with surfaces and shaders and I've managed to create (by following some tutorials) a simple lighting system with some shaders. It worked perfectly on my demo project but when I tried to apply it to my main project it didnt work at all... I don't...
  15. Adry

    Newb question: How to draw onto a surface?

    Hi! I'm trying to understand surfaces, not the application_surface, but rather an individual surface that I can manipulate.. This is probably a beginner question, but, as the title suggests, how do I draw onto a surface? More specifically, how do I draw my Layer background sprite onto its own...
  16. Mortalo

    HTML5 Bug with surface_reset_target in Draw GUI?

    So, I'm converting my game from windows to html5. I knew that there would be some changes needed, but I was not expecting that I will have to forget about any surface use in the GUI layer. TL;DR: In Draw GUI events, surface_reset_target makes drawing on the GUI layer to not work properly. Let...
  17. brice_platinum

    GML Sprite fade transitions using surfaces

    Hello everybody, I'm trying to make a simple fade effect between two sprites and i got in to a problem. This is what I am expecting to get I created 2 sprites with the pictures and a simple background with a blue dot in the middle. Now what I want is the first image starts to fade away at the...
  18. Daniel Mallett

    GMS 2 sufaces from other objects

    I have the following code under the draw event of an object. This creates a surface then pops some bits inside it. This code works fine. My problem is I want to draw things inside the surface from another object. I assumed I could prefix obj_differentobject. followed by the surface name. However...
  19. M

    Pausing the game doesn't draw the paused game background

    I'm using the following code to pause the game, it works fine and all, but the one quirk i cant seem to fix is that the while pausing the game takes a screenshot of the screen, it doesnt draw that screenshot to the screen while paused (i want the paused game's background to show behind the...
  20. Tthecreator

    Legacy GM GM drawing acting in unexplainable ways

    Hi there! I was working on my UI asset and came across a weird bug I just cannot wrap my head around. I was making a function called draw_square_rounded_colour, which is a combination of draw_rectangle_colour and draw_roundrect. (draw_roundrect_colour only has 2 colors instead of 4). I...
Top