Commit Graph

102 Commits

Author SHA1 Message Date
Matthias Mailänder
ea4cde0da8 document DomainIndex 2014-06-21 12:37:04 +02:00
RoosterDragon
22abf9b4c4 Remove and sort usings. 2014-06-18 21:43:35 +01:00
ScottNZ
90894aa03e Use var everywhere 2014-06-15 22:17:34 +12:00
ScottNZ
dbffce81a6 Remove unused usings 2014-06-15 22:16:40 +12:00
Pavlos Touboulidis
c282fa1077 Move GetTerrainIndex/Info from WorldUtils to Map 2014-06-13 13:57:32 +03:00
Pavlos Touboulidis
092352729f Change terrain type from string based dictionaries to arrays 2014-06-13 11:20:54 +03:00
Pavlos Touboulidis
0eac2afff4 Assign world from the constructor and make the field readonly 2014-05-17 14:33:17 +03:00
Pavlos Touboulidis
63ec6d60e7 Refactoring to remove static Rules & SequenceProvider 2014-05-17 14:32:03 +03:00
Pavlos Touboulidis
c28faffa45 Remove custom Stopwatch wrapper
Remove the redirection (that doesn't offer any new functionality)
and replace it with the familiar System.Diagnostics.Stopwatch.
2014-04-26 23:58:18 +03:00
Pavlos Touboulidis
035834978d Make Stopwatch.ElapsedTime() a property and TimeSpan 2014-04-23 00:56:07 +03:00
Paul Chote
4935266945 Merge FileFormats dll into Game and reorganise namespaces. 2014-04-17 01:20:47 +12:00
Paul Chote
50d89629a2 Add BuildableTerrainLayer and LaysTerrain traits. 2014-03-18 15:28:49 +13:00
Paul Chote
20b88fd904 Remove World.FrameNumber. 2014-03-12 17:19:29 +13:00
ScottNZ
0a9a959ecf Change spacebar key to move to the last visible radar ping location 2014-02-22 00:07:54 +13:00
ScottNZ
2a8efde8e6 Add map beacons and radar pings 2014-02-22 00:07:53 +13:00
Paul Chote
8c7f77d2c7 Convert SmudgeLayer to sequences. 2013-12-11 22:53:33 +13:00
Paul Chote
473f8dfbb8 Fix an off-by-one error in SmudgeLayer. Fixes #4139. 2013-12-03 18:16:40 +13:00
ScottNZ
1394c1dcee Remove some misc redundancies 2013-11-12 19:39:39 +13:00
ScottNZ
f1f1a2b166 Add missing license notice to ResourceClaim.cs 2013-11-12 19:39:38 +13:00
ScottNZ
00ec1ca87a Remove unused usings 2013-11-12 19:39:33 +13:00
Paul Chote
d864989c19 Tidy PathfinderDebugOverlay. 2013-10-14 21:18:50 +13:00
Paul Chote
68cd537c9b Rename DebugOverlay -> PathfinderDebugOverlay. 2013-10-14 21:16:46 +13:00
Paul Chote
97a42e7d43 Fix A* debug overlay in D2K. 2013-10-14 21:14:21 +13:00
Paul Chote
919181e04d Clean up viewport internals. 2013-10-05 21:01:22 +13:00
Paul Chote
0b560bfc6e Move more viewport lookups to WorldRenderer. 2013-10-05 21:01:21 +13:00
Paul Chote
3002c4b77d Use SpriteRenderables for tile overlays. 2013-09-27 15:41:33 +12:00
Paul Chote
aed7f2ace6 Remove PPos and tidy DebugOverlay. 2013-09-27 15:41:32 +12:00
Paul Chote
cad46e43c5 Add WorldRenderer parameter to WorldLoaded. 2013-09-27 15:29:44 +12:00
Matthias Mailänder
ba13c1d982 StyleCop clean Map/*.cs files 2013-08-25 14:30:00 +02:00
Paul Chote
431adcf3a7 Add bounds checking to DomainIndex. Fixes #3599. 2013-08-03 22:09:22 +12:00
Paul Chote
bfaf5446cb Freeze smudges under fog. 2013-07-25 18:11:54 +12:00
Paul Chote
ac7b93d39d Fix SmudgeLayer style nits. 2013-07-25 18:11:53 +12:00
Andrew Aldridge
259e121307 Substantial performance improvement in DomainIndex
* Get rid of HashSets
      * Cache CanTraverseTile()'s terrain offsets
2013-07-12 09:40:59 -04:00
Andrew Aldridge
3fed98fcb1 Add support for bridge construction
Each movement class is given a crude transientDomain graph.  Whenever a bridge state
changes, the domain index rebuilds the relevant cells, setting its domain and creating
a transient domain connection.

This graph is searched as a fallback if the straightforward domain comparison is false.
Behavior needs to be double-checked, and ideally destructing connections would be supported,
but so far performance and behavior on allies-02 seems good.
2013-07-12 09:40:59 -04:00
Andrew Aldridge
ba885907ba Use MobileInfo.GetMovementClass for domain indexing, clearing path for caching and smarter behavior
* Move DomainIndex from being a manual hard-coded hook in World to an IWorldLoaded trait.
2013-07-12 09:40:55 -04:00
Paul Chote
7beef85a64 Use PaletteReferences everywhere. 2013-06-15 19:16:08 +12:00
Paul Chote
3e1c1096c2 Convert Smoke to world coordinates. 2013-05-17 18:12:29 +12:00
Paul Chote
656476991f Replace ColorRamp with HSLColor everywhere.
Fixes:
* Nuclear-purple color exploit.
* #3247.
* Removes a bunch of unnecessary color conversions every frame.

Caveats:
* The ramp range is now defined on the palette, so ramps can no longer be set per-player (may impact maps which define custom colors).
* It's no longer possible to perfectly recreate the original WW color ramps (I doubt we care).
* The old ColorRamp setting isn't migrated, so players will lose their color settings.
2013-05-10 19:23:30 +12:00
Paul Chote
c428cad70c Refactor per-player shrouds & fix shellmap shroud. 2013-04-10 19:36:03 +12:00
Chris Forbes
c5d97fea69 Merge pull request #2738 from Mailaender/a-star
A-star debug overlay
2013-03-10 16:20:34 -07:00
Matthias Mailänder
ba8c9bb1b1 added hidden audio settings to ra/d2k GUI
- video volume
- map music (was shellmap music)
- sound engine
2013-03-10 09:34:15 +01:00
James Dunne
d8c752ecb9 DebugOverlay improvements to only render inside viewing range. 2013-03-10 07:35:36 +01:00
James Dunne
7e913c4bb7 Lame attempts to improve A*. 2013-03-10 07:33:31 +01:00
Matthias Mailänder
2abde381a7 Exposed PathSearch.owner and removed Player argument from PathFinder functions. 2013-03-10 07:33:31 +01:00
Matthias Mailänder
493eb10b96 Now coloring A* cells by owning player color. Added checkbox to cheats menu. 2013-03-10 07:33:25 +01:00
Matthias Mailänder
7d0de5645f Added QuadRenderer to render shaded/colored quads. Added DebugOverlay to World to show A* bidi search cost per cell. 2013-03-10 07:32:35 +01:00
Kenny
f41fb32d60 Introducing per-player shrouds.
- Each player has their own shroud and their visibility does not extend outside of the shroud. 
- Units and buildings can no longer target other units outside of their visibility. Buildings can still be targetted if they have been explored.
- GPS will provide visibility in the fog-of-war.
- Spies that infiltrate radar domes will gain their victim's exploration and reset it on all clients (if the victim does not have GPS)
2012-12-13 15:16:56 -08:00
Matthias Mailänder
d3915ad291 string AcceptsSmudgeType replaces boolean AcceptSmudge
because Dune 2000 has different craters for rock and sand
2012-06-27 13:19:52 +12:00
James Dunne
80123b6aa4 Many harvester behavior improvements; summary below.
Implemented Harvester territory marking with a simple resource claim system in ResourceClaimLayer trait added to World.
Added customCost for PathSearch to support new Harvester search preferences.
Explicit delivery order forces harvester to always deliver to that refinery.
Explicit harvest order frees harvester from forced delivery refinery and allows for auto-balancing.
Harvesters auto-balance refinery choice such that no more than 3 harvesters are linked to any one refinery at a time.
Harvesters try very hard to not block the refinery dock location.
Harvesters try to avoid enemy territory when searching for resources.
Group-select harvest order intelligently disperses harvesters around the order location.
Fixed PathFinder caching to not be a sliding window. This is a correctness issue. Sliding window causes no-route paths to be cached permanently in tight move loops and doesn't allow eventual progress to be made. This may have negative performance implications.
2012-06-24 20:26:00 -05:00
James Dunne
9c49143534 New types for cell and pixel coordinate position/vectors. 2012-06-21 15:36:59 -05:00