aliens

Author Topic: Couple of newbie questions about basic OXC functionality  (Read 5010 times)

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Couple of newbie questions about basic OXC functionality
« on: October 16, 2020, 04:28:38 pm »
1) Any way to make Geoscape clock silky smooth?
Currently it jumps in selected increments but at selected speed. Increasing the speed smooths is somewhat but time passes by (too) quickly. Can it be made so time passes by smoothly and speed is regulated with increments, as in vanilla? It's nauseating watching earth shadow moving in rigid jumps and even more so with ships/subs.

2) Bases (and its sub-screens) and Graphs screen are not blown up to full vertical resolution
For some reason "Maximize info screens" does not affect the above. They are displayed only in multiples of original 200p size. I'm using non standard 1366x768 resolution and those screens display centered, 400p in height. I'm having troubles understanding this after I couldn't find a solution playing with options. It just feels like a weird design decision or even weirder technical limitation. Can all screens be blown up properly somehow, like the inventory screen?

UPDATE
After digging around I found #2 is influenced by "Geoscape scale" setting. Whichever ones make it appear in 200p vertical resolution will also blow up said screens correctly. Seems they are hard-coded to Geoscape display or otherwise too difficult to separate for their own scale setting. Bummer. My compromise is 1/3 scale (both).
« Last Edit: October 18, 2020, 12:02:53 pm by Nilex »

Offline kevL

  • Colonel
  • ****
  • Posts: 482
  • pitchforks and torches
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #1 on: October 19, 2020, 10:28:39 am »
re. 1) to implement this requires changing the codebase. Non-trivially, add a TIME_1SEC TimeTrigger, and when time-compression is set to 5sec, update geoscape graphics @ 1sec intervals but also track the surplus until time hits 5sec intervals, at which fire geoscape events ...

it's not silky smooth but its not chunky either


what follows is from my personal OxC, and others would have to take the *idea* (credit: Volutar) and likely implement it differently

Savegame/GameTime.h
Code: [Select]
enum TimeTrigger
{
    TIME_1SEC,    // 0 Volutar's smooth_globe_terminator.
    TIME_5SEC,    // 1
    TIME_10MIN,   // 2
    TIME_30MIN,   // 3
    TIME_1HOUR,   // 4
    TIME_1DAY,    // 5
    TIME_1MONTH   // 6
};


Geoscape/GeoscapeState.h
Code: [Select]
static const Uint32 FAST_GEO_INTERVAL = 20u;

Geoscape/GeoscapeState.cpp
Code: [Select]
GeoscapeState::GeoscapeState()
    _trGeo = new Timer(FAST_GEO_INTERVAL); // Volutar_smoothGlobe terminator.

    _trGeo->onTimer(static_cast<StateHandler>(&GeoscapeState::timeAdvance));
    _trGeo->start();

GeoscapeState::~GeoscapeState()
    delete _trGeo;

void GeoscapeState::think()
    _trGeo->think(this, nullptr); // call timeAdvance()

void GeoscapeState::timeAdvance() // private.
    else interval = 1; // (_btnGroup == _btn5Secs)

    // interval = true one-second intervals (interval * 5 = minimum time-compression)
    interval = (interval * 5 + _timeSurplus) << 2u;

    _timeSurplus = interval % Options::geoClockSpeed;

    if ((interval /= Options::geoClockSpeed) != 0)
    {
        //Log(LOG_INFO) << ". tick";
        bool update (false);
        for (int
            i = 0;
            i != interval && _pause == false;
            ++i)
        {
            const TimeTrigger trigger (_playSave->getTime()->advance());
            if (trigger != TIME_1SEC)
            {
                update = true;
                switch (trigger)
                {
                    case TIME_1MONTH: time1Month(); // no breaks ->
                    case TIME_1DAY:   time1Day();
                    case TIME_1HOUR:  time1Hour();
                    case TIME_30MIN:  time30Minutes();
                    case TIME_10MIN:  time10Minutes();
                    case TIME_5SEC:   time5Seconds();
                }
            }
        }

        if (update == true) updateTimeDisplay();
    }

    _globe->draw(); // <- DRAW THE GLOBE HERE <--||

