Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs

Yal's SoulsVania Engine

Metroidvania / Soulslike project for GameMaker:Studio · By Yal

import collision to new project

A topic by omar16966 created Jan 14, 2020 Views: 65 Replies: 2
Viewing posts 1 to 3

first amazing  work.

so how can i import and use your tile collision with slope to my new project ?

thanks.

Developer

The collision system is pretty deeply tied to the level editor. It would probably be easier to alter the SoulsVania Engine source file and add your new project into that, than trying to separate the collision checking system. On the GMS2 version, it will pretty much be impossible to separate the two (a workaround for GMS2 implementation changes loads tile metadata into a global data structure, it will be a lot of work to recreate the metadata loading without the level editor framework).

The most important part of collision checking is pixel_vacant, which has all the checks to enable slopes, but the physics themselves are in player_inertia_x and player_inertia_y. (Which in turn are pretty meaningless without the entire player state machine system). If you just want the slope-enabled collision checks, pixel_vacant would be enough... in the GMS1 version. The GMS2 version needs to create a grid of metadata since getting tile left/top/width/height is so slow. If you always have the same width for tilesets, you could alter function a bit, using tile_get_index instead and then dividing/modulo-ing by the number of tiles the tilesets are wide - the ones included in the engine are all 16 tiles wide. I opted for the metadata array method to avoid adding an extra constraint on the assets.

But as I said, the collision checking system and the level editor are pretty much inseparable (especially on the GMS2 version) so it's probably easier to build on the existing system (replacing the player object) than to port it over to a blank project.

thanks for info.