draw

  1. JacobSyndeo

    SOLVED Add "3D" Perspective/Depth to 2D Platformer

    Hey, I'm making a sidescrolling 2D platformer similar to what you would find on a Game Boy Color or GBA. I'm pretty new to GameMaker and game development in general, but I have about a decade of experience with mobile app development and general software engineering. Progress has been going...
  2. SirCaliber

    GMS 2.3+ draw_sprite lagging behind 1 frame

    Hey guys! So I've got a bit of a problem - when using draw_sprite, the player object is drawn first, then the glasses sprite in draw_sprite is being drawn on top of it, which is intended. However, the problem is that the glasses sprite is being drawn 1 frame after the object is being drawn. I'm...
  3. C

    Pixel Perfect and "Pixel Snapped" GUI

    Hi guys, I need to make my GUI layer "pixel-perfect", and found no clue around here.. The blue cube is being drawn in the "Draw GUI" event The white cube is being drawn in the "Draw" event //I want the blue cube to behavior like the white one while rotating. //But found nothing like this for...
  4. S

    GMS 2 Hightlighting mouse over text

    I'm going to have a lot of text based menus in the game I'm making, and I'm trying to make it so that when I mouse over clickable text it highlights in a different color. I have an object that draws text to the screen and is supposed to highlight when you mouse over it. I also have another...
  5. B

    GMS 2 Scripts drawing surfaces, memory leak.

    So originally I've got 16 sets of this code block messily creating a surface each all within a single draw event; since they're all similar blocks I decided to figure out scripts and tidy it up since the variables are easy enough. I translated it directly into a script with no changes in logic...
  6. D

    Calculate Tile Size?

    So I'm trying to make a map that loops horizontally, but not vertically; this was easy enough. My code goes through and reads each cell of a ds grid and draws a different colour pixel on the screen depending on what value it holds. I have a "zoom" variable that is somewhere between 1 and 0, then...
  7. b-wb

    Debug Profiler shows DrawTheRoom being called twice-- what would I have done to make that happen?

    Hello everyone I'm working right now on trying to optimize my game and looking at performance hogs. Strangely, it looks like in the debug profiler "DrawTheRoom" and everything that falls in it is happening twice. Rather than launching into an explanation of my game's graphical code, I am...
  8. A

    Android [Optimization] drawing text using draw_sprite instead of draw_text?

    Hi. Not sure if this is already posted in forums or a similar thread exist but I tried looking and there was no exact thread similar to this. Anyway, I would like to know your insights and experiences regarding this topic. Have you tried to draw or display texts, words (messages, pop-up...
  9. Storm1208

    GMS 2.3+ [Solved] Grid Generation Code Not Printing All Lines

    Hey all! I've been working on some grid creation code and I ran into an issue with it last night. I've been trying to fix it for the past day but I haven't had any luck. The code is supposed to generate a 5x8 size grid within the screen (not based on the room's height and width, but within a...
  10. sivispacem

    SOLVED Draw Instance Score - prints double (overlapping) text

    ---If you duplicated your room, ensure you do not have more than one persistent object placed in more than one room.--- Thank you to @TheouAegis, @Slow Fingers for the assistance. As the title suggests, I have been following the "Space Rocks" tutorial and all parts of the game work as the...
  11. J

    Instance creation not working

    Hi there, long time user and lurker of GM. I'm currently having a problem with instance creation, none of the instance functions seem to draw to screen despite being in the draw method. Here is my simple test code, which does not draw: create_instance_depth(room_width, room_height, 10000...
  12. G

    Sleep Margin on Linux?

    Currently trying to make a headless dedicated server with GMS2 running on an AWS linux machine. I need it to perform GameMaker's collision functions to make the server more authorative (replicating these functions are incredibly difficult in other languages/engines). I'm very close, I've...
  13. flyinian

    SOLVED How would I get a instance to pass its draw code to a parent and then have that parent send said draw code to all its children?

    I have 1 parent w/ multiple children. I then have one object(obj_DrawCode) that is passing its draw code to the parent. My problem that I am having is that only one child is receiving the draw code. I checked the debugger and it says only one sprite is being drawn. I am trying to draw a...
  14. flyinian

    SOLVED What would cause a sprite to animate at room speed(or really fast) when its coded to draw in the draw event?

    Newest: So, I just tested the code in another object's draw code and still had it animating really fast. I then added the "image_speed" in the create event and set it to 0.1 . This slowed it down and it appears to animate at desired speed. Could someone explain this to me? As well as, how to...
  15. X

    GMS 2.3+ Drawing a circle gradually

    How can I draw a circle outline so that it looks like the circle is being drawn rather than just appearing drawn I currently have this draw_circle(x, y, 28, true); which draws it in one go but I want to show it being drawn pixel by pixel so it looks like it was drawn by hand
  16. jobjorgos

    SOLVED how to draw_sprite from sprite index number?

    function scrItemHover(argument0) { icon = argument0; //this is the sprite name, something like spr_wooden_sword or spr_iron_dagger draw_sprite(icon,0,mouse_x,mouse_y); } ERROR: draw_sprite argument 0 incorrect type (string) expecting a Number (YYGI32) In GM1.4 this worked fine to...
  17. The_Scientist___

    draw_rectangle() Problems with Transparency

    I'm trying to make a textbox that appears when the mouse hovers over the object, and I'm drawing a rectangle as a backdrop for it. However, if the object is far enough to the right, I want to make it draw in the opposite direction, but when I do, it turns semi-transparent and draws behind other...
  18. K

    Drawing Sprites while game is paused

    Ok, basically. To pause the game i'm making I use the code: if(keyboard_check_pressed(ord("P"))){instance_create(0,0,Pause)} And then, in the create action on Pause instance_deactivate_all(true) But when I do this, every instance Just stops being drawn. How can I pause the game, and still...
  19. Strakee

    Drawing on specific layer only

    Right now I have a blood drawing mechanic that draws on a simple area surface. It works like this: An object is created and as it flies it draws itself repeatedly on the surface like a brush. The goal is to make it not draw itself on the background. (The blue part in the image is a background...
  20. N

    SOLVED Sprite draw order depending on y variable?

    Hello I'm doing a top down rpg and while the characters' collisions are 16x16, the sprites are 16x24 Basically this means that characters or objects should appear layered in front of the ones above and behind the ones below at all times, but I don't know how to do that because objects seem to be...
Top