Savegame/GameTime.cpp
Code: [Select]
TimeTrigger GameTime::advance()
    if (++_second % 5 != 0) // Volutar smooth globe terminator.
        return TIME_1SEC;

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #2 on: October 19, 2020, 11:00:56 am »
I don't think that's what he asked for.
And tbh, I doubt you would notice any significant difference between 1sec and 5sec.

1) Any way to make Geoscape clock silky smooth?
Currently it jumps in selected increments but at selected speed. Increasing the speed smooths is somewhat but time passes by (too) quickly. Can it be made so time passes by smoothly and speed is regulated with increments, as in vanilla? It's nauseating watching earth shadow moving in rigid jumps and even more so with ships/subs.

The internal game time passes smoothly (always in 5 second increments regardless of selected GUI increment) in vanilla xcom and in OpenXcom exactly the same way.

Speed is regulated by GUI increments, just like vanilla xcom... and additionally it can also be regulated by user option (slider), which didn't exist in vanilla. To get vanilla experience, the slider should be at about 80ms (minimum is 250ms and maximum is 10ms). The slower slider settings are ONLY meant for extra slow devices, you are not supposed to go above 80ms. If anything, I would recommend to increase the speed to about 60ms.

Vanilla xcom doesn't even have a terminator, the shadow moves in much more rigid jumps (entire polygons) than in OpenXcom.

So I don't understand your complaints... maybe make a video illustrating what you mean?
As far as I can say, OpenXcom shadow is actually much smoother than in vanilla xcom.

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #3 on: October 19, 2020, 01:57:19 pm »
Seems my understanding of vanilla clock was skewed by extensive use of TFTDextender (latest version with "Slow Geoscape Clock" enabled) over the last few months. Although your mileage may vary as I have to put OXC clock to 20-10 ms to replicate vanilla CE on my Win7 system (7m in-game per 1s real-time, too darn fast). I see now the current OXC clock implementation does mimic vanilla. Sorry for the confusion, my nub English only gets worse when things get more technical.

So unknowingly my #1 turned out to be a suggestion instead. Should I create a new dedicated topic or dump the stuff in here? Reason is because difference between 1 and 5 secs is actually pretty significant (more so on higher increments), both functionally and visually, when implemented as in TFTDextender. In favor of 1 sec of course. Don't think it would break compatibility or anything, unless OXC does not support clock precision bellow 5 sec in its savegames. Guess #1 is off the table in that case.

Forget about the video though - I'm too of an old dog to mess with that. But I think I figured a nice way to put it in words. In short: terminator moves smoothly in all cases, even when for example increment is set to 1h while Clock Speed it set all the way left (250ms). As in there are no chunky (ty for this kewl word kevL) jumps of 360/24 degrees at a time. Not sure how it's implemented in extender, I reckon calculating and updating every second of that 1h in OXC would be a computational overkill. If I understood correctly this method wouldn't be older hardware friendly so making it optional, like other extender features, would be required.

Think that's it, hope I made more sense. I really wouldn't bother anyone with this if I didn't believe it's worth it.
(look at that, a double negative, anyone else get confuded by those sometimes?)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #4 on: October 19, 2020, 03:52:31 pm »
Honestly, you're not making any sense.

Reason is because difference between 1 and 5 secs is actually pretty significant (more so on higher increments), both functionally and visually, when implemented as in TFTDextender. In favor of 1 sec of course. Don't think it would break compatibility or anything, unless OXC does not support clock precision bellow 5 sec in its savegames. Guess #1 is off the table in that case.

Have you seen the 1sec implementation anywhere?
Do you know how the TFTDextender works?
How can you say it will have any significant impact?

Don't post random guesses please... you are confusing yourself and all who will read it in the future.

Also "1sec" and "5sec" ARE the increments... saying "1sec" increment will work better on higher increments just makes no sense at all man.
It's the same as saying "Going at speed 10 km/h works best if you go at 300 km/h".
Either we have a language barrier here, or you're not paying attention to what you're saying.

In short: terminator moves smoothly in all cases, even when for example increment is set to 1h while Clock Speed it set all the way left (250ms).

