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.

Messages - Empiro

Pages: 1 [2] 3 4 5
OXCE Bugs from OXC / Re: Random generator skewed
« on: October 04, 2023, 07:36:43 am »
No, `RNG::generate` work correctly, and changing it would break any other code that use it.
Only correct solution is fix only this usage of random as it should return values `0,1,2` or `1,2,3`.
This mean more correct would be `RNG::generate(1, _totalWeight);` here if `_totalWeight > 0`

Yes, your suggestion would definitely fix it here.

However, from professional experience, a random number function that generates inclusive end-bounds is prone to bugs and is generally more inconvenient to use. This is due to often needing to specify -1 or starting from 1 (0-based indexing is more common in languages, and mixing both leads to bugs). I mentioned a refactor, so we definitely would need to go to each call and fixing it if need be. I wouldn't be surprised if other off-by-one errors weren't also present.

Changing the signature of generate() would bring it in-line with widely-used industry standards.

Example Java - nextInt generates values [0, bound) :

Example C# (generates exclusive end bound):

Example Go (same as Java):

Also a side note: the generate() function as implemented here actually has a tiny skew even if used properly. It's because it's unlikely that max + 1 - min neatly divides into the range of next(). When you take the %, it slightly biases the values to the lower end of the requested range. However, this bias is so tiny that unless you're doing a very careful statistical analysis or max + 1 - min is huge (like close to 2^30), you'll never notice it.

OXCE Bugs from OXC / Re: Random generator skewed
« on: October 04, 2023, 12:27:27 am »
I took another look at the code. If it is intentional, then it could be misleading:

 * Generates a random integer number, inclusive.
int RandomState::generate(int min, int max)
   return (int)(next() % (max - min + 1) + min);

Within WeightOptions, the selection code is:
    size_t var = RNG::generate(0, _totalWeight);
   auto ii = _choices.begin();
   for (; ii != _choices.end(); ++ii)
      if (var <= ii->second)
      var -= ii->second;

If we take a super simple example, with exactly 3 options each with weight 1, then _totalWeight is 3, but var can be any one of 4 values:

0, 1, 2, 3

Both 0 and 1 would return the 0th option, then 2 returns the next option, and 3 returns the final option.

It's a slight bias toward the 0th option and probably would go unnoticed in most X-Com games, since the mission weights tend to total to 100. I can see mods that use small sets of options with small weights being noticeably biased, however.

It might be worthwhile to do a bigger refactor and change generate() to return a non-inclusive end (by removing the +1 in generate()). Most random number generators behave in that manner because it eliminates a lot of +1s and -1s scattered through the code to make things work. For example, percent() would call generate(0, 100), and end - start always gives you the number of distinct possible values for generate.

OXCE Bugs from OXC / Re: Random generator skewed
« on: September 30, 2023, 02:24:13 am »
Most random number generators work well, but it's the use of the random numbers that may be problematic. I remember a while back I took a look at the code, and noticed at least one or two places where there were off-by-one errors when it came to generating alien missions (the random number should have been [0, x - 1], but the game used [1, x]), slightly biasing larger values. I don't know if that has since been fixed.

Open Feedback / Re: Mind Control and LoS
« on: September 28, 2023, 11:35:04 pm »
Reviving this a bit, but could there be an intermediate setting for this: aliens can use PSI attacks without direct line-of-sight from the caster to the target. However, it can only done on targets that aliens actually spotted this turn, and not any of the "if one soldier is seen then all are targets" or "aliens automatically see everyone after turn 20" BS. Aliens move around randomly enough that I don't expect the PSI user to actually see their target, but targeting guys in the middle of your craft is just some next level crap.

I think the most balanced approach would be to require direct Line-of-Sight for player users to the target, and allow aliens to use PSI if any of their units directly and actively see the target.

Suggestions / UI addition: Remaining TUs when pressing ALT
« on: September 22, 2023, 08:01:51 am »
Here's a QoL / time saving idea I've been kicking around. I'm pretty knowledgeable myself when it comes to writing software, so it might be something I take a stab at if folks think it could help.

Basically when pressing ALT, in addition to showing facing, also draw a small bubble above each of your soldiers, which shows approximate remaining TUs. My mock-up below shows what I mean. The color coding should be something like green: >=50% TUs, Yellow 4-49% TUs, Red < 4 TUs (basically no time to do any movement). The bubble should also be partially filled based on remaining TUs (e.g. a half bubble means 50% TUs)

I think it can really help save time if you're looking for a soldier with TUs to fire at an enemy without resorting to clicking on each of them.

Bonus: when holding ALT, also show the TU bubbles of off-screen soldiers on the edges of the screen. This can help you when you're checking to see if anyone still has TUs remaining before the end of the turn.

The X-Com Files / Does anyone else love the early game ?
« on: September 19, 2023, 09:57:19 am »
Is there anyone else here who absolutely loves the early game stuff and prefers it to the late game stuff? For me, arresting cultists, shooting a bunch of zombies, and occasionally encountering that tough alien with just a handful of agents using mostly conventional firearms is really fun and intriguing. I just find it fresh and exciting to be working as a shadowy organization to uncover what's hidden. Everything also just has an air of believability to it all.

I actually would love to stay behind the scenes, and keep doing clandestine operations all the while X-Com the military organization is fighting an interstellar war against the alien threat.

Later on, you're traversing into the bottom of the ocean, going to Dimension X, dealing with the underground lizard-people, all while fighting off aliens in your advanced hybrid alien craft and wielding a multitude of sci-fi weapons and armor. That's cool and all, yet it's still not as compelling as the early stuff.

