Hey! Guest! The 40th (!!!) GMC Jam will take place between February 25th, 12:00 UTC to March 1st 12:00 UTC. Why not join in this very special anniversary jam! Click here to find out more!
[EDIT] I have figured out the problem. It was an issue with x and y relativity, as well as the size of the surface I was using.
Hello all,
I've posted about shadows and light sources before, but now I'm trying to create an object that darkens the area around the player the farther out you get...
I am trying to scale and manually draw my application surface to my fullscreen game window. Ultimately, I am doing this so that I can guarantee I am scaling by an integer when in fullscreen mode, to prevent pixel distortion.
As a test, I am just trying to scale my application_surface by 2 and...
Hello there!,
I am having some difficulties with surfaces when trying to use them as background; first of all, I'd like to use the draw gui event for that instead of the regular draw event.
Then, there are two methods I am considering which are to create a sprite from the application surface...
I'll try to explain what I want to do the best I can.
I've been looking into the function sprite_create_from_surface, so I can save a sprite from whatever is drawn in a certain spot on my screen.
What I need for my design is actually to create this sprite "behind the curtains". The player...
When you draw somthing then draw something else, the last 'draw' code will cause that to be on top. Is there any way to tell the draw functions which layer I intend for it to be drawn regardless of its chronological position as it were?
Hi, so I have a java extension( java code: https://pastebin.com/cpwf5LzT ). It has 1 function and the function have 1 argument that is a String called fname. And it returns a String. The function should get the file from the path of fname and if it's an image file, get it as a Bitmap. then I...
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...
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...
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...
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...
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...
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...
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)...
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...
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...
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:
->...
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...
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...
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...
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...