project-navigation
Personal tools

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - criusmac

Pages: 1 [2]
16
Coding / Visibility plans
« on: May 15, 2009, 04:04:44 pm »
Ok, without any suggestions forthcoming from the "Searching C++ Programmers" post, I'll assume I'm supposed to do whatever as I see fit. Maybe this is the way open source projects are supposed to work? I have no idea really.

Is there any way to see what features have been agreed upon as "need to do" at least?

It took me a long time to refind the todo lists, but they are rather uninformative, and general for me to do anything about.

I did not find the UFORadiant code, only gktRadiant, so I'll assume UFORadiant got canned due to its problems, and no longer exists. In that case, I'll assume nothing needs to be done about this C++ code then. These posts are obviously too old now.

I looked at some of the translation information, but there doesn't appear to be enough of a concept of what people want to have said. From what I can tell, what is wanted is someone to invent a story or piece of one and type it up. I'm not a storyteller, so this is beyond me.

Since the Feature Requests do not contain information on whether or not the feature requested was accepted, I'll assume they are in the discussion phase until they appear on the todo list, at which point somewhere, somehow, the information is kept, just not where I can see it.

I have been unable to find any information on how people want visibility to be implemented.

I will try to implement visibility without any outside information, even though it isn't on the todo list since I feel this game should have it. Since I have no information written down anywhere, I will come up with arbitrary random numbers and ideas, and tweak them until it works somewhat. Since I don't have any information on the alien's capabilities except for the text in the research panels, I will go completely off the research information, and try to set their powers of sight based on that. This basis will be as if all aliens are humans with today's level of technology for whatever detection methods they have. IE: Aliens with infrared sight will act as if they are humans with infra goggles permanently attached to their eyes.

It's a poor way of doing it, but with no information or knowledge on what is wanted, it's the best I can come up with. Without any raytrace information suggested that I can find, I will assume I don't know what is wanted about this, and will thus not do it.

In short, if you want me to try to do it a certain way, post a link to what you want, or how you want it done, otherwise I'll assume it's up to me, and just do it however I see fit (which may not be a bad thing really, just not a well thought out one).

So, here is what I plan to do currently:
1) During debug mode, enemies will be completely visible as they currently are, but their popup will include your chance of seeing them in your current positions. There will be 1 row for each living soldier to indicate his/her chance of seeing the alien. This chance will be 0% if there is no line of sight.
2) During any movement by an alien, each soldier will roll a random number to indicate their percentage chance of noticing the alien. I will not deal with decimals in the percentage currently, so everything will have a 0-100% chance of detection.
3) Once an alien is detected, it will not become undetected until it leaves *all* soldier's line of sights at the same time.
4) During any movement or facing changes by a soldier, that soldier will get a chance to see any of the aliens he or she has line of sight to. This means standing in 1 place and constantly changing facing is a good way to pick up on any aliens that you may not have spotted initially. I'm assuming the soldier is taking the time to look around.
5) If a soldier is fired upon either via melee or ranged attack, and they get hit by the shot, they will not have an increased chance of detecting where the alien is since they will be in pain/unconscious/panicky/whatever happens when you get hit by serious firepower. They will still have their normal base chance of seeing the alien if they are not dead though.
6) If they are not hit by the alien, they will be granted some random number bonus to detecting the enemy. For now, I will assume this random number is based on mind, and I will go with (mind-25) (that can not become negative, since 25 seems to be average mind) increased detection chance since that seems like a good starting point. This means if you have a soldier with 124 mind, they will have a 100% chance of detecting any enemy they have line of sight to assuming they have at least a 1% base detection chance.
7) This means any alien that has a 0% detection chance can not be seen no matter what they do. They can scream and shout, poke people, stab people, shoot people, and there's no way to detect them. Chances are this will only happen in very dark places, or with cloaking technology, or no line of sight, or at least, I'll tweak it until it only happens for those times. (assuming no infra goggles or other detection methods that might make it possible anyways)
8) There will be a -10% chance of detecting any enemy (can not decrease below 1% if it started at higher than 0%) for each 5 foot level difference between the observer and the observee. This makes stairs very dangerous since you have very little chance of seeing anyone above or below you, even if they are generally right in front of you. This level disadvantage does not apply if they are shooting at you, whether or not they hit. I'm not going to make an exception for stairs or areas being narrow since I have no idea how one might want to come up with those rules, so I'll just assume they are no matter what. Feel free to change the code if I actually manage to get this working though.

I've forgotten a lot of what I planned since this post is long, so I'll just modify this post as I come up with them, or people give me suggestions I decide to try to implement too.
By the way, this won't actually happen for a long while since I haven't look at any of the code yet, and have no idea if these things are doable without other major changes. I'll assume it'll be fairly easy though since there is already line of sight detection somewhere, and all I'm doing is modifying that function to roll random numbers based on my own criteria for detection.

Sound good?


1st Edit:
On my first initial look at the code, I have identified int G_CheckVisTeam (int team, edict_t * check, qboolean perish) as the likely place to implement this code.
I have confirmed this function is already called in static int G_DoTurn (edict_t * ent, byte toDV), and int G_CheckVis (edict_t * check, qboolean perish), so assuming these functions aren't spammed a lot constantly, this seems like a good place to start.

Pages: 1 [2]