Commit Graph

73 Commits

Author SHA1 Message Date
Paul Chote
bfddfec461 Replace magic numbers with an OrderType enum. 2019-06-20 22:50:17 +02:00
teinarss
d9d2202599 System messages should be yellow to distinguish them from normal 2019-04-27 14:51:59 +02:00
jrb0001
f3133617dd Prevent immediate orders from being sent as regular orders 2019-04-23 01:00:52 +02:00
Paul Chote
1f3b30c2d2 Implement game save/load backend. 2019-04-20 14:54:48 +02:00
Paul Chote
ab4a7e3558 Replace System.Drawing primitives with our own. 2019-03-04 18:26:42 +00:00
abcdefg30
cadbd0d9ab Change the year number in all cs headers from 2018 to 2019 2019-01-26 23:15:21 +01:00
Paul Chote
cc707f0037 Disable MP sync report generation by default.
A new Server.EnableSyncReports option is provided
so that server operators can restore them remotely
in the event of a future desync bug.
2018-12-15 23:30:36 +01:00
Paul Chote
081182b60f Profile sync report generation separately. 2018-12-15 23:30:36 +01:00
Paul Chote
8533aa8d26 Disable sync reports when we know we won't need them.
Generating the sync report takes ~twice as long as
a normal tick, and occurs once every 3 ticks.

These reports record of all of the synced state
(separate to the sync hash, which is still calculated)
in order to generate the syncreport.log of the game
desyncs. This perf overhead is completely unnecessary
when we know that we won't have other syncreports to
compare against (singleplayer, replays).

