tile

  1. Q

    2D Tile Collision help

    So I'm making a game where the player needs to collide with walls and stuff, right? I watched every tutorial online, but there are none that show what i want (a player that can collide with tiles using his bounding box) So I came up with this code, and the X dimension collisions work most of...
  2. Kezarus

    Autotiling by Code

    Good day to you! I did an autotile code but the end result is ugly AF. The pieces are on the right spot, btw. Here is the code: ///@definition bitmask_cell ///@param wx - coord x ///@param wy - coord y var wx = argument[0]; var wy = argument[1]; var cellSize = global.cellSize; var myTile =...
  3. Axl Trauts

    SOLVED Collision on tiled objects?

    Hi I have a flammable set of objects (children of parent par_flammable) that when they collide with an ignitier (i.e. a fire object) they start to burn and set a fire variable to 1. I also have a check that when a "fire = 1" flammable object collides with a "fire = 0" flammable object, it turns...
  4. P

    GMS 2 Auto Tile Path Maker

    I will be short cause I am almost sure this code should already exist but I can't just find it using google. So I need logic to make Computer count the shortest path from 1 tile to other including the diagonal movement and tile-based collisions.
  5. H

    GMS 2 Tiling Rectangles

    Pretty simple question, which I don't believe has a simple answer: How can I set tiles (using GML) in a given rectangle shape? Something like tilemap_set: tilemap_set_rectangle(tilemap_element_id,tiledata,cell_x1,cell_y1,cell_x2,cell_y2) I feel like something like this would be rather useful.
  6. C

    GMS 2 Problem with Tile collision when using speed + direction for movement.

    hi Gamemakers, Im having some real trouble with tile collision detection, I am using the Shaun Spalding Tile Collision tutorial and trying to addapt it for my own game (which is a little different from the game Shaun was working on). Basically my players Direction is determined by the...
  7. Cofefe

    GMS 2 Determining the Specific Tile From a Tileset

    So, suppose you were working on a tile collision engine. If you have a tileset with three tiles in it, is there a way you could use tilemap_get_at_pixel() to determine which specific tile from within that tileset it is at that pixel? I tried something with & tile_index_mask, but it didn't work...
  8. O

    GMS 2 Sending a map via internet.

    Lately I've been dabbling a bit in multiplayer coding and now I've come to a point where I'd like to have some help. The basic idea is that I generate a random map of 1024x1024 destroyable tiles. Now what I'm wondering is how to transfer this map to the players. The option that makes most sense...
  9. G

    Legacy GM Move collision problem

    Hi I create collision map by this code: global.mapsize=floor(room_width/32)*floor(room_height/32); for( yy=0;yy<room_height;yy+=32) { s=""; for( xx=0;xx<room_width;xx+=32) { i = (xx/32)+((yy/32)*(room_width/32)); global.map[i]=-1; t =...
  10. Suzaku

    GMS 2 Working with tile collisions

    Well Im starting to put my tilesets on my gamemaker project(2d platform game) but now I wonder how people actually deal with those tile colisions as they need to be an object for that purpose I think. I think about using the good and old "invisible scaled object" on a separated layer, but I want...
  11. C

    GML [SOLVED] Deactivate tiles not in camera view.

    Good evening guys and girls, Im having some issues trying to figure out how to Deactivate tiles outside of the camera View, I basically have a tiling object that draws in random tiles to the whole room (which is 20000x20000) this is basically killing the memory usage of the game So I was...
  12. S

    Game Mechanics what's the relation of the sprite size with the tile size?

    Hi, I've been new to this journey of making games. But in some tutorials on the internet I've heard some people talk superficially about this topic, when they always have their player sprite in the same size as their tiles. Is there any specific reason for that? Can I make a diferent size...
  13. 2

    GMS 2 Mirrior,Flip, Rotate All Tiles in Tilemap in Code

    Say I want to be able mirrior, flip, and rotate all the tiles in a tilemap (in game not in room editor). Also to be able to do one, some, or all of these operations, and turn all these off too. What's the best way to do this?
  14. M

    GMS 2 Create Object on a (matching) tile

    Hi - I am trying to create an object where a tile/tileset has been placed. I have a background layer, which I am building with tilesets, which will not change or be interacted with. But I need an identical layer above it made up of objects. Simplified, something like: If tileset at (x,y) =...
  15. Doulos

    GMS 2 Surface questions

    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...
  16. J

    Windows Tilemaps

    Hello, I have a huge tilemap, unfortunately, I have to add a completely new column to the tilemap, my question is, how can I add a new column to my tileset wideout completely destroying an entire room?
  17. zampa

    GML Opinion on my line tile collision function

    So i wanted to create a function that checks for tiles using a line, i came up with this: /// @function tile_line_collision(x1,y1,x2,y2,tilemap_id) /// @description checks for collision with a tilemap using a line /// @description it returns true if it finds some collision with assigned tilemap...
  18. 2

    GMS 2 Copy Each Tile in Tilemaps and Produce Copy Maps Later

    I need to collect data on what each tile is in tilemaps in order to remake the tilemaps later and perform a few operations on them. I also need to do this for how many ever tilemaps are in a room. Given that I have the data on which tilemaps exist in the room how do I store what each tile is...
  19. B

    Tile Help!

    So I was wondering if it is possible to take a specific tile in a tile set and have it be drawn at a speific point, through code not hand drawn. Because I have made a random map generator from perlin noise and want to set in game chuncks to a specific sprite.
  20. 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...
Top