Windows No easy tileset collisions feel like a burden

S

Skripter

Guest
I watched some tutorials and stuff, but getting tired of the fact that the user manual is obsolete or "outdated" since there's no full (recent) documentation of DnD.
Like why there is not even the possibility to have auto-generated scenarios of DnD commands. If I seek for help at the search bar of DnD-feature with word "tile" I can find stuff
but there's no example how tileset's collision really should be handled.

If I create an object, nice, I can use collisions. But with a tileset alone I can't obviously, my question is why, like is that so difficult to implement or yoyo games simply don't care?
 

Yal

šŸ§ *penguin noises*
GMC Elder
I agree that the tilemap documentation could do with some touch-ups, there's a lot of terms that sound very similar but act very differently and the manual doesn't do a good job at explaining what they all mean.

The simplest possible tilemap collision would be to return a collision if there's a tile at the position (other than the 'erase' tile) and no collision otherwise:
GML:
///pixel_walkable(x,y)
if(position_meeting(argument0,argument1,parent_overworldobject)){
    return false
}
var lay_id = layer_get_id("Tiles");
var map_id = layer_tilemap_get_id(lay_id);
var mx = tilemap_get_cell_x_at_pixel(map_id, argument0, argument1);
var my = tilemap_get_cell_y_at_pixel(map_id, argument0, argument1);
var data = tilemap_get(map_id, mx, my);
var ind = tile_get_index(data);
if(ind > 0){
  return false;
}
else{
    //No tile
    return true
}
You still need to handle collisions yourself when doing this, though (check for walkable pixels before moving objects) so not sure if this qualifies as "easy" for you[/code]
 
S

Skripter

Guest
...there's a lot of terms that sound very similar but act very differently and the manual doesn't do a good job at explaining what they all mean.
The simplest possible tilemap collision would be to return a collision if there's a tile at the position (other than the 'erase' tile) and no collision otherwise:
GML:
///pixel_walkable(x,y)
...
You still need to handle collisions yourself when doing this, though (check for walkable pixels before moving objects) so not sure if this qualifies as "easy" for you[/code]
Well I want to start completely with DnD as I'm currently developing other stuff with different programing languages and writing code is much more work
than simply using something like DnD, like when doing something complex you still need to find an easier way for flexibility and stuff. So I was really looking for a DnD possibility,
however I saw an option somewhere in GMS2 "..convert to DnD", the question is if this is somehow useable in this example
 
Top