pawbyte / Game-Pencil-Engine-Editor

Game Pencil Engine a game engine written from the ground up.
https://gamepencil.net/
MIT License
101 stars 20 forks source link

Implement virtual bool load_collision_grid( std::string map_file ) for collision_controller_base family #181

Open nhurde opened 6 months ago

nhurde commented 6 months ago

Depending on how the Editor or users export inner and intra-layer collision save files from project properties, implement the function that changes the bool collision_layer_grid[max_collision_layer_count][max_collision_layer_count] values based on what's inside of the text files.

Since its literally just a 32 x 32 boolean, this can be implemented in pretty simple ways.

Some optimizations can happen, but this function is not executed often and will probably only be executed once on program start or once per scene level load(If executed on every scene level loading it may require a little better optimization).

The functions that will be using this updated grid are already made via https://github.com/pawbyte/Game-Pencil-Engine-Editor/issues/113. so once this is done it will be easy to test.