Author Topic: Update on Progress  (Read 256888 times)

0 Members and 2 Guests are viewing this topic.

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Update on Progress
« Reply #495 on: February 28, 2020, 01:31:04 AM »
I mostly just find it to be unpleasant to be honest.
 
The following users thanked this post: Alucard, Jovus

Offline xenoscepter

  • Vice Admiral
  • **********
  • Posts: 1157
  • Thanked: 318 times
Re: Update on Progress
« Reply #496 on: February 28, 2020, 01:37:53 AM »
Late March? Praise Kerensky!
 

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11681
  • Thanked: 20482 times
Re: Update on Progress
« Reply #497 on: February 28, 2020, 02:42:19 AM »
Just spent a couple of hours bug-hunting.

I couldn't understand why my geological survey ships seemed to be choosing asteroids at the far side of the system when auto-surveying. Couldn't find anything wrong with the code that selects the next body and it has been working for years anyway. I reset their courses a few times and it kept happening. Then I suddenly noticed almost straight after I set a course for one ship, the asteroid the ship was heading to wasn't there any more. After searching, I realised the asteroid had moved to the far side of the system. It quickly became apparent that the survey selection code was fine, but the asteroids themselves were changing to a mirror-image location during some orbital movement phases. Only asteroids - not planets. As they both used the same orbital movement code that was extremely weird.

I starting stepping through the code and realised the asteroids were orbiting at insane speed. More checks needed. Then I checked the database and realised that every asteroid in the game, except in the starting system, had an orbital period of one hour, regardless of distance. I checked the asteroid creation code and couldn't find a problem with the code that created the year length. The only situation in which the asteroid would be set to a one-hour year is if the orbital distance was zero. After more head scratching and code-stepping I finally realised that at some point during the code modifications to add star system design, I had accidentally moved the year-length algorithm after the orbital distance generation code, but only for asteroids, not planets. That meant that when the year-length algorithm ran for asteroids, the distance was still zero and the code selected one hour as the year. That one-hour year was causing the mirror-flipping for asteroids, which in turn was sending my geosurvey commanders insane :)

Sometimes bug-hunting can be a little obscure :)

I love bugs that require the fine tooth comb to figure out.  Your brain spends the whole time screaming this is stupid, wtf, why is this even a possible outcome?, and everything you check is correct, except one thing and while its wrong, the code that set it that way is correct, so you have to keep going up the ancestry of the strange values, until you see it and facepalm - far too often it warrants it, you've done a stupid that didn't seem it at the time, lol, quickly followed by curse you past me, you caused this dammit.

I have to confess to a certain satisfaction when I track a down a particularly strange bug :)
 

Offline amram

  • Lieutenant
  • *******
  • a
  • Posts: 154
  • Thanked: 79 times
Re: Update on Progress
« Reply #498 on: February 28, 2020, 03:11:14 AM »
snip...

snip...

I have to confess to a certain satisfaction when I track a down a particularly strange bug :)

Definitely.  Anytime I find a solution to something that has me stumped I'm inevitably in a much better mood, not just the removed malus of having an unresolved issue become resolved, but there's definitely a boost from solving it.

Both bugs and finding a way to implement something I was having difficulty conceptualising in a way that was feasible can do it I find.
 

Offline TMaekler

  • Vice Admiral
  • **********
  • Posts: 1112
  • Thanked: 298 times
Re: Update on Progress
« Reply #499 on: February 28, 2020, 07:00:44 AM »
Wait until first release and touchdown with the userbase. What bugs we will uncover might (hopefully not, but I am a realist) become a nightmare...  ??? ;)
 

Offline db48x

  • Commodore
  • **********
  • d
  • Posts: 641
  • Thanked: 200 times
Re: Update on Progress
« Reply #500 on: February 28, 2020, 08:55:24 AM »
I love bugs that require the fine tooth comb to figure out.  Your brain spends the whole time screaming this is stupid, wtf, why is this even a possible outcome?, and everything you check is correct, except one thing and while its wrong, the code that set it that way is correct, so you have to keep going up the ancestry of the strange values, until you see it and facepalm - far too often it warrants it, you've done a stupid that didn't seem it at the time, lol, quickly followed by curse you past me, you caused this dammit.

I have to confess to a certain satisfaction when I track a down a particularly strange bug :)

