ds_grid

  1. Bart

    GML Using DS Grids For Calculations

    GM Version: ALL (the code makes use of ds_grid accessors but that is not a requirement) Target Platform: ALL Download: N/A Links: N/A Summary This tutorial series shows how certain calculations can be done using ds_grids. Each tutorial focuses on a specific calculation or algorithm. Tutorial...
  2. Athena's Owl

    GMS 2.3+ Creating objects stored inside of a ds_grid into a large room

    Is there a way to create objects into a room that are stored inside of a ds_grid? Instance_create_layer or depth doesn't like when I try and place a something other than a direct object and gives me an error. I can draw my ds_grid when I have sprites stored in the draw event, but I imagine when...
  3. G

    Grid of Maps Question

    Hi All, I am working on a project that involves populating a ds_grid (jigsaw puzzle) with a number of maps (which contain info about the tabs and slots of the puzzle pieces). Ideally, the grid and map would be initialized, and then nested for loops iterate through the x and y coordinates...
  4. 2

    Leaving Persistent Room: Do Destroy and Room End Events Trigger?

    When the player leaves a persistent room for another (pause menu in my case) does the room end event trigger, or the instance destroy event trigger? These events currently destroy ds_grids in some of my objects, and that would break the room if I return to it (by unpausing)?
  5. C

    I need help sorting a ds_grid

    Hi there guys, iv'e been strugling with a problem for a week now and i could really use some help, for some context im trying to implement field of view using the ray casting method (iv'e adapted a method from roguebasin to gml), everything is working fine except one thing, so i keep a ds_grid...
  6. flyinian

    What are your ways to organize data for saving?

    I am looking for ways to organize data to save. I have a save/load system using JSON files and it appears to work nicely. Now, I am looking for ideas to organize data. I have several "controller" objects that controls parts of my game and done this way for organizational means. Could I place...
  7. Lens

    GMS 2 Need help retrieving (reading) data from ds_grid

    Hello! I'm making a tile-matching game (Tetris). After a piece fall down and collides for a second its' underneath collision rectangle, it creates "Dead tiles" so to say ( gets converted into 4 "dead" objects). //In one of the pieces Triggered alarm if collidedU = 1 { global.Morph = 1...
  8. F

    Legacy GM ds_grid/map functions not working for HTML5 version?

    Hi there. I am using a ds_map in order to store a number of ds_grids. The idea is that groups of objects fill out their own shared grid as you collect them, and when you have collected every object within a group, it uses the grid to create a number of jigsaw pieces, then destroys the ds_grid...
  9. danielpancake

    SOLVED ds_grid median filtering / terrain smothing

    Hello, Game Maker Community! I ran into problem with smooth terrain generation. Initially a had something like on the image below. This terrain was generated with using ds_grid_set_region and ds_grid_set_disk in random positions of ds_grid I should say, that I've tried using Perlin's noise...
  10. danielpancake

    Free gmdungeon - a dungeon template creating asset for GM:S

    gmdungeon is a dungeon template creating asset that can be used in any kind of project requiring dungeon generator. It's easy to use 👆 Download and examples: github Price: Free Installation proccess For GameMaker: Studio 1.4 Drag all scripts from src/scripts folder into your open game maker...
  11. flyinian

    Does it matter what order a grid is created in the create event?

    Instead of going 0,1,2,3,4... Could it be done 2,4,1,0,3? Would this still work? Any where in the grid? any x or y position? ds_grid_add(name,0,1,value); ds_grid_add(name,0,4,value); ds_grid_add(name,0,0,value); ds_grid_add(name,0,3,value); ds_grid_add(name,0,2,value); compared to ...
  12. zendraw

    GML Grid read string from included file

    Is it possible to read a string from an included file? i mean ds_grid_read(grid, includedfile); baring in mind that the string in the included file is saved with ds_grid_write();
  13. M

    Destroy ds_grid / map / list, even if they are local?

    Hi There Just short question. It's not that clear in the GM Help. If i have a local ds_grid like this: var grid = ds_grid_create(...) Do I have to destroy it after use as well? Thanks a lot! kind regards mX273
  14. noorsalim

    SOLVED How to Colorize ds_grid_disk ?

    I'm making a Turn-Based Strategy (TBS for short) game and want to use ds_grid to store data of the grid and manipulate it later. Here is the basic code to create the grid and populate it with oNode objects: ///@desc Create the grid global.grid = ds_grid_create(room_width/GRID_SIZE...
  15. Slothagami

    SOLVED ds_grid_sort with two columns?

    I am making a leaderboard for my game (using networking, GMS:2) and I'm new to ds_grids I want to sort it so that the player with the highest killcount is at the top, and if two or more players have the same score their order is decided by health e.g: player1 has score of 2 and 6 hp player2 has...
  16. Bart

    SOLVED Optimizing terrain z value calculations

    Hi all. The last couple of days I've been working on an optimized way to calculate several z values on a terrain. For this I'm using ds_grids since they give you two free loops that are implicit and incredibly fast. Each instance that needs a z value at a specific (x, y) coordinate gets an...
  17. Hyteel

    SOLVED Massive lag in multiplayer

    Hi I have been working on a multiplayer system for awhile now and decided to make a server based system where the calculations are being handled by the server. This has caused the lag and response time of the game to drastically increase and I can handle collision server-side this way. But after...
  18. Logan Bevans

    Ds_Grid Help

    I don't know a whole lot about ds grids but found this awesome inventory system that uses ds grids, well to remove items from the inventory you run this script. [ //If there's only 1 item in the inventory if(ds_grid_height(playerInventory) == 1) { //Only 1 item in inventory...
  19. Divinik

    GMS 2 Loading Grid From Json Not Working Properly?

    So in the game I'm currently working on, every companion and their info is stored in a ds_grid (Companions_Grid), and within each companion's column is another inventory grid stored for the companion. The code for storing the inventory grids into the json seems to be working perfectly, I check...
  20. D

    GMS 2 ds_grid not showing values set in create event

    I've filled a ds_grid in the create event but when I iterate over it in the draw event (same occurs in the step event) it shows the correct value only for the top left cell. All other cells show the value stored in the top down cell. I've stored an array in each cell of the grid, acccording to...
Top