1. 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 ?
  2. 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...
  3. 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...
  4. 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...
  5. 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...
  6. 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...
  7. 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...
  8. 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...
  9. 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();
  10. 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...
  11. 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...
  12. 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...
  13. 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...
  14. 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...
  15. 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...
  16. 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...
  17. Daniel Mallett

    GMS 2 Surfaces

    I am in the process of migrating some of my code from the application surface to 'an actual' surface. I have had no problems up until now. I want to resize my surface using the surface resize function. After doing this I get the width with the get surface width function and it reports...
  18. Tiago Carvalho

    How to make a printscreen from surface and sprite

    Good day, GameMakerz. I have been facing some troubles creating a printscreen system on an app I am creating. I am using a surface to have things drawn on the screen by the player (painting area) and I have a sprite drawn by the program on top of that surface. My issue is that I am not able...
  19. CodeManu

    GMS 2 Save surface with the "correct" alpha blending

    Hey all! I've been trying to export an surface (via surface_save method) into a .png, but due to how alpha blending works on surfaces it gets tinted (towards black as I'm using draw_clear_alpha(c_black,0) to clear the surface). I know this is the correct behaviour, and that It can be fixed by...
  20. Deadly Serious Media

    GML Area Spawning

    Hey everyone! So I'm working on our third GM game and needed a problem solved. Not sure if I did it right but it works for my purposes. We wanted destructable ground tiles but placing 8x8 px tiles all over the place was a pain. I build this simple object spawner. You place a ground marker in...