I love debugging stories like this too.

Aurora is a Windows program, so I know that this isn't going to help you much at all, but on Linux there's a debugger called rr that can really help in situations like this (rr-project.org). rr records the entire execution state of a program (slowing the program down by about 40%, which in practice is rarely a problem), and allow you to deterministicly replay that recording as many times as you need in order to hunt down the bug. It also allows you to run the program in reverse. You could set one memory watchpoint on the orbital period for an asteroid and and another on the orbital distance, then run the program backwards until one of them changed. This would have lead you right to the problem with no fuss and no need for deduction. It's essentially a superpower.

There's another level to this as well, because there's a commercial product called Pernosco (https://pernos.co/) that takes an rr recording and presents it as a queryable database rather than as the traditional debugger. It can give you a timeline of the dataflow of a value, or of several values, which would make this bug even clearer.

So why do I mention it? Microsoft has started adding a similar feature to MSVC. It's not cheap, but you might want to check it out anyway: https://devblogs.microsoft.com/visualstudio/introducing-time-travel-debugging-for-visual-studio-enterprise-2019/
 

Offline sloanjh

  • Global Moderator
  • Admiral of the Fleet
  • *****
  • Posts: 2805
  • Thanked: 112 times
  • 2020 Supporter 2020 Supporter : Donate for 2020
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Update on Progress
« Reply #501 on: February 28, 2020, 09:42:15 AM »
Just spent a couple of hours bug-hunting.

I couldn't understand why my geological survey ships seemed to be choosing asteroids at the far side of the system when auto-surveying. Couldn't find anything wrong with the code that selects the next body and it has been working for years anyway. I reset their courses a few times and it kept happening. Then I suddenly noticed almost straight after I set a course for one ship, the asteroid the ship was heading to wasn't there any more. After searching, I realised the asteroid had moved to the far side of the system. It quickly became apparent that the survey selection code was fine, but the asteroids themselves were changing to a mirror-image location during some orbital movement phases. Only asteroids - not planets. As they both used the same orbital movement code that was extremely weird.

I starting stepping through the code and realised the asteroids were orbiting at insane speed. More checks needed. Then I checked the database and realised that every asteroid in the game, except in the starting system, had an orbital period of one hour, regardless of distance. I checked the asteroid creation code and couldn't find a problem with the code that created the year length. The only situation in which the asteroid would be set to a one-hour year is if the orbital distance was zero. After more head scratching and code-stepping I finally realised that at some point during the code modifications to add star system design, I had accidentally moved the year-length algorithm after the orbital distance generation code, but only for asteroids, not planets. That meant that when the year-length algorithm ran for asteroids, the distance was still zero and the code selected one hour as the year. That one-hour year was causing the mirror-flipping for asteroids, which in turn was sending my geosurvey commanders insane :)

Sometimes bug-hunting can be a little obscure :)

I love bugs that require the fine tooth comb to figure out.  Your brain spends the whole time screaming this is stupid, wtf, why is this even a possible outcome?, and everything you check is correct, except one thing and while its wrong, the code that set it that way is correct, so you have to keep going up the ancestry of the strange values, until you see it and facepalm - far too often it warrants it, you've done a stupid that didn't seem it at the time, lol, quickly followed by curse you past me, you caused this dammit.

I have to confess to a certain satisfaction when I track a down a particularly strange bug :)

One of my standard interview questions is "what's your favorite bug you've ever encountered".  I'm looking for stories like this that show a high GQ (Geek Quotient).

John
 
The following users thanked this post: Alsadius

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11681
  • Thanked: 20482 times
Re: Update on Progress
« Reply #502 on: February 28, 2020, 10:13:28 AM »
- far too often it warrants it, you've done a stupid that didn't seem it at the time, lol, quickly followed by curse you past me, you caused this dammit.

I even leave comments in the code along the lines of "Dear Future Me. I know this code looks odd but let me explain..." :)
 
The following users thanked this post: hyramgraff, Alsadius, Kiri

Offline Bughunter

  • Bug Moderators
  • Rear Admiral
  • ***
  • Posts: 929
  • Thanked: 132 times
  • Discord Username: Bughunter
Re: Update on Progress
« Reply #503 on: February 28, 2020, 03:18:31 PM »
I even leave comments in the code along the lines of "Dear Future Me. I know this code looks odd but let me explain..." :)

