• 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. FrancisClase

    HTML5 javascript native drawing functions on a GML surface

    Is there a way to use the native javascript drawing functions in a GML surface? I am creating an on-screen drawing game and I would like to be able to use the native javascript functions to draw, since the stroke and performance are perfect ... if I had to implement a drawing algorithm with...
  2. Vidinu

    GMS 2 [SOLVED] Problem with particles into a surface

    Hi Game Maker community! I trying to draw particles in a new surface with other sprites/elements but even with the same code they looks different than in the application surface. In fact, when are drawing in the surface the pixels of the circle below the particles are not been drawn. By...
  3. Joh

    So, do I want high GPU?(shader..surface)

    Hi, started using shaders and I've noticed they lead to High GPU usage. (which I'm fairly sure is by design) I'm using the Xor blur, and it essentially doubles my GPU usage from 25% to 50% First I thought that was bad and I had to fix this, but reading upon it, it seems like its a good thing...
  4. F

    [Solved] Drawing only part of a shadow cast by using a surface

    Hello and thanks for reading, I followed a tutorial of casting shadows made by FriendlyCosmonaut where a single instance of an object called obj_shadows generates a surface and draws shadows of other instances by using with() in its draw event. Without going into too much detail I am having...
  5. J

    GMS 2 Drawing to Surfaces once outside Draw Event

    The official yoyogames documentation for draw_clear_alpha says that it is "only for use in the draw event of an instance (it will not show if used in any other event)". However drawing to a surface one time and then saving it to a sprite required me to do it outside a draw event, which worked...
  6. FoxyOfJungle

    GMS 2 [SOLVED] How to get mouse position relative to surface area?

    The main problem: As you can see in that GIF, I can scale it so that It will always stay 1:1. But I want to zoom in and out, and this is the problem. I will explain next: I created a surface instead of using the Draw GUI event (I need to, because later I'll need to copy that created GUI...
  7. Sozidar

    GMS 2 [Solved] How to reduce the file size of the saved buffer?

    Original png file size is 3.58 kb and file size of the saved buffer is 1088 kb, which is kinda sad. Is there a way around this, or am I doing something wrong? Any help is greatly appreciated :) w = 128; h = 2176; surf = surface_create(w,h); surface_set_target(surf)...
  8. D

    GMS 2 Surface questions

    I read here http://gmc.yoyogames.com/index.php?showtopic=631986 that surfaces should be kept small, but are great for optimization. This was a few years ago, thus I am asking. What is the rule of thumb here? "The English phrase rule of thumb refers to a principle with broad application that is...
  9. Michael Stearns

    GMS 2 Drawing to surface on many objects without reset_surface_target()

    Hey everybody~ I'm trying to do a bit of a strange thing where, explaining briefly, I want to draw a bunch of low res objects on top of a big high res object. It's a single screen game. To accomplish this cleanly, I thought I'd draw all the objects to a surface at low resolution, then in GUI...
  10. SubWolf

    GMS 2 [SOLVED] Tranparent Sprites in Surfaces

    Hello everyone, I'm in trouble dealing with sprites that have some transparent parts. When I draw them in a surface (the surface has a background colour) the transparent part shows what's behind the surface. I'm uploading an image of this problem here. The code is something like this: ->...
  11. RipRoarinBoogerBenis

    Clearing Surfaces

    I followed a somewhat out of date tutorial to build a simple lighting system I intend to expand, but while it works for the most part, the sprite bound to the mouse and the triangle primitives created by the walls leave behind afterimages like a windows 98 error. I've gone through a few forums...
  12. S

    Unbalanced Surface Stack error, but not using surface_set_target anywhere

    Hello, I've been working on a game in GMS 1.4.1804. All of a sudden, I'm getting the error message "Unbalanced surface stack. You MUST use surface_reset_target() for each set." This occurs when the player is being prompted to enter a high score. I tried searching my game for the...
  13. Jihl

    Need a hand with surface and lighting!

    Hey there! I need to apply a lighting effect on my game depending on the players position, the room is very big so I can't draw a black screen on the whole room or it gets laggy. This is the draw event of my obj_lighting_controller var b = 600 var c = 1000 if !surface_exists(lSurf) lSurf...
  14. jobjorgos

    Legacy GM how to create surface only in the area of view[0]?

    I have a shader for all my rooms of the size below: nightCycleSurf = surface_create(8192, 8192); But it causes lag, so how can I make the surface to be just the size of view[0] (which is variable of size and position in the room)? I just copied all the shader data from a youtube tutorial so I...
  15. D

    How to update part of a buffer with part of a surface

    I am new to this forum, so hello to everyone. English is not my native language, so forgive if you sometimes find it strange what I write. I am programming a game where players can modify the level (a sprite) in a way similar to what lemmings (the classic game from 1991) do while they dig. I...
  16. Megax60

    Game closes when trying to draw a surface

    I did a light system some weeks ago, and it worked, now that i changed my pc, game closes when i try to draw a surface, it doesn't even give a error log
  17. Le Slo

    GMS 2 Anti aliasing with the wrong color

    Hi! After a couple of years coding with game maker, I usually end up having issues with the drawing part, getting blurry edges with the wrong color or how to deal with anti aliasing in general. During that time I learned a lot of little things on how to draw properly (rounding positions...
  18. Edwin

    Custom room speed for specific surfaces?

    Hello, dear GameMakers! I am looking for something like custom room speed for example for GUI layer (Draw GUI surface). I am making a visualization and I need to make a increasing the speed of this simulation and don't changing the room speed for other surfaces. Any ideas?
  19. B

    GML Problem with drawing layers in the "Draw End" event

    Hi ! The problem i have is that drawing the application surface or any surface for that matter in the Draw End event results in just a black screen. Everything that is drawn in the Draw GUI event still shows up though. Drawing regular sprites in Draw End works fine too. I just use this...
  20. D

    Android Unusual problem when drawing on a surface

    So I was testing a way of making a floor for my game that uses a For statement in a created surface. It's basically for making lots of tiles and then making a fade effect on all of them at the same time, something like this: The size of the room is 2560x1440 and the important part of the code...
Top