• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

algorithm

  1. Lepto

    SOLVED Find the 10 closest instances

    I want to find the 10 closest instance to the player. My first idea was to try and find all the instances, save their distance to the player in an array, sort that array, and pick the 10 closest enemies. However, I can see this getting quite taxing... Surely, there must be a better way. Please...
  2. U

    SOLVED Need some help with pathfinding logic

    Hello. I have a grid whose cell size is 32x32 pixels. With the A* algorithm, I can safely search for paths between two cells on a given grid. I have a problem with if a unit occupies not one cell, but several, for example 2x1 or 2x2 and so on. To solve this issue, I have only one idea: to make...
  3. AIO1

    Fill tool algorithm applied to a surface using a shader

    Hello, So... imagine a surface with different things painted over it. I basically want to make the typicall fill tool that is present in most drawing softwares. I've researched for a while and it seems the way to go is to apply the fill tool algorithm onto the surface I'm using. I tried to...
  4. V

    How do i apply Dijkstra's algorithm?

    Hello, people! I'm extremely new to GMS/gamedev (few days), have poor computer science background but have desire to figure things out. Last week by accident I miraculously found a single one IT vacancy (GMS developer) in my small town, requirements weren't so strict. I got an instant...
  5. H

    GameMaker How do you make a jump state?

    [I am writing this using a translate.] Hello, I'm make 2D side scrolling action games. GameMaker Studio 2: Melee Attacks Tutorial I'd like to add a jump state to this video. However, I'm also considering attacking while jumping. In that case should I create a jump state and a jump attack...
  6. AlexDerFerri

    GML How to create Game of Life in GMS1.4 / GMS2

    CONWAY'S GAME OF LIFE algorithm in GML GM Version: Studio 1.4 / 2 Target Platform: All Download: see code below Summary: A nice Game of Life algorithm using GML. This method uses the GML data structure called ds_grid to make the algorithm run faster. We will make two grids: one for the real...
  7. N

    GameMaker Need Help Optimizing A Puzzle Generator

    Greetings, members of the GM community. I need some help optimizing a puzzle generator. This thread will be divided into two parts: the game's design and my issue and proposed solution to the generation system. I am working on a puzzle game prototype which involves swapping blocks with...
  8. F

    Delaunay Algorithm in a GML Script?

    Hi, I am currently working on making a game that generates rocks such as this one: but, I cannot think of a way to achieve triangles such as that without the Delaunay algorithm. Does anybody have a script that could generate the Delaunay algorithm? If so, please post it here and give an...
  9. D

    Centipede like movement

    I am really hoping to get some thoughts on how to create a centipede (80's arcade game) with centipede like movement. I have a kind of working version running but there are major problems. As part of the game (Boss in my game) the centipede can be fired at and when any center piece is destroyed...
  10. N

    GML Procedural Dungeon Generation System

    Greetings, GameMaker Community members. I have been working on a procedural dungeon generation system and would like to share a solution. Just to put it out there, this solution is not the be all end all as many other solutions exist. The purpose of this post is simply to showcase my method...
  11. Lazzeking

    Game Mechanics Your thoughts on procedural generation.

    So, recently i've been working on a procedural generation system for my current project but i've started to question the "enjoyability" of the game as it is, like as it is right now the system generates an x number of events for the current let's call it "stage" and some events are fixed (like a...
  12. HayManMarc

    GML How to decrease awareness as distance increases?

    Hello, GMC. Here's another one that always stumps me. (Making a result increase as a number decreases, and vice-versa.) I want to make the 'awareness' stat of the person (obj_man) increase when the ufo (obj_ufo_player) is close, and decrease when the ufo is farther away. The middle point...
  13. Z

    Android java.lang.NullPointerException and java.lang.ClassNotFoundException Crash in Android Vitals

    Hello All, As the recent GooglePlay Console update introduced the Android vitals system, I heard that it's worth looking into your game's crash rate to make sure that it is below the threshold, or else the store's algorithm may suppress your game from showing to users. Anyways, I was looking...
  14. Erayd

    Shaders Drawing a curved gradient

    My end goal is to be able to draw shapes on object sprites based on their current pixel locations. Currently I can get a specific pixel and draw based on that, which is great. The below code should be getting the current pixel being processed, checking its distance with the midpoint and drawing...
  15. cdgamedev

    GML Thoughts on this Encoding/Decoding Algorithm

    Hi all! I just created a encryption/decryption algorithm using base64_encode and base64_decode. What are your thoughts? Is it a good idea to do something like this as it makes it more difficult to decode? Only issue comes down to longer strings... as I just found out
  16. Coded Games

    Windows Does mp_grid_path use Dijkstra's algorithm?

    Title says it all. Working on an assignment for my Data Structures class and was wondering if I could use it as an easy way to visualize paths.
  17. J

    Legacy GM Maching path learning (genetic algorithm)

    GM Version: GM: Studio Target Platform: ALL Download: n/a Links: YouTube playlist I have created a full tutorial series on AI learning...what this means is that overtime the AI will learn...in this series its over path learn, so the AI doesn't know what the path is until it fully learns it...
  18. B

    Asset - Extension Coding tools + extra data structures

    Here's a little set of scripts which will help you working with variables. There are some extra type checks, extended type checking to arrays, plus two extra data structures (ds_set and ds_sorted_list) and an alternative array sorting algorithm. Marketplace link: click here My website with...
  19. J

    Complex algorithms implementation technique

    Hi, Since I'm very new to GameMaker I was wondering what's the technique to implement complex algorithms that usually are implemented using complex datastructures (C structs for example). It seems that GM has very limited data structures and doing something "simple" like sorting a list with...
  20. C

    RPG Inventory System: ds_list versus 2D array

    Hi Everyone, I'm currently in the midst of constructing an algorithm on how to go about creating an inventory system for my RPG. In my game, each character in the party (total 7) has their own inventory in which they can hold a total of fifteen items. So for example, if you want to use a...
Top