I usually want to send messages in the other direction when looking at old code but didn't figure out how yet.
 
The following users thanked this post: db48x, Kyle

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11681
  • Thanked: 20482 times
Re: Update on Progress
« Reply #504 on: March 06, 2020, 07:43:07 AM »
I've just caught up with the chat on the Discord so I thought it would be worth giving an update.

I still plan to release at the end of March, assuming no unforeseen circumstances. I'm actually picking up my new motorhome on Tuesday next week and I will be away for a few days, although probably still answering on forums as we have 4G in the motorhome. We will be probably be away at weekends, etc. but I will still be at home for most of the last two weeks in March.

The BSG campaign has stalled a little. A lack of time in the last few days, plus in hindsight it was not a good idea to create such a complex setup when I am trying to test specific things in a relatively short period, although it did allow me to test the system design code. Therefore, I am going create a new campaign this weekend with a multi-start in Sol (one player race and 2-3 NPRs). I'll probably go back to the Space 1889 campaign I once ran and have Venus and Mars as alien worlds.

Offline razanon

  • Petty Officer
  • **
  • r
  • Posts: 22
  • Thanked: 2 times
Re: Update on Progress
« Reply #505 on: March 13, 2020, 10:34:30 AM »
Steve, can you free your game now? at this state? here in Spain just called the "State of Alarm" and having your game to spend that 15 days enclosed at home, will be like a cure.

:)
 
The following users thanked this post: Mastik

Offline Steve Walmsley (OP)

  • Moderator
  • Star Marshal
  • *****
  • S
  • Posts: 11681
  • Thanked: 20482 times
Re: Update on Progress
« Reply #506 on: March 13, 2020, 02:03:18 PM »
Steve, can you free your game now? at this state? here in Spain just called the "State of Alarm" and having your game to spend that 15 days enclosed at home, will be like a cure.

:)

No, its not ready yet. I've just spent a week in the UK collecting my new motorhome, so I need to run my new campaign, test diplomacy, create an install program and get the obfuscation working in the new two weeks.
 
The following users thanked this post: V1D0, bro918, BigBacon

Offline Nori

  • Bug Moderators
  • Lt. Commander
  • ***
  • Posts: 234
  • Thanked: 42 times
  • Discord Username: Nori Silverrage
  • Bronze Supporter Bronze Supporter : Support the forums with a Bronze subscription
    2021 Supporter 2021 Supporter : Donate for 2021
Re: Update on Progress
« Reply #507 on: March 13, 2020, 05:42:23 PM »
Steve, can you free your game now? at this state? here in Spain just called the "State of Alarm" and having your game to spend that 15 days enclosed at home, will be like a cure.

:)

No, its not ready yet. I've just spent a week in the UK collecting my new motorhome, so I need to run my new campaign, test diplomacy, create an install program and get the obfuscation working in the new two weeks.

That'll only take a few hours right?  :P
 

Offline Jorgen_CAB

  • Admiral of the Fleet
  • ***********
  • J
  • Posts: 2837
  • Thanked: 673 times
Re: Update on Progress
« Reply #508 on: March 13, 2020, 08:25:40 PM »
Steve, can you free your game now? at this state? here in Spain just called the "State of Alarm" and having your game to spend that 15 days enclosed at home, will be like a cure.

:)

No, its not ready yet. I've just spent a week in the UK collecting my new motorhome, so I need to run my new campaign, test diplomacy, create an install program and get the obfuscation working in the new two weeks.

Please Steve... take your time... we have waited thus far so we can probably wait a few weeks or even months if necessary...

C# seem to shape up to an amazing game and I will wait for as long as it takes, I can keep fantasise about my next campaign... which will not start immediately... most likely after the first or second patch...   ;)   ...as a programmer myself I know there always are tweaks and bugs to fix... ALWAYS...
 
The following users thanked this post: QuakeIV, zenfiero, bro918

Offline QuakeIV

  • Registered
  • Commodore
  • **********
  • Posts: 759
  • Thanked: 168 times
Re: Update on Progress
« Reply #509 on: March 13, 2020, 08:32:51 PM »
Do what you gotta do, I can understand adding more obfuscation.  It sounds like you are close to release though so I would not personally dissuade you from that track.
 
The following users thanked this post: bro918