• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

(Solved)isometric bullet to wall collision issues

C

CatOnMushroom

Guest
ok this might be a cosmetic issue but am sure there is a technical way, but can someone give me a hint or direction on how to handle a bullet collision in isometric like view. becouse for example holding a gun in your right hand and go for example up/right like (x + 2, y - 1) makes a collision on the walls on the right side of the character. the only sulution I can figure so far is making a different direction sprite bullets and one mask for all so the mask spawns in the center of the character and the bullet shows right sided in a up/right direction.(giving aiming issues when it actualy needs to hit something)....

still need to try the collision timer on spawn and walls, but doesn't feel accurate enough.
thanks if there is directions and I was understandable enough.

ps. it's like free movement and not grid based. (needs the speedy control and else it's not an issue)
 
My recommendation is to do all collisions based on character's and bullet's "shadows". So the collision mask is a square or a circle around their feet.

Then, bullets need a "height" that they draw themselves above the ground. I usually use a variable "z" for this. Then in the draw code:
draw_sprite(sprite_index,image_index,x,y-z); The higher the Z the further off the ground it will appear.
 
D

DariusWolfe

Guest
Damn, I saw a question I knew the answer to, so I came in to give it, but it was already taken care of.

To expand a smidge though, you should treat a collision box in an isometric (or even pseudo-isometric) game as though it's a box on the "ground" below the object. So for characters, it should be near the feet, same for walls; This will allow a pawn to walk up to a wall and have their sprite overlap the wall, or walk behind a wall and have its sprite overlap them.

Bonus tip if you're not already doing so: Set depth to y, so as they go up and down on the playing area, they'll be overlapped by objects "south" of them, and overlap objects "north" of them.
 
S

SyntheticStorm9

Guest
Damn, I saw a question I knew the answer to, so I came in to give it, but it was already taken care of.

To expand a smidge though, you should treat a collision box in an isometric (or even pseudo-isometric) game as though it's a box on the "ground" below the object. So for characters, it should be near the feet, same for walls; This will allow a pawn to walk up to a wall and have their sprite overlap the wall, or walk behind a wall and have its sprite overlap them.

Bonus tip if you're not already doing so: Set depth to y, so as they go up and down on the playing area, they'll be overlapped by objects "south" of them, and overlap objects "north" of them.
I know you feel, sigh...
 
C

CatOnMushroom

Guest
thanks all but thats not exactly what I ment altough going to work a lil on Pixelated_Popes sugestion. yet I think this is about the drawing in depth (-y) still. what I try to say if the character walks next to the wall on the right side, the bullet spawns on top a a wall collision mask and never shows up being destroyed right away. thats the issue I have. spawning the bullet in the center of the character is no issue. and I can create a bullet on the wall mask but won't be destroyed when it visualy hits a wall.
lol,(hopefully) while trying to visualise it(helpfull tool in the future perhaps) with a screenshot I realised that it might be the spawning or collision point of the bullet(might still be the direction)/wall mask as it shows me that it doesn't come close at all. back to some more attempts.
 

Attachments

C

CatOnMushroom

Guest
solved. my bad(again) useing action collision instead step/script it, can't slack or be lazy on programming I suppose.

now to close this thread somehow lol
 
D

DariusWolfe

Guest
You should be able to put a "Resolved" tag on the post title, or just add "Resolved" to the front of the title. You can't literally close the thread, but that will let people know you're not looking for a solution.
 
C

CatOnMushroom

Guest
lol to much daily work for it to be a hobby, but as I could expect the problem is still here. check this picture as it might explain what I mean better.
the arrow shows the collision point when spawning a bullet. at the very same time the walls block the bullets as soon they are created.

edit part: it didn't make sens at all at first.(at all)
Image333.jpg
 
Last edited by a moderator:
C

CatOnMushroom

Guest
solved(lol so far) used a grid cells for wall collision with the bullets.
 
Top