1. flyinian

    What are the ways to resize sprites

    I would like to give an instance a specific width and height while keeping it intact. I currently know of image x/y scale and 9 slice. scaling a sprite up will cause unevenness within the sprite. I am currently using 9 slice for the width and height of the sprite. This works fine as far as I...
  2. Daniel Mallett

    GMS 2 text border issues

    x = 500; y = 500; string_val = "string"; draw_text(x, y, string_val); width = string_width(string_val); height = string_height(string_val); draw_rectangle(x, y, x + width, y + height, 1); I am trying to implement a dialogue with form controls, text, etc. I have been having problems...
  3. 2

    GMS 2 Find How Many Tiles in a Tileset

    How do you find how many tiles horizontally, vertically, and over all are in a tileset? I want to add 1 to the tile index of tiles in a tilemap every few frames until I reach the last tile in the tileset, then set the tile index to 1 and start over. How do I get this info from the tileset?
  4. 2

    GMS 2 Find Tile Layer's Width and Height

    Is there any way to find the width, and height of a tile layer. Width meaning the x of the first tile in the left direction to the x of the last tile + the tile's width in the right direction. Height meaning the y of the first tile in the up direction to the y of the last tile + the tile's...
  5. PartTimeCrazy

    GMS 2 How to make this camera code work for iPad?

    So i've used the camera tutorial that is part of gamemaker and I *think* I understand it but i may be missing something. This is the code I have set up: theWidth = 812; theHeight = 375; view_enabled = true; view_visible[0] = true; view_xport[0] = 0; view_yport[0] = 0; view_wport[0] =...
  6. PlayerOne

    GMS 2 [SOLVED] Getting a bbox width or height?

    Trying to find the bbox_width and bbox_height due to my project requiring different masks (ducking, running, etc).
  7. Appsurd

    Asset - Scripts draw_text_properly

    Introduction Appsurd presents a simple but useful script for GMS 2.3+ which scales your text in case it does not fit on a line any more. Works comparable to draw_text_ext but does not add line-breaks, but instead draws the text in a smaller font. Of course the script is well-commented and you...
  8. 3

    How to get number of cells of a tile set?

    I want to get the width and height of the cells of a tile set. But I am always getting 16 and 12 which are incorrect. What I do. First I create a new Tile Layer in the Room Editor and name it "test" and add a tileset. then in my object_background I use this code in the create event: var...
  9. D

    Best Width and Height for Rooms

    I was curious what the best width and height would be for a standard, non-moving room would be to fit most computers nowadays. Where, if they scale up or down, the game will not lose definition. I am still new to Gamemaker, so I appreciate your time. (I don't know if it matters, but I am using...
  10. Silversea

    Legacy GM "string_width" calculating wrong value?

    Perhaps someone with more experience could explain what is happening here, and how to correct it. I'm assuming it has something to do with spacing of the characters in the font not matching with the actual draw length. The actual draw width of this text is 153 pixels, but the game says it is...
  11. Shadowblitz16

    GMS 2 get tileset width and height?

    does anybody know how to get a tilesets size? I need it for getting the length of the tileset
  12. jb skaggs

    GMS 2 ds_grid size (w,h) is that actually (r,c)?

    Also in the manual it says: ind=ds_grid_create(w,h) but it seems w seems to be the number of rows and h seems to be the number of columns when I try and use it. Am I misunderstanding? JB
  13. R

    How can I get a sprite subimage width inside draw_sprite_ext(for a better centered X positio[SOLVED]

    for(i = 0; i < array_length_1d(menu); i += 1) { if(i == selection) { draw_sprite_ext( spr_startmenu, 0+i, room_width/2-(sprite_get_width(spr_startmenu)/2), 75+(i*space),1 ,1 , 0, kleur,1); } else { draw_sprite_ext( spr_startmenu, 0+i...
  14. Ayziak

    GMS 2 [Solved] Need to find a way to get the real view width/height...

    Hey all, My game window is resizable, and set to keep its aspect ratio, so if I manually drag it to a certain size, it will have black bars on either side or the top and bottom. I need a way to get the value of the height of the window, but excluding the black bars. Basically, is there any...
  15. O

    Is there a faster way to draw a thick line, when using draw_path();?

    Hi! I want to draw a thick line as a path. Right now I'm using the following code. Is there any way to optimize this? I think it's making my game lag to draw this many paths, and it also looks bad. // Draw line draw_set_color(c_red); draw_path(ip, ix, iy, false); draw_path(ip, ix+.25, iy...
  16. I

    view stops following object after room limit

    I'm changing the room width in-game, and thus, the view does not follow the object after the original width (it slows down allowing the object to move outside of the view boundary) example : original room_width = 1440, when I run the game and move right, the room width is increased, but when i...