That is absolutely NOT true! Dude you make my blood boil.
With clock speed all the way left (250ms), the game refreshes the state only 4 times a second and it is visibly stuttering like crazy, on all increments (5sec, 1min, 5min, 30min, 1hr, 1day)
DO NOT USE THIS SETTING.... that is what makes your game not smooth.

Not sure how it's implemented in extender, I reckon calculating and updating every second of that 1h in OXC would be a computational overkill. If I understood correctly this method wouldn't be older hardware friendly so making it optional, like other extender features, would be required.

All games use exactly the same calculation in the background, xcom, xcom+extender and also openxcom.
The game internally ALWAYS calculates in 5 second intervals... it is NOT a computational overkill, it is always done, on each increment setting.
Here's the proof and explanation: https://github.com/OpenXcom/OpenXcom/blob/master/src/Geoscape/GeoscapeState.cpp#L622

Globe (picture) update on the other hand is done based on selected increment and configured clock speed.

Your hardware is also NOT a problem... even on very old PCs, this is no issue (assuming reasonable video settings).
When I said "extra slow devices", I meant things like super old phones, consoles or any other exotic hardware... your 15-year old PC is just fine.

Bottomline:

- if you want to increase "smoothness", increase the clock speed (move slider more to the right).... again DO NOT MOVE SLIDER TO THE LEFT, EVER... that is a sure way to decrease "smoothness" rapidly (regardless of chosen increment)

- if you want to decrease the "speed", use the increments (5min, 1min, 5sec, etc.)... "30min" is faster, "5sec" is slower

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #5 on: October 19, 2020, 04:29:24 pm »
Sleepless nights over 6.7? Take it ez dude.
You gotta understand newcomers aren't proficient with the program like you are. When you take everything I said word-for-word and immediately attack what doesn't make sense constructive discussion becomes difficult. I hoping that's tiredness or stress coming outta you.

I don't feel like continuing this right now, not that's there is anything left to continue. Thanks for a definitive answer I guess. For what it's worth have a nice day :)

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #6 on: October 19, 2020, 05:10:43 pm »
Sleepless nights over 6.7? Take it ez dude.
You gotta understand newcomers aren't proficient with the program like you are. When you take everything I said word-for-word and immediately attack what doesn't make sense constructive discussion becomes difficult. I hoping that's tiredness or stress coming outta you.

I don't feel like continuing this right now, not that's there is anything left to continue. Thanks for a definitive answer I guess. For what it's worth have a nice day :)

Yes, very likely stress speaking.
Sorry about that.


But please also you need to understand that when you say something which is completely wrong (I'm referring to my response in red), I must react so that the misinformation does not spread.
I've seen too much misinformation spread in the past and it's not nice... only leads to more stress.


I'm happy to continue constructive discussion, but I do need to make things clear(er)... there is no constructive discussion if people see/understand the same thing completely differently.
I understand you don't want to make a video or screenshots of your issue, but you are making it very hard for me to help you...
...and then when you say that with 250ms refresh rate everything is "smooth"... we hit a concrete wall... we can't continue talking if you say it's "smooth" and I say it's the "opposite of smooth".

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #7 on: October 21, 2020, 04:42:25 pm »
Alright, we're back in business!
Sorry for any confusion on my part, certainly wasn't the intent. Mostly language barrier combined with overly technical nature of describing the problem. Kinda amusing to see how it went down when I look at it now. No hard feelings here, water under bridge as far as I am concerned. Okay enuff with the girly stuff.

In TFTDextender: when 5 SEC is selected game seemingly updates itself and clock in 1 sec increments (see end of post). With faster selections game seemingly updates in 5/10sec/1min increments (but still smoothly) and so on. Not every clock selection updates in 1 sec increments (that was wrong on my part) but just enough so everything appears to move smooth (terminator and ships).
When I talked about the smooth terminator in earlier post I was already envisioning ideal OXC implementation, not describing how it currently works, lol. Should have been more clear I guess.

Here, you made me create a video for the first time in over a decade. Thankfully it wasn't a hellish nightmare I expected. Is a bit rough (1st and only take) but should get the point across. If not I can demonstrate further, or send you my configured game package for personal private tests (dunno if TFTDextender works in Win10 though).
As for advantages of this method, I didn't want to go further before getting a green light to continue in this topic. So I just stated what I  believe to be true, to seduce your imagination if you will. Here it comes now:

Functionally
1) More time to react when there are 4-5 fast enemy ships flying around. Under 5 SEC in TFTDextender time goes slow, about 5 in-game secs passes in 1 real world sec. Sufficient to handle all them fast ships instead of reacting when they half-way across the continent and you're using ships that use rare/expensive fuel (noticed a trend where modders even reduce Elerium rewards by 50%). Compared to default time passage of ~5 in-game minutes in 1 sec it's quite the difference. Slowing geoscape clock currently functions the same but passage of time is annoyingly chunky AF in all other situations.
2) In 1 HOUR chunks it could happen to have enemy ship land and take off without player even noticing it, more so when slider is set further right. Recently noticed this in X-Piratez where a ship was flying so damn slow but for a long time that I couldn't afford to tail it and it could have very well have landed and took off (currently mod doesn't allow landed notification).
3) It is easier to predict where ships came from, where they're going, and send interceptors accordingly, when everything is running smoothly at let's say 1 HOUR setting.

