ds_grid

  1. S

    GMS 2 FOV not quite right

    Evening all, I am hoping someone can help. Following code based on http://www.adammil.net/blog/v125_Roguelike_Vision_Algorithms.html#mycode I have put something in place, though it definitely doesn't work as hoped! I'll be honest, whilst I wrote all the code out while following an example...
  2. S

    GMS 2 Calculating Fov from a ds_grid

    Afternoon all, I have my world info stored in a ds_grid as a bitmask and my entities are mapped on to another ds_grid. My intention is to track what tiles are currently visible by recalculating the field of view (FOV) whenever the player ends a turn in a different space to where they started...
  3. PlayerOne

    GMS 2 Advice when it comes to loading text (localization) [SOLVED]

    I plan localizing my game and I have two ideas rolling around in my mind on how to load text. Either load the strings from an .ini file into a ds_grid in a centralized way and have the objects access the strings form that grid or load strings in each object when a room starts (or object spawned)...
  4. S

    GMS 2 Bitwise operations and Ds_Grids

    Evening all, I am converting a 2d array to a ds_grid but I am not sure how to convert the bitwise operations. Do we have to do something specific to use bitwise operations with ds_grid? I have gone from oControllerTile.tileArray[_arrayHeight, _arrayLength] |= ISBLOCKINGMOVEMENT |...
  5. Strobosaur

    Blood surface only drawing on top of ground tiles? [SOLVED]

    I bet this has been asked before, but i was unable to find a good answer after some searching, so here goes: Im making a top down game, and i use a ds_grid for the map structure, then i map collidable tiles to another ds_grid and use that as a collision grid. Im also drawing all blood to a...
  6. Daniel Mallett

    Saving data

    I am trying to figure out how to save ds_map data. I have the following code: list_data = ds_list_create(); // Create list ds_list_add(list_data, 000); // Add value to list pos 0 map_data = ds_map_create(); // Create map ds_map_add(map_data, "list_data", list_data); // Adds list to map...
  7. PlayerOne

    GMS 2 [SOLVED] Finding a specific item in a ds_grid and subtracting it.

    Right now I'm creating an upgrade system akin to the Fallout 4 / New Vegas workbench system. Everything is set up but I need to find the first item id of an item that I'm specifically looking for. In this case the item id is a sprite that is used to identify items in my players inventory. Now I...
  8. L

    GML Advice on Large Data Structures and Memory

    I'm building a management game that works with quite large ds_grids (20x100) and I'm not sure how they are handled when leaving and entering rooms, especially in trying to prevent memory leaks. Also some of the ds_grids will need to be looped through during step events. In an object's create...
  9. Daniel Mallett

    GMS2 crashes ds_map_add_map

    I have a button and some code that will simply close the app. This works fine by itself. Then I add the following code. At this point the game still runs but as soon as you click on the quit button Gamemaker crashes and says it's become unstable etc. My problem is 1) Regardless of my code it...
  10. L

    ds_grid_sort not actually sorting?

    after a few hours of scratching my head and restarting my scripts I just have to ask here! I'm a bit new to Gamemaker, but have a little experience with C and other 3d-software-scripting languages. I'm just trying to make sense of where and how I should be calling ds_sort_grid. In my Create...
  11. PlayerOne

    GMS 2 [SOLVED] Item rollover into new inventory slot [DS_GRID]

    Alright I'll just boil this down, I have a ds_grid inventory system (28 slots) and an item cap per item (90). Works as intended, but I have this issue that when a inventory slot equals the max amount of an item or more then when I pickup another item it will go into another slot. Leaving the...
  12. S

    Legacy GM [SOLVED] ds_grid Position Detection Help

    Hey! This is my first post on the forum so I'll try to be as clear as possible! I'm creating a digital version of the board game "battleship" for a coding class at my high school; however, I've run into some issues trying to get my grid to detect when an object is within a specific square. I...
  13. S

    GMS 2 Using an inventory without causing a memory leak

    Everywhere I read, I see that not destroying DS_Grids and lists causes a memory leak that slows and eventually stops your game after a while. How do I use a ds_grid, which is populated with my inventory information, without causing a memory leak? I need to keep the grid active, because the grid...
  14. S

    GML ds_grid_resize did... nothing?

    Heya guys & gals, another thing I am struggling with today (yay), this time it's all about the resizing of grids. I am using a grid (called 'open') for saving some data. So far, it's only of size [ 2 x n ] . (To be exact, coordinates.) It is used as a "to do list" of points in another...
  15. D

    Invalid structure- Temporary solution

    Hey guys, the new required release have a bug where the ds grid always shows "invalid structure" in debug mode. The site shows the bug as fixed but even downloading again it continues, so maybe it will be fixed in the next release. For now I'm using this simple script I created grid=argument0...
  16. kingsushi001

    Legacy GM [SOLVED] Using argument0 to create ds_grid id

    Hi everyone I seem to be having a problem with the following. This is my script: ///map_grid(grid_name,map_width,map_height) map_width=argument1; map_height=argument2; argument0=ds_grid_create(map_width,map_height); for (h=0; h<map_height; h++) { for (w=0; w<map_width; w++) {...
  17. S

    Legacy GM DS_grids - non reproducible bug

    I have been getting this bug with my DS_grids that seems random when it shouldn't be and I highly suspect it is a bug on game maker's side. at the start of the game I have this object creating global ds_grid's in Game start event global.invT = ds_grid_create(0,3) //item id, modifier, upgrades...
  18. Slyddar

    Free Twos! - Puzzle and Strategy game

    Well it's time to release my first app on both IOS and Android, and I would love to hear any feedback from you, and see your scores on the leaderboards! Twos! is a puzzle and strategy game requiring quick thinking and efficient use of powerups to keep your board clear and generate higher...
  19. C

    GMS 2 Using ds_maps inside ds_grid for inventory

    I've been trying to figure out my inventory for and RPG, and this is the idea I have: 1. Set up ds_maps containing information for each individual item (sprite, name, description, script for what it does when used etc) 2. Set up ds_grid for inventory, then use a script to add that item to my...
  20. P

    GML Saving Nested Data Structures

    What's the best way to save nested data structures specifically ds_grids
Top