Disabling report generation in these cases gives
us an easy 40% average tick-time win.
2018-09-10 19:44:06 +02:00
Arular101
8a60918841 Update copyright notice year to 2018 2018-01-17 00:47:34 +01:00
Paul Chote
f2e6601e07 Remove legacy MP lobby mod and replay switching logic. 2017-02-11 16:45:18 +00:00
Paul Chote
2da4e87b94 Implement new server-connection mod switching logic. 2017-02-11 16:21:34 +00:00
Taryn Hill
43317e0f5d Update copyright notice year to 2017 2016-12-31 23:46:13 -06:00
RoosterDragon
2ffea5db54 Change Game.RunTime to a long to prevent overflow. 2016-09-20 19:06:10 +01:00
Paul Chote
e71225496b Clarify GPL version. 2016-02-21 16:30:48 +00:00
Paul Chote
b396965fd9 Update licence header year. 2016-02-21 16:27:31 +00:00
RoosterDragon
89f5a23077 When dumping the sync report, log all the orders issued in the frame that desynced. 2015-08-09 20:59:59 +01:00
RoosterDragon
709befda08 Sync only once per tick, rather than once per tick and once per order.
This greatly improves performance by not syncing the world state for every single order processed as this becomes very expensive, at the cost of being unable to directly pinpoint the order that causes a desync. Instead the granularity of detecting desyncs is reduced to the tick level.
2015-08-09 20:58:20 +01:00
abcdefg30
8ca61aa917 Updated all year numbers 2015-01-09 21:18:05 +01:00
Paul Chote
96b5b1fc66 Automatically switch mods when connecting to a server / replay. 2014-12-23 09:20:21 +13:00
Matthias Mailänder
95a4248419 StyleCop clean OrderManager 2014-11-01 21:46:19 +01:00
Oliver Brakmann
36b5097fa0 Cache chat conversations in the lobby and in-game
This preserves the chat content from the lobby and makes it available
in-game, and also makes all chat content available to the end-game
dialog.
2014-09-26 07:18:33 +02:00
Alexander Fast
070d00c678 Fixes year numbers in license text in file headers. 2014-08-21 11:27:52 +02:00
Pavlos Touboulidis
b88b87b899 Improve game loop
Environment.TickCount was replaced with Game.RunTime that's based on
Stopwatch for increased accuracy.
2014-07-10 04:06:29 +03:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
RoosterDragon
a598a01108 Fixed IDisposable implementation and usage.
- Implement IDisposable interface correctly, with sealed classes where possible for simplicity.
- Add using statement around undisposed local variables.
2014-06-10 11:23:55 +01:00
Chris Forbes
5eb61dbdd2 Merge pull request #5411 from RoosterDragon/general-clean
General Cleanup
2014-05-25 11:03:03 +12:00
Pavlos Touboulidis
5a286ef15e Fix #5414 2014-05-23 19:08:45 +03:00
RoosterDragon
b733465f33 General uncontroversial cleanup:
- Made private methods static where possible (runtime can elide checking the object for null).
- Declared attribute classes as sealed (allows reflection on attributes to complete faster).
- Moved some static cctor's into field initializers (static cctor's are slower than static field initializers).
- Made classes static if they contained only static methods (can't create instances of useless objects).
- Use inferable Exts.Lazy and not new Lazy<T>().
- Added required STAThread attribute to CrashDialog.
- Removed unused parameters in private methods.
- Added Serializable attribute to exceptions.
- Added parameter name in calls to ArgumentNullException.
- Use of as operator instead of is + cast.
- Changed (x as Foo).Bar anti-pattern into ((Foo)x).Bar. Results in sensible cast exceptions on error rather than null dereferences.
- Removed unused method in NullShader.
2014-05-23 15:50:54 +01:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
6d6d1e230b Remove runtime mod merging. Closes #3421. 2013-11-15 09:54:42 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Matthias Mailänder
b618fc7cc2 complete password protected servers
closes #2290
2013-10-07 19:37:12 +02:00
Matthias Mailänder
e9b2bcc579 fix some plenks
no logic changes
2013-06-21 18:05:30 +02:00
Matthias Mailänder
65088ea2d5 display the last ServerError in the connection failed dialog
closes #2727
2013-06-21 18:04:40 +02:00
Paul Chote
096d95f391 Fix bogus pause logic. 2013-04-07 23:38:52 +12:00
Matthias Mailänder
76644537e2 give the users some hints when crashing due to desync 2013-03-03 19:34:10 +01:00
Remco van der Zon
a07697be03 Pause the game option.
Game is paused when PAUSE on the keyboard has been hit. It can also be unpaused this way.
2012-05-16 17:35:10 +02:00
Chris Forbes
bc6af1841b fix indents everywhere 2011-10-18 15:10:17 +13:00
Chris Forbes
55036cd58c fix trailing whitespace everywhere 2011-09-26 08:40:39 +13:00
Paul Chote
b0425aff3b Renormalize line endings and fix copyright headers again. 2011-04-07 21:15:42 +12:00
Chris Forbes
82dea40261 provide a way to grab the laggy clients 2011-03-12 22:55:40 +13:00
Paul Chote
094907c1a9 Update copyright header. Normalize line endings to LF. 2011-02-13 10:38:57 +13:00
Paul Chote
06612d0f68 Add a mechanism for custom drop messages. Implement for kick. 2011-01-15 13:49:46 +13:00
Paul Chote
40b0408ce7 Fix #453. Bogus crash when desyncing. 2011-01-05 13:09:25 +13:00
Chris Forbes
1409016cbd (gecko) Allow mods to override order validation 2010-11-05 19:48:26 +13:00
Bob
3df310df6e halve bandwidth usage 2010-10-16 22:25:31 +13:00
Bob
c2b3a749ca change IConnection interface wrt sending 2010-10-16 21:05:14 +13:00
Bob
7ca9fcdac9 run the shellmap even while the lobby shows. remove Widget.SpecialOneArg 2010-10-12 18:33:16 +13:00
Bob
20276291ce move Game.world onto OrderManager. use call IssueOrder on world and/or on orderManager, not on Game 2010-10-12 17:30:27 +13:00