gamedesigner1337
Member
So, I've been working on this DOOM engine. Here's a video of what I've got so far:
The idea is simple, you place tiles in the room editor, then the "obj_world" will check for those tiles and place instances on the corresponding X and Y coordinates, and the tile's layer is checked as a "Z" coordinate. All this works inside 3 "for loops".
I'm using the p3dc extension for 3D collision checking. Adding a "block collision mask" for each "block tile" was too memory expensive, since it would check for collisions 6 times per tile, one for each face of the blocks. I fixed that by adding a "floor collision mask" instead, because it isn't noticeable during gameplay, and the game runs smoother by checking collisions with only 1 face per tile. I just had to make the player's "collision block" taller, so the camera wouldn't clip trough the "ceilling" when he is jumping.
I'm now having trouble with the collisions between the projectiles and the walls / blocks. I can't use "p3dc_ray" functions, since they would "pass through" the gaps between the "floor masks", as shown in the image below:
Projectiles that move slowly, like the ones from the BFG or the Plasma Rifle are fine, because I can just manually check if their Z coordinate is higher or lower than the block's Z "range", inside a collision event between the two:
But faster projectiles, like the ones from the pistol, move at about 100 pixels per frame. Sometimes their masks doesn't even overlap.
I tried using colision_line() to get the block's id and then check for the tile layer to get it's Z coordinate. The problem with that, is that collision_line() only returns one of the blocks's id. So, if i have a pile of blocks stacked, the projectile would check for collision with only one of them.
So, since I can't use a 2D vector, nor a 3D vector, nor a direct overlap between the masks to check for collisions, what should I do? Is there a solution for this?
Rec 005.mp4
drive.google.com
The idea is simple, you place tiles in the room editor, then the "obj_world" will check for those tiles and place instances on the corresponding X and Y coordinates, and the tile's layer is checked as a "Z" coordinate. All this works inside 3 "for loops".
I'm using the p3dc extension for 3D collision checking. Adding a "block collision mask" for each "block tile" was too memory expensive, since it would check for collisions 6 times per tile, one for each face of the blocks. I fixed that by adding a "floor collision mask" instead, because it isn't noticeable during gameplay, and the game runs smoother by checking collisions with only 1 face per tile. I just had to make the player's "collision block" taller, so the camera wouldn't clip trough the "ceilling" when he is jumping.
I'm now having trouble with the collisions between the projectiles and the walls / blocks. I can't use "p3dc_ray" functions, since they would "pass through" the gaps between the "floor masks", as shown in the image below:
Projectiles that move slowly, like the ones from the BFG or the Plasma Rifle are fine, because I can just manually check if their Z coordinate is higher or lower than the block's Z "range", inside a collision event between the two:
But faster projectiles, like the ones from the pistol, move at about 100 pixels per frame. Sometimes their masks doesn't even overlap.
I tried using colision_line() to get the block's id and then check for the tile layer to get it's Z coordinate. The problem with that, is that collision_line() only returns one of the blocks's id. So, if i have a pile of blocks stacked, the projectile would check for collision with only one of them.
So, since I can't use a 2D vector, nor a 3D vector, nor a direct overlap between the masks to check for collisions, what should I do? Is there a solution for this?
Last edited: