1
Open Feedback / Guidelines on vision and projectiles
« on: May 09, 2017, 05:53:11 pm »
Greetings everyone,
I'm working in a personal project of mine which is a xcom based game.
Xcom is the game of my life and i play it until today, so i decided i wanted to create my own "XCOM"
So now im working on vision of the player, im searching the code on git and it would really help me out if you guys could give me some hints on how to simulate the xcom player vision. At start i was using a sort of "flashlight" to see whats visible and whats not, but i want to copy the xcom vision cause i find it more interesting. Any tips you could give me on how to decide whats visible and whats not?
Im planning on using vectors based on the character and facing the direction the character is facing. But i think once the height is added to the equation things might get a bit more complex than that. Plus there are the question of the flares lightining regions.
What about the projectiles and the hits on the walls is there any good algorithm to track that? Do you do the calculations over a grid in a matrix or is it more simple than that? Right now my shot is directly the colisions only exist in monsters.
Sorry for the questions but it would really help me if someone could explain a bit of the algorithm.
Finally i leave an old video of the game im working on if you are curious to check it out and yes, I did use some of xenonauts content while i was working on it, but the game took another road and there wont be a base anymore.
--EDIT--
I did found a useful png explaining some of the stuff, can you please confirm if this is how things are usually done?
https://i.imgur.com/eqnBg.gif
I'm working in a personal project of mine which is a xcom based game.
Xcom is the game of my life and i play it until today, so i decided i wanted to create my own "XCOM"
So now im working on vision of the player, im searching the code on git and it would really help me out if you guys could give me some hints on how to simulate the xcom player vision. At start i was using a sort of "flashlight" to see whats visible and whats not, but i want to copy the xcom vision cause i find it more interesting. Any tips you could give me on how to decide whats visible and whats not?
Im planning on using vectors based on the character and facing the direction the character is facing. But i think once the height is added to the equation things might get a bit more complex than that. Plus there are the question of the flares lightining regions.
What about the projectiles and the hits on the walls is there any good algorithm to track that? Do you do the calculations over a grid in a matrix or is it more simple than that? Right now my shot is directly the colisions only exist in monsters.
Sorry for the questions but it would really help me if someone could explain a bit of the algorithm.
Finally i leave an old video of the game im working on if you are curious to check it out and yes, I did use some of xenonauts content while i was working on it, but the game took another road and there wont be a base anymore.
--EDIT--
I did found a useful png explaining some of the stuff, can you please confirm if this is how things are usually done?
https://i.imgur.com/eqnBg.gif