W
Wintermute()
Guest
classic game problem I am having in the last week of trying to solve it.
When my player dies, it spawns in the same place on screen, and there is a period of indestructability. (similar to Joust, the classic arcade game) if the player spawns onto a place that is simultaneously occupied by an enemy, all lives get lost and game over happens within fractions of a second, regardless of the invulnerability... but, The invulnerability DOES work if the enemy object, or enemy projectiles are not immediately occupying that same space on the screen - but then pass through the spawning, indestructible player fine, no problem. So the issue seems to be that very first moment of spawning, and if a hostile object is in that same space.
Wondering: what is an easy way to check for the existance of an object, before spawning, and move the spawn point away (x) pixels ?
thank you
When my player dies, it spawns in the same place on screen, and there is a period of indestructability. (similar to Joust, the classic arcade game) if the player spawns onto a place that is simultaneously occupied by an enemy, all lives get lost and game over happens within fractions of a second, regardless of the invulnerability... but, The invulnerability DOES work if the enemy object, or enemy projectiles are not immediately occupying that same space on the screen - but then pass through the spawning, indestructible player fine, no problem. So the issue seems to be that very first moment of spawning, and if a hostile object is in that same space.
Wondering: what is an easy way to check for the existance of an object, before spawning, and move the spawn point away (x) pixels ?
thank you