bug when playing single player with no competition

Huge cash created results in low stock values

Hello

I have been playing Offworld Trading for a while now, preferring the single-player option, mostly without a competitor which makes for an awesome, relaxing game!

However, last night I opted to leave the game running overnight, mostly to see if I could get out of debt, given a long enough time. I woke up to find I had made around 800 000K with the debt level at 60 000K and a stock price of about 220. I started reducing my debt 10 000 at a time which slowly increased my stock price.

Then came the bug: I opted to pay off ALL my debt, which normally results in an increase in the stock price - however, this time it plummeted all the way down to 30 instead of rising - and has sat at 30 ever since, despite my company cash standing at 870 000K and zero debt.

I started my next game, which I also ran overnight, I made 2 billion, which suddenly went into a negative value, with a stock value that dropped to 1.



It is possible I am misunderstanding something - but I suspect a bug...

Many thanks

54,934 views 7 replies
Reply #1 Top

That sounds like an overflow bug.  If I can reproduce it, I should be able to fix it (or at least clamp the arithmetic).  Thanks for reporting it!

                                                                                           Jason Winokur

Reply #2 Top

Hi Jason

At least you should have fun reproducing it ! Let me know if I can supply other data for you - incidentally, the 2 games mentioned were played with different companies.

Cheers

Gray

Reply #3 Top

I found the cause of your two cases.  As suspected, they are both integer overflow bugs.  Normal integers can hold values in the range of −2,147,483,648 to 2,147,483,647, so it makes sense that your money went negative when it went past $2 billion.  The stock price overflows around $800 million because there's an intermediate multiplication by 3 during the stock price calculation.  I've changed both places to use 64-bit integers, which have a much larger range of values.  Would you like to playtest the new changes so you can report any other values that overflow?

                                                                              Jason Winokur

Reply #4 Top

Hi Jason

what do I need to do? - btw, I have yet to get an email telling me that somebody replied to my question - hence the delay with me replying...

I do have both tick boxes ticked... maybe tap the shoulder of your sysadmin?

 
Cheers
Gray
+1 Loading…
Reply #5 Top

I'll PM you the Beta password.  If you find more bugs, post them in this thread.  Thanks for helping improve Offworld!  P.S. I don't get e-mail notifications, either :(

                                                                                    Jason Winokur

Reply #6 Top

Hello Jason - so I started a game and then left it running overnight. The problem seems solved - numbers update correctly as best I can see without my morning coffee !! My only problem now is what to do with my extra claims O:) Screenie attached below.

Thank you for fixing this :)