grid

  1. F

    Simply fit pieces into a grid :?

    Hi guys, I'm new here, new to game maker too, as to programming; I'm making a simple Jigsaw Puzzle, and having some doubts. You may find it easy as 💩💩💩💩, but as I say, I'm new haha; I create a obj that holds a grid, and the obj's for the pieces. What I'm having trouble is fiting this pieces in...
  2. Z

    Legacy GM Q:Ini files

    Hi, i have 2 questions about ini filies 1. when you open an ini file does the size of the ini file matter? does it affect performence? 2. is it wise to use ini files without specifying a directory? and is it wise to use ini`s atall for saving ds_grids? my game will use ini`s alot.
  3. D

    GML Grid based path finding AI

    Hi all, I am trying to create a 32 bit retro RPG game and was wondering as to how I would go about creating grid based path finding for AI - i.e the entities move locked to a 32x32 grid instead of moving freely. The game is turn based so any enemies can only move after the player has moved. Any...
  4. Simon Gust

    Legacy GM AT-47 (Auto-tiling with 47 images)

    GM Version: GM:S Target Platform: All Download: N/A Links: N/A Summary: I made a script that allows you to auto-tile with 47 images but it only works with "tiles" or more precisely a grid system using an array. Tutorial: The algorithm is use in this script is similar to the bitwise tiling...
  5. K

    GML Sorting grid from strings

    Hello GMers ! I'm trying to sort a classic ds_grid using this: 0 STR1 STR2 STR3 STR4 1 2 3 4 5 ... All cases countain uppercase strings. I want sort the grid from the 1st collumn called STR1 I tryed to convert strings to real but i think i missed something to have a good result. Some...
  6. P

    Idea for an advanced snap to grid system help!

    Hello, I'll try to be as clear as possible: all I need is snap my player to a 32x32 grid when he stops moving. Using the normal function Move_Snap is not worth it because it ends up with a laggy and a malformed snap. So, basically i'm tryin' to make a Johnny Megatone remake, a game I used to...
  7. V

    How to create a Management Isometric Game

    Hi! I have made a game like simcity+anno+the settlers on GameMaker Studio 1 (3d studio max+photoshop+GM+SonarX2). But it was just a test and worked very well. So, I am planning to make a really serious project. What do you think guys about it? How can I make the elements of the game like: -...
  8. M

    Legacy GM Help With Paths?

    Hello, I am trying to make my AI character walk into a building, and then, upon arrival, leave and head for point (0,0) in the room. I will paste the code below. He walks into the building and makes it to his destination, but then after the if statement is true in the step event, he just freezes...
  9. NightFrost

    Checking LOS across a grid

    What would be the fastest way to check LOS across a map grid? One method I can think up is looking along the hypotenuse of x1y1 - x2y2. A check is made on the grid once on every point hypotenuse crosses a grid boundary perpendicular to direction of the check, twice where it also crosses a grid...
  10. A

    Very weird and interesting (X,Y) problem

    (click to get the bigger version or press here) (number in the left-up corner is the target location, middle one is X,Y of the red square, and the last one is the X,Y of the green square) So, the red square has a code which moves it towards a random location (which is constant 4,7 because I...
  11. C

    Legacy GM [SOLVED] Basic Collision Problems

    I have a 32x64 sprite with a 32x32 collision mask on the bottom half. It's a top down game and when there is a wall above the sprite, I want the top half (or everything over 32px) to appear over that wall. In this picture, the sprite is moving left and right, you can see the upper part pass...
  12. mafon2

    Pathfinding with grid's shifted, Filling the grid

    I followed two of the most popular tutorials about pathfinding and got the amazing results I've been trying (with horrible results) to write algorithms for. Didn't know there's already built in stuff. But for some reason the grid instances appear shifted 16p down and 16p right, plus sometimes...
  13. N

    Custom action at path end?

    Hello! I'm having difficulty understanding the pathing functions in GM:S - I'm attempting an "idle" state for an AI which computes the coordinates to a random cell in the grid, moves to it, then repeat the process once it reaches the end of its path. However, I cannot figure out how to set any...
  14. D

    (Optimization) Primitives and Surfaces

    Hello. :) I was thinking about doing some optimization in my game, and found this: https://forums.tigsource.com/index.php?topic=3747.0 This is from 2008 so the question is: Is it still more efficient to use a surface to draw primitives (draw_circle, draw_line, draw_triangle, etc.) to, and only...
  15. L

    Move through inventory slots

    I have a ds_grid Inventory. I'm having trouble how I could draw a rectangle over the slots. It must be able to move over any empty slot in my inventory so that it skips over to the next full slot.
  16. L

    Legacy GM Ds_grids

    Hello friends (: back again to ask : How could I re-organize a DS_GRID so that basically all the values BUT those with 0 are Shifted. Basically imagine an inventory. If I drop something in slot 3.. [Lotion] [Tissue] [NOTHING] [Pineapple] How can the [Pineapple] shift over to the spot that...
  17. A

    Legacy GM Saving and loading object templates

    So I'm trying to save all the types and locations of instances in my design room, where I design parts of a level, to be created randomly in the main game. My design room, to help visualize; I want to go through this room, read the column, row, and what type of basic block it is, then be...
  18. Geoff Jones

    Making a sound on each tile moved

    Hello all, Im making a game similar to Ultima 5 where the movement is based on 16x16 grid squares. So each time you press up down left or right, it will jump 1 tile in that direction similar to this - My question is, how do I get a sound to play at each step? Here is the code I have for the...
  19. G

    Game Mechanics Grid Based Lighting System

    I recently followed along with the HeartBeast tutorial on random map generation, available here: I was wondering if anyone knows how I could make a dynamic lighting system that would work with this grid-based tile world? I have seen quite a few tutorials, but they all require wall objects of...
  20. A

    Legacy GM Help Simplifying my 8-directional grid based movement code

    So, I have 8 directional movement on a grid. Here's what I have that governs the actual movement; //Setting up animation frames facing = image_index; //Code for turning on the spot if (ismoving == false){ if (keyboard_check_pressed(vk_right)) { image_index += 1...
Top