ds_grid

  1. J

    Legacy GM DS Grid Based AI [Solved]

    I have been working on a procedurally generated dungeon crawler for the last 2 months, it works quite well apart from the AI. The game is based around a DS Grid which the enemies use to navigate by getting the direction to the player and moving to one of the 8 surrounding cells, the only problem...
  2. T

    Memory leak (ds_grid, ds_list)

    // Create chunk grid global.chunk_grid = ds_grid_create(global.grid_width, global.grid_height); ds_grid_clear(global.chunk_grid, noone); // Create loader grid global.loader_list = ds_list_create(); ds_list_clear(global.loader_list); // Destroy ds_grid and ds_list...
  3. I

    Why inst it spawning on the Floor tile?

    https://gyazo.com/5119f09444a0bdfc420cfff92082cbbc As you can see in this image im trying to spawn a chest randomly 5 times on the floor around the map. It spawns everywhere but the floor and i cant limit it to 5 per map generation.
  4. B

    Best way to store 2 variables in a ds_grid cell

    Hi there, I need to think of a way to store 2 different variable in 1 ds_grid cell, specifically i need to store a string and an integer, just unsure what would be the best way to do this!
  5. Let's Clone

    HTML5 DS_Grid... freezes upon read/write.

    Forum, I need your guidance! All I am trying to do is to read/write from/to an .ini file. Keep in mind that this is working flawlessly while running in Windows. /// Save the room if (keyboard_check_pressed(ord('S'))){ ini_open(working_directory+"Save.ini"); var key = get_string("Save...
  6. T

    3D Array workaround

    I'm currently storing stars in 2D arrays. Star[star_index, 0] // X pos of a star Star[star_index, 1] // Y pos of a star Star[star_index, 2] // Color of a star Each array cointains 64-512 stars. I can't have star array for every chunk in my game. All chunks also can't have only 1 star array...
  7. M

    Legacy GM Wrong sprites and text drawing on surface

    I'm trying to draw a character and stats associated with it as an overlap of custom features that are separate sprites. Those sprites each have different colored images whose index is stored in a grid. Each column corresponds to a different character and each row value is the image index for...
  8. M

    Legacy GM Snapping projectile to nearest empty slot in a ds_grid

    I'm currently making a Bubble Shooter game. The room is set up with a ds_grid: global.grid = ds_grid_create(20, 15); I'm trying to get the bubbles I shoot to snap to the nearest empty slot in the ds_grid. The bubble needs to land, then I need to detect which slot is closest to its x and y...
  9. R

    Legacy GM DS_Map stored in a DS_Grid

    Okay I'm sure I've missed this in the Docs, but how does one get a value from a ds_map stored in a ds_grid? I understand how to create the grid with the map items however for the life of me I can't figure out how to read the map. ie an 8x8 grid with a map of items "Sprite" = "spr_name"...
Top