Visually
4) So much easier on the eyes. Helps with terminator position prediction to aim for that borderline night/day mission when you are rushing in with your craft from far away. Just more natural and pleasing to observe stuff in silky smooth motion. There was one more point but I forgot what it was or where it belongs...

Basically, slider left is only good for 1) but sucks for everything else, and slider right is OK-ish for everything else but sucks for 1). TFTDextender somehow compromises and makes it great in all situations (including that forgotten one). We have every conceivable modern OS feature crammed in but we have to put up with Charlie Chaplin motion to be able to react in timely fashion.

Globe (picture) update on the other hand is done based on selected increment and configured clock speed.
Maybe TFTDextender updates Globe every 5 SEC, regardless of selected increment (1 SEC clock is then only graphical)? Seems like a logical conclusion to me. Anyways my humble idea is to satisfy 1)-4) but I know jack on how to go about it.

Thanks for bearing with me through this :)
« Last Edit: October 21, 2020, 04:49:29 pm by Nilex »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #8 on: October 21, 2020, 05:26:20 pm »
So if I understand correctly, smoothness is not a problem at all... you just want another button for increment slower than 5sec (e.g. 1sec or 0.1sec).

Wouldn't a better option then be to allow to stop the geoscape time completely?
I'm afraid someone will ask for 0.01sec and then someone else for 0.001sec, etc.

Basically, slider left is only good for 1) but sucks for everything else, and slider right is OK-ish for everything else but sucks for 1).

IMO slider left sucks for everything including 1).
There is no reason to use slider left, unless you run OpenXcom on a pocket watch from 2003. That's its only purpose... maybe I should remove it from OpenXcom completely.

TFTDextender somehow compromises and makes it great in all situations (including that forgotten one).

A fact:
I'll just repeat that TFTDextender doesn't have a slider (or any equivalent of a slider), it's using a fixed value of the slider.
Your video confirms it.

A few assumptions for the rest:
The only difference (judging only based on the video) is that it allows increments smaller than 5sec... it's called 1sec, but likely it is technically even smaller (hard to say).
Game is still functionally updating only every 5sec, but visually every 1sec (or maybe even more often).



Which option would you prefer?

a/ ability to stop the globe completely

b/ ability to set the increment to 0.1sec (or something like that)

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Couple of newbie questions about basic OXC functionality
« Reply #9 on: October 21, 2020, 06:01:15 pm »
If I can butt in: I wouldn't want a feature to stop time completely. Sure, it's handy, but also it would kinda ruing the game experience. The whole point of Geoscape is that it cannot be stopped (unless at base or some other screen); I'm sure Gollop would have added such an option if it was even remotely intended.

Besides, I cannot imagin a situation where the 5 sec setting could be too fast to anyone.

