How would I make my enemy follow the player once the player is in a certain range but make the enemy move on a 16x16 grid. I already know how to make it so the enemy will move towards the player but I want the enemy to move in a grid style to the player.
This is a full game engine. With just 3 lines of code you can be running the entire 2048 game.
Support for custom images and styles.
New update (22-Mar-2019). In this updated I completely re-coded the game engine. Taking advantage of ds_maps for data storage. Shouldn’t be too hard to update...
I'm not sure if this should be posted in Programming or Game Design threads. I'm wondering what the norm is when it comes to deciding the origins of sprites for an isometric RPG? I've got sprites that will be drawn in both inventory and in the room grid.
When they're in the room grid, I need...
I'm trying to create a script that returns the nearest instance in 3-dimensional space, by looping through all active instances of the object, evaluating the distance using the built-in function "point_distance_3d", sorting the ds_grid containing the data so that the smallest distance value is...
I'm trying to create an infinite world using chunks. Currently, I'm using a noise function to generate terrain on a ds_grid that is the same size as the room. It looks like this:
Now I'm trying to have the world generate in 16 by 16 chunks so I can make the game infinite. My plan was to...
Hello,
I use the function
in my code with 3 arguments as specified in the documentation. The following is a code extract from my program.
But when I compile to Android/YYC I get the error:
The function
with 4 arguments compiles just fine for Android.
Any idea what's going on?
Thanks.
Hi! In my top down game my enemies use a grid system to follow the player and avoid objects. However, while my enemy is chasing the player the way the enemy is facing is very choppy (it glitches between 2-3 different angles). How can I make it so that the enemy smoothly looks toward the...
I will refer to this thread https://forum.yoyogames.com/index.php?threads/quick-question-about-tiles-in-the-room-editor.28172/
I want to place a sprite anywhere, but it's difficult to do in GMS2
Tried Preferences > Room Editor > Grid Settings
Doesn't work on current rooms
I'm trying to make a tile set where a lot of stuff has to overlap each other, but grid snapping is making it really hard. I've separated most of the sprites into different tile sets but it really isn't working at all, and the preferences menu does nothing. Any help? Or should i just code the...
Hello everyone,
I am currently wondering some little things about the tileset and autotiles options of GMS2.
It seems to be perfect to be used in the software to create the maps we want but I don't understand / don't find it it also work ingame ?
I mean, I'm drawings all a map, side view. I...
Hello! I'm new here. Before to post this topic I read both guidelines. I hope it's the right section, otherwise my apologies. I'm not a programmer, even if I know the basis. I'm more into giving ideas and making illustrations. This is why I use both GML and DnD, and I try to "experiment" before...
So, I have this tetris like game that I hope to get ready for sale at some point. And it's perfectly functional to one point. if you complete a line, all the blocks placed in that line are cleared.
Then I added this red block that, when it is part of a line that gets cleared, it blows up an...
I trying to make a grid that rotates and moves with the object and is always centered at x,y of the object. Because the grid is dynamic ie can change size it's posing to be difficulkt to program. It needs to be this way rather than a sprite. Is there anyone who can help me?
I've got the first...
Hello!
I'm having some trouble condensing a two-dimensional Ds_grid into a one-dimensional Ds_grid. The problem is that the 2D grid is of varying size, and the 1D grid is of fixed length.
I know I can't just read the 2D grid, so I want to take the mean of a region of the 2D grid and set my...
I'm creating a prototype for my next game, testing controls and everything. The whole scenario is a top down view divided in 80x80px squares, and I want the character to move straight to the area where the mouse presses and stay in the center of it. Once he gets there, I want him to stop and...
Hi all!
I decided to do a small test between GMS 1 and GMS 2.
In GMS 1 I made simple isometric tileset and wrote this code to create it in room:
for (var i=0; i<256; i++)
{
for (var j=0; j<256; j++)
{
var xx = (i - j) * 32;
var yy = (i + j) * 16...
Do you have a special method or tip on how to solve "index out of bounds" errors? Do you know a neat trick on cutting your investigation time? Please post your GMS2 list and grid access tricks!
Pre-reading...
I am trying to think of the most efficient way to create a grid in which each square is something a player can select (using the arrow keys). The two main pieces would be the grid and then the grid selection.
Creating X amount of objects for each grid square seems inefficient and I am trying...
Hello,
I started a little bit to discover the Grid since yesterday to learn more and I face a little problem. For the example I have this :
Text = ds_grid_create(3, 2);
I reduced to the simplest. What I am trying to do, to simplify my task for later, is to access with eg "K1" as a...