draw

  1. S

    (GM 8.1) Big sprite stretching for no apparent reason

    Hello everyone, once again I am presented with a weird problem with my project. I have a somewhat large sprite (6507x698) to represent a race-track. But when I test it, the sprite's right side stretches horizontally until it reaches 6507 of width. This is so weird because the left side is fine...
  2. Tuna

    Legacy GM Sprite Management Help [SOLVED]

    Hello, I am trying to figure out the best way to program clothing sprites into my game. I would like help deciding what method would be easiest and how i can do this without slowing down my game a lot. Where I am at: So i have a 2d player object that switches between around 10 different...
  3. G

    draw_sprite_ext -> stop overlapping

    Hello everyone :) I am new to GM Studio 2 and I have a problem with the draw_sprite_ext command I am drawing two sprites with this command: draw_sprite_ext(shadow_block,image_index,x+32,y+1,image_xscale,image_yscale,0,c_black,.4); but when these meet each other they overlap and it looks like...
  4. P

    GameMaker [SOLVED] draw_line function not working

    I'm trying to make a paintbrush that draws when the left mouse button is held down, and clears when it is released. However, the draw_line function isn't drawing anything to the screen. This is the code in the Draw event: if (surface_exists(surf)) { draw_surface(surf, 0, 0); } else {...
  5. M

    GameMaker Large amount of tiles need to disable tiles outside of view

    I can't find a way to do this. I quite literally make the entire static game room out of tiles and grid data. if I increase the size of this past 1024x1024 by anything more then around 400, my draw step goes up at least 80% cause massive lag. the only reasonable way to get both the larger...
  6. Tuna

    Legacy GM Sprite drawing flashing issue [SOLVED]

    I have been trying for a while now to draw a melee weapon on my character, but whenever I have its position change throughout an animation, the weapon sprite flashes, sometimes for multiple frames. As you can see in this recording, the sprite is normal when being drawn as a single frame...
  7. C

    Legacy GM Sprite blank space causes border in blendmode

    I do a lot of research at blendmode and shader these days, and I'm very glad to solve many problems, but there's a thing still not work fine. If a mask is not full of image(I mean there's some empty space around it), then I will get some image with border finally, and the border is just same as...
  8. B

    GameMaker How to delete "Sprites Drawn with For() Functions"?

    So I'm trying to make a visible ammo counter in my game for some weaponry in my game. The Ammo, supposedly is drawn by a For() function, drawn every 20 pixels until the number of ammo sprites reach the maximum capacity of the gun. However, I want it to be whenever I shoot, the rightmost ammo...
  9. V

    Something's wrong with numbers

    Hello, I'm trying to make something like scoreboard for character(maximum of four), scores add up depending on the order of pushed button. So when I'm trying to add 80 for example, it adds 200, 60 - 120, 40 - 60, 20 - 20. I used this switch case over here: switch...
  10. T

    Windows bug with draw event

    I wanted to make a display of HP bars only in combat. In the beginning HP bar are not visible, but it appear during the attack. But in the game on the very first enemy in the room the draw code does not work. His HP bar is always visible. And other manipulations with draw alpha also dont work...
  11. P

    GML Parent object drawing

    Hello, So i am making a game were i want to have states something like hearts of iron 4 and europa universalis 4. So i drew 2 different objects with different sprites and made a parrent object for them. What they are supposed to do is glow (i just made the image a bit yellower) when i press...
  12. E

    Legacy GM [SOLVED] draw_set... are performing for another objects

    Hello, comrades. I have a problem that I can't solve: When I set a font/colour/alpha and other stuff for my sprites or fonts in one objects Draw Event when I draw something in another object it shows the same properties that I just set. I know that I can use functions like draw_sprite_ext or...
  13. E

    GML How to draw a sprite inside the another sprite without going beyond its borders?

    For example: I have 2 sprites: 1) spr_image is a photo of some guy. 2) spr_circle is just a black circle. I need to draw spr_image inside the spr_circle and don't let spr_image going beyond spr_circle's borders. I've created projection of what I want in Adobe Photoshop and got this: First...
  14. Dr_Nomz

    GML [SOLVED] Can infinite sprites cause lag? (changing opacity)

    So I have a code that changes one objects sprite from normal, to transparent. Thing is, is it drawing a NEW sprite every time the code is activated? Or does it delete the first sprite? OR does it just change the current one, instead of drawing a new one? Draw event: if alpha = true{...
  15. Dr_Nomz

    GML How do I make this button work?

    So I have a working button from an inventory tutorial I saw, but when I tried to make a custom one it didn't work. ///Draw event\\\ var click = mouse_check_button_pressed(mb_left); var x1,x2,y1,y2; x1 = view_xview[0]; x2 = x1 + view_wview[0]; y1 = view_yview[0]; y2 = y1 + 104...
  16. MartinK12

    GML [SOLVED] General question - Should I split code between step and draw event?

    Many times I have to change variables and sprites according to some other variable. In example: if clicked { var1 = 1; var2 = 2; draw_sprite... image_index... image_speed.. } Should I split this into step and draw event like below so check clicked both in step and draw event? In step event: if...
  17. R

    Legacy GM A quick question of the efficiency of primatives?

    Hi Everyone! I was wondering if anyone had any insight into the efficiency / resource intensiveness of primitives? My current project involves drawing quite a few in various ways, alongside some other processes, so I'm just beginning to consider ways to keep my project streamlined to...
  18. Vishnya

    Asset - Scripts ATEXT - asset for drawing rich text!

    If you want to draw text with different colours, fonts, images and effects - this asset for you! Easy to write: text="<shadow>Hello</shadow>, this is GAME" Easy to customize tags: text="<shadow: x=4, y=8>Shadow is big" Use variables or scripts in tags: text[0]="<shadow...
  19. X

    Legacy GM Image Blending

    I'm wanting to use image_blend to tint an object. I have this working for one object but a different object is giving me trouble. I read on a different thread that putting code in the draw event can mess with image_blend, but I don't know what code specifically is the problem. Also, the...
  20. V

    Drawing shapes and text acting weird

    GMS2 I'm working on a thing and my draw event is not working right. I tried to draw a triangle but it does not work right. draw_triangle(ppx,ppy,mouse_x,mouse_y,mouse_x,ppy,true) //pp = player point And i tried to draw some text too and it cut out some parts of the words making it look bad...
Top