In this game, it's actually very important to do what you can to keep pace. Part of that includes getting more scientists as quickly as you can. Stuff happens at fixed times, and you have to stay on top of it. In a way it's similar to the original UFO or TFTD -- the game gets harder as time goes on. Except here, the game gets _much_ harder.

Most things with with "affects game progression" are good. They open up new missions and new technologies. Some will cause some types of missions to disappear. Again, it's a good thing, because those missions aren't going to give you anything new. Plus, there's just so much content in this game that you've got tons more to uncover.

Don't worry too much about missing out on stuff -- the missions lead one to the next in a logical manner, so if you've unlocked a tech that says that, then you've already done the lead-up stuff.

I like the fact that there are missions with a ton of enemies -- it lets you put those big explosives to use. On the other hand, I absolutely hate the fact that so many will spawn right next to your craft. There's basically very few tactics and strategies involved, other than maybe just pulling out as soon as you land if that happens.

If the maps were bigger, and you're guaranteed that they spawn away from you, I think things would work way better.

The X-Com Files / Re: Black Lotus Base Mission
« on: May 26, 2021, 06:14:23 am »
Note that KO grenades don't really work against the Avatar. They resist choking damage quite a bit. Your best bet is to take down its shields with conventional weapons and then follow it up with tasers.

Compared to vanilla X-Com, Hyperwave Decoder is quite a bit harder to get.

By 1999, it's important to be able to intercept UFOs. Have you been able to at least get the Interceptor and Kitsune? Do you have weapons that can reliably take down enemies (the Smartgun was basically the best gun until very lategame). If so, then you're still doing alright.

If you ran out of things to research it means that you probably haven't been capturing enemies. Two bases is the bare minimum at that point, and you should be feeling like you have too much stuff to research.

Middle click is your friend. In battle, middle click and enemy and middle click on the sprite to get ufopedia information. If you don't get more information, it means that you haven't researched them, and you should capture.

Middle click on a research topic to see where it can lead. Press q to search for interceptor and see what you need to research it.

The X-Com Files / Re: The X-Com Files - 1.7: Market Corrections
« on: March 04, 2021, 09:25:26 am »
I also have no quarrel with the current sniper-spotter mechanics, I didn't have much problem with it unless I used smoke grenades in missions which include a lot of snipers and thermal vision guys (like Red Dawn bases), but that's just me of course.

Red Dawn do not actually have thermal vision on any of their soldiers. The night vision is also a piddling 11 for their top tier troops. What they do have is a lot of snipers, and because they automatically spot any of your soldiers that hit any of theirs, it makes them seem like they have really good night vision and thermal vision, even when they don't.

That source of confusion is why I dislike the sniper mechanic in its current state so much.

The X-Com Files / Re: The X-Com Files - 1.7: Market Corrections
« on: March 02, 2021, 01:06:23 am »
Most higher tier cultists have a few extra squares of night vision but it's really something like 9 -> 11 or 9 -> 13 at most. That information is available in the Info tab, so it's not too big of an issue, especially since it's still way lower than Dogs' vision ranges.

It's really the automatic spotting when they're hit that's frustrating and confusing. You can test this yourself by shooting with your snipers from the back. Even if your snipers are far, far out of visual range, they'll still be fired upon if there is a clear line of fire.

The X-Com Files / Re: The X-Com Files - 1.7: Market Corrections
« on: March 01, 2021, 11:46:23 pm »
Just make the missions have less enemies, problem solved. No need for bigger maps and larger transports for even more soldiers.

I do like the occasional mission with tons of enemies though (a high density of enemies to be more specific). Nothing like throwing down a high-explosive or rocket and getting 10+ kills. The main issue is having them right at the landing site so you have no real opportunities to make meaningful decisions before they all jump down on your throat.

The X-Com Files / Re: The X-Com Files - 1.7: Market Corrections
« on: March 01, 2021, 11:32:44 pm »
The main issue that I have with the scout-sniper mechanic is that if any of your agents hit an enemy, then all enemies "see" that agent. So your agent can be way off in the corner of the map, at night, covered in smoke, but if they hit an enemy, then the AI snipers can all light him up. This aspect both feels extremely unfair and is really confusing to the player.

I was watching Yeti's old X-Com Files streams, and he keeps thinking that enemies have ridiculous night vision and thermal vision because of getting fired upon in those kinds of situations.

I think larger maps can work in certain situations -- the cult of apocalypse missions can have tons of enemies. Bigger maps could mean that you don't immediately get jumped by tons of enemies. I think in general, a bit more separation between your landing site and the main force of enemies could be nice. Still have some enemies next to the landing, but opening the door and immediately seeing 10+ enemies is off-putting.

Larger maps in urban settings would be super annoying though, unless the primary objective isn't to kill all enemies.

Alot of the early game armour arent even to stop wounds, just to lessen the impact. Kevlar vest is prime example, its better than nothing and it changes that your soldier can survive 4-5 hits instead of 2-3.
But the armour after that, the armoured vest pushes the "lessen the impact" to "If RNG god smiles upon thee, you shall not take any damage", the shielded armoured vest pushes it to "Small arms will almost always do no damage" and then the tactical suit which goes "Most firearms wont even dent you". And the Tritanium versions pushes it to the max for a long time.

The Kevlar Vest definitely lets you soak pistol shots quite often, though RNG is a huge part of it.

Armored Vests and Tritanium Vests work really well, but you can still be one-shot because even if you are shot directly from the front, the game can still roll a side hit quite often (feels like a bit too often IMO), and those armors comparatively weak side armor. The biggest reason to use the Suits is that their side armors are quite strong too.

Pages: 1 [2] 3 4 5