• 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!

surfaces

  1. FoxyOfJungle

    SOLVED [DISCUSSION] I need opinions (and help) regarding building an interface (views, surfaces, cameras, Draw GUI...)

    Hello ! Look at this interface image: This is an interface. I want to use the DRAW GUI event to draw ALL the interface of the program I'm doing (everything inside it...), however, I need to draw the camera view in this middle area (where is the rabbit). The questions: 1 - How would I do...
  2. Daniel Mallett

    GMS 2.3+ I thought I had the hang of surfaces

    I thought I had this down obviously not. I have the following code. if !surface_exists(game_surface) { game_surface = surface_create(1920, 1080); surface_set_target(game_surface); draw_clear_alpha(c_white, 1); draw_sprite(spr_bat, 0, 0); // NOT a problem...
  3. M

    SOLVED How can I display some objects above a surface and some objects below it?

    I'm wanting to make a fog-of-war that allows the terrain to be seen, but the players, items, bullets, and so on, not be seen unless within LOS of a player. How can I do this? I am not against using a different fog-of-war system though I'd like to avoid doing this as the system I'm using now...
  4. Andymakeer

    GMS 2 Surface blend turns overlapped text black

    Hey guys! So I was playing with surfaces and blend_modes and found out its possible to customize the blending results. I was trying to draw text to an alpha-cleared surface, but the result was kinda ugly. Then, after studying a little, i was able to "ignore" the surface color and alpha blend...
  5. hughrock18

    SOLVED Overlaying 2 or More Sprites

    I COMPLETELY understand the concept of using surfaces (or shaders) to overlay one sprite image on top (or below) another. Is that the only way(s) to do it though? If I want to, for example, overlay a player sprite with an armor sprite (sub images and all), are surfaces/shaders the only ways to...
  6. P

    SOLVED Can I use Drawing Surface Functions in Draw GUI Event???

    Actually the questions lies in the heading, but here is the code that contains problem: //Draw Gui Event //Editor Window Draw9SlicedBox(spr_level_editor_button,0,0,editor_window_width,editor_window_height); //Buttons DrawSetText(editor_font,c_white,fa_middle,fa_center) for(var...
  7. Z

    (SOLVED) Lag issue, but solved ONLY when ALT+ENTER?

    Hi everyone, for a long time I have been fighting lag in my game. The lag did do something good however; I learned to optimize so many things, that the lag was reduced by a ton. I can basically have like 2000 instances running a small (but clever) amount of code and the lag doesn't really...
  8. Archdemon

    Shaders and Surfaces quick question

    So I am making a little platformer with my nephew (trying to get him into programming; he seems to have a liking for it.) And I am using shaders and surfaces within a single room at the moment, but I am noticing that the shader seems to also affect the surface making for some let's just say...
  9. Tony M

    Shaders [SOLVED] Dark outline around sprites introduced when I added a shader and surface to project

    Hi, I have successfully implemented a full screen wave shader that I adapted from here: https://marketplace.yoyogames.com/assets/261/free-shaders The shader itself works quite well, but has unfortunately introduced an issue with my sprites. Sprites with semi transparent edges (anti-aliasing)...
  10. TheCheeseMaster

    GMS 2 Choppy Framerate When Drawing Surfaces

    Hello, I'm trying to figure out how to fix the seemingly lower framerate as well as objects jumping around a tiny bit when surfaces are being drawn. Here's an example: Here's my code: Draw GUI Begin: if(tea_active == true) { /// @description Draw Tea Effect...
  11. Azenris

    GMS 2 surface_free

    Should surface_free still be called even if the surface_exists returns false. Like, is there internal meta data that GM uses and still needs freeing? if ( surface_exists( surface ) ) surface_free( surface ); or just always delete surface_free( surface );
  12. N

    GMS 2 (Surfaces) Lighting for splitscreen

    Hi this is my first forum post. So, I apologize in advance. I need help with figuring out, how to.. uh, make lights.. be lights? I want to make lighting, but only on where both screens see. (It’s splitscreen, two players) I didn’t write this code, it’s from some tutorial somewhere. I just want...
  13. Z

    Minimize/unminize game gives lag...

    Hi everyone. I've been using shaders and surfaces now for a while to come up with all sorts of cool effects. Weather, lighting, fog, day/night cycles,.... However I've run across something that I'm sure a lot of people have already encountered: Lag, specifically lag after I minimize the game...
  14. Weastøne Entertainment

    GMS 2 Creating surfaces on step

    Hello there!, I have a pause system where I copy the application surface whenever the player presses the pause button; I've read that surfaces should not be created outside the draw event; how could I possible achieve this with the creation of my paused surface in the draw event? I though of...
  15. M

    Shaders Shaders and Surfaces. Matching wrong colors?

    I am using the below shader to try and put transparency on the shadows in my room. There are two main problems with it that I cannot figure out. So what I am doing is drawing all instances to one surface, then drawing the light mask on another. Then I draw the light mask on top of the...
  16. X

    Multiple viewports with surfaces/deferred rendering problem

    Hi, I've implemented deferred lighting by drawing on 3 surfaces for diffuse, normals and specular and then merging them with a shader on the application surface.. It's all good until I got to multiple views (for local multiplayer.) This used to work fine before but now I cannot get it to work...
  17. BlueHarrier

    Alpha Feather Engine 3D

    I'm working on a 3D engine for my future project, still working on graphic management. [Updates] +Added spotlights, they don't create shadows. +Upgraded the color shadow and translucid renders quality. /Changed the color of the background, nothing important, but seems more beautiful for...
  18. S

    Legacy GM Surface_save to a sub directory? (SOLVED)

    I have been looking for a while now, and I cant seem to find a way to save surfaces to, or even move a saved surface file to a sub-directory I created. Am I missing something? or the folder creation only for text files? The reason I want this is because upon exiting a room in my current game...
  19. P

    GML SOLVED: Drawing A Surface Onto Another Surface From Another Object

    Hi all, I know it's possible to create a surface in an object and then use the with() function to draw multiple other objects onto that surface whilst it's targeted, and have managed to use this successfully. However, in an attempt to optimise my draw pipeline I was hoping I could do the...
  20. Stonesword games

    GMS 2 Destructible terrain keeps shrinking

    My destructible terrain keeps shrinking to 1/4 its size and goes to the bottom left of where it was originally. Note: I'm a novice and got this code from a tutorial :D Heres the code Create event: HIT = false damage_x = 0; damage_y = 0; Leftclick event: var _mx = mouse_x - x; var _my =...
Top