Online Yankes

  • Global Moderator
  • Commander
  • *****
  • Posts: 3350
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #10 on: October 21, 2020, 07:23:07 pm »
Sure, it's handy, but also it would kinda ruing the game experience.
good point, probably 1s should be minimum in any case allowed, alien invasion will not wait for you :>

[ps]
some could make LP in real life time :D, you wait days for next game event :D
« Last Edit: October 21, 2020, 07:25:35 pm by Yankes »

Offline Nilex

  • Colonel
  • ****
  • Posts: 316
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #11 on: October 21, 2020, 07:34:26 pm »
Not sure how to technically define it. Last thing I'd want is to send you on a wild goose chase resulting in undesired outcome.

a - I don't really care about but I'm sure people would find a use for it. If one could still pan the Globe even when paused then I'd find it useful too. If not, sufficiently similar effect is achieved by opening any menu and in that case it's not desired. Could even cause confusion when people get distracted, return, then find their game unresponsive by forgetting they hit pause and key they use. Additional paused popup window would be preferable for that case... It's getting messy and I'm only thinking about it for 5 mins.

b - Honestly don't know. But if it produces the following effects then great:
1) 5 SEC selection makes 5 in-game secs pass in around 1 real sec (with somewhat comparable speeds to other clock selections in TFTDextender)
2) Terminator and ships move smoothly (just faster) across all clock selections (except DAY because it's purpose is radically different)

As for slider functionality: best left untouched but let it replicate TFTDextender behavior when at default setting of 80 ms. Currently 5 SEC passes around x60 times faster with OXC slider at 80 ms than in TFTDextender. That's my problem. If I slow it down with slider then 3 new problems surface plus it looks ugly.
What I ask is not vanilla behavior (as I quickly became aware) but so are not dozens of OXC features. All it would do is improve gameplay for those slow poke play styles like me.

I don't want anyone thinking I'm demanding stuff left and right. Initially I believed there was a buried config option I could tweak and that would be the end of it. I also don't want it to be forced on people who are used to existing behavior, so in case it was overlooked I mentioned before adding something like "Slow Geoscape Clock" option somewhere. Please don't feel pressured to implement it ASAP, best I could hope for is that it ends on TO-DO.

@Solarus
Optional feature :p
If it were up to Gollop we'd still be galloping over the massive clusterfak of bugs he left for us. Regrettably, after Phoenix Point, guy became a scam artist in my eyes.

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11730
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: Couple of newbie questions about basic OXC functionality
« Reply #12 on: October 21, 2020, 08:44:47 pm »
@Solarus
Optional feature :p
If it were up to Gollop we'd still be galloping over the massive clusterfak of bugs he left for us. Regrettably, after Phoenix Point, guy became a scam artist in my eyes.

Comparing overarching design decisions of a tremendously successful game with unintentional bugs is quite insincere. (And yeah, none of his other games ere successful or even liked, not just PP.)

I'm just saying that such a feature in my view would be harmful, even if "optional".

BTW, I totally understand your position, and I'm not trying to argue with you... Just providing my perspective on the entire thing.
« Last Edit: October 21, 2020, 08:48:09 pm by Solarius Scorch »

Offline Meridian

  • Global Moderator
  • Commander
  • *****
  • Posts: 9099
    • View Profile
Re: Couple of newbie questions about basic OXC functionality
« Reply #13 on: October 21, 2020, 08:56:03 pm »
As for slider functionality: best left untouched but let it replicate TFTDextender behavior when at default setting of 80 ms. Currently 5 SEC passes around x60 times faster with OXC slider at 80 ms than in TFTDextender. That's my problem.

I can't let it replicate TFTDextender functionality, we want it to replicate the vanilla UFO functionality... otherwise all vanilla UFO players will kill us.

Btw. I did some measurements, and vanilla UFO seems to use the 100ms setting (=10 fps).
At that setting the time was passing at exactly the same speed in UFO and in OpenXcom.

OpenXcom's default setting (80ms) is just 1.25x faster than vanilla... not 60x faster :)
Here's a video, just for fun:


I'll put it on todolist to make some hidden setting for you... for now I close the discussion from my side as "working as intended and expected".