Commit Graph

291 Commits

Author SHA1 Message Date
Mark Vejvoda c4cbdd86e3 - disabled will's visible quad code as i cannot get it to work when rotating around with the camera. Bugfix for normal camera visible quad so we don't get black spots when moving camera around. Bugfix for menu keyboard entry if we get a bad utf8 conversion character 2011-08-30 18:28:30 +00:00
Mark Vejvoda 2c80543889 - attempt to group command execution so units given the same command at the same time will work more smartly (closer units go first and so on) 2011-07-05 04:37:35 +00:00
Titus Tscharntke 6fdc8db138 switching off random pathfinding intervals becasue it causes unit "warping" while walking ( more see forum ) 2011-06-26 23:51:37 +00:00
Mark Vejvoda 1700cbba2d - working implementation of particles for new attack-boost xml tag 2011-06-25 20:44:46 +00:00
Titus Tscharntke 105e639bd8 Mega also scouts to random ressource places .Only first tech type ressource is used to navigate now (which is typically gold) more improvement needed regarding this aspect ;pathfinder back to 900 2011-06-25 18:14:20 +00:00
Mark Vejvoda d0d31e4bfe - updated pathfinder to randomize better the pathfinder refresh rate in an attempt to have better performance when we have lots of units 2011-06-24 19:40:47 +00:00
Titus Tscharntke 7344250c5c well formatted change from 2367 again 2011-06-24 16:18:10 +00:00
Titus Tscharntke 1de2d5340d revert to 2366 2011-06-24 16:14:39 +00:00
Titus Tscharntke e58ddd35b4 fixes build bug reported in forum/ adds some better mega-cpu behaviour / fixed some bugs ( I hopefully did not added new ones :-D ) 2011-06-20 23:51:13 +00:00
Titus Tscharntke f5418efa8a deeper pathfinding ( lets see how much it effects performance ) 2011-06-20 23:48:59 +00:00
Mark Vejvoda 95755ad832 - update new version # 3.5.3 (possible bugfix release)
- updated some pathfinder settings to see if performance and reaction to attacking is better
2011-06-02 07:09:19 +00:00
Mark Vejvoda e221011af2 - bugfixes so that the mingw compile builds 2011-05-24 22:51:45 +00:00
Mark Vejvoda 60b8093f5b - attempt to get non ascii file paths working in megaglest (Japanese etc...) 2011-05-18 21:49:11 +00:00
Mark Vejvoda 070b8b76e6 - more AI enhancements to better handle repair and build positions 2011-05-01 07:24:37 +00:00
Mark Vejvoda efc6b7ee1d - ensure a good number of AI workers particpate in the repairing of castles 2011-05-01 06:02:49 +00:00
Mark Vejvoda f71f83d2b8 - bugfix for AI repairing fixes a long standing legacy bug where the AI never repaired units with a cell map starting with a 0 at the first x,y in the cellmap (like magic faction). 2011-05-01 05:36:04 +00:00
Mark Vejvoda ae9d20a6cf - bugfix for new AI repair logic to properly detect damaged castle type units 2011-05-01 03:23:15 +00:00
Mark Vejvoda c979ea1254 - more AI enhancements, now units that harvest AND attack will be more wise when choosing to attack, (think persian) since they need to harvest more than they need to attack when harvester count is very low.
- AI Units now place higher priority on repairing 'castle' style units when looking for something to repair.
2011-04-29 23:42:16 +00:00
Mark Vejvoda d297a68b36 - bugfix for AI players to ensure the unit they want to repair has another unit that is able to repair it before trying to repair a damaged unit so the AI doesn't waste time. 2011-04-29 05:37:35 +00:00
Mark Vejvoda 47ef05ceed - attempt to improve pathfinder performance and lengthen max nodes to 900 2011-04-26 21:51:18 +00:00
Mark Vejvoda 016771ed81 - adjust camera angle for more properly unit visibility calc
- more accurate unit titles when debugging
2011-04-18 16:51:30 +00:00
Mark Vejvoda 3617603fde - try to lower max pathfinder nodes to see if it makes smoother game play 2011-04-18 04:07:39 +00:00
Mark Vejvoda a04557ee7f - set pathfinder values back to be compatible with beta2 2011-04-14 03:27:34 +00:00
Mark Vejvoda 06fb3decda - added some code for possible future use to improve pathfinder (not for this release) so disabled right now 2011-04-14 02:51:13 +00:00
Mark Vejvoda d8c337ae7b - bugfix for resource usage checking
- added new techtree validation in validation report to tell if a techtress has resources that are ununsed by the techtree
2011-04-06 17:50:20 +00:00
Mark Vejvoda 99f7038a86 - added logic for AI players to ignore resources that they cannot harvest and are not unit requirements. 2011-04-06 15:44:33 +00:00
Mark Vejvoda a48406a592 - attempt to fix bailout pathfinding logic to have better performance 2011-04-04 04:32:01 +00:00
Mark Vejvoda cd952fcda0 - updated world synch debug calls to only log outside of faction pre-calculated pathfinding 2011-04-03 02:42:45 +00:00
Mark Vejvoda 623dfe7aa5 - updated pathfinder max to 400 2011-03-31 19:08:52 +00:00
Mark Vejvoda 0e9cf65e70 - more code cleanup (removal of dead code that is no longer used)
- fix the icon for wartime mechanic's heal command
2011-03-29 16:27:01 +00:00
Mark Vejvoda c58f338d1b - clear pathfinder precache for units when they die to free memory sooner 2011-03-29 10:01:01 +00:00
Mark Vejvoda 3ed636aae2 - fixes for some threading shutdown bugs
- We now display when a screenshot is taken in game showing an ingame console message
- Updated AI to attack closest attackers
- Updated found enemy to be closest attacker
2011-03-28 21:04:47 +00:00
Mark Vejvoda 3b56aa4475 - performance changes... (problem found by titi) most debug calls line are skipped when the debug flag is disabled even BEFORE getting into the handledebug method.
This improves performance VERY MUCH.
2011-03-28 03:54:23 +00:00
Mark Vejvoda d21eeeae07 - lessen pathfinder max nodes to see if this gives better performance 2011-03-19 01:31:49 +00:00
Mark Vejvoda 505abbd1ec - observers now hear sounds from units of all team units in visible quad 2011-03-18 21:23:34 +00:00
Mark Vejvoda 07f56669b7 - attempt to see if threaded pathfinding will work and if it improves performance 2011-03-18 03:53:06 +00:00
Mark Vejvoda dcecb1ba8d - carving pathfinder to 500 and disabling pathfinder cache to see if it performs better. 2011-03-05 08:01:48 +00:00
Mark Vejvoda 4975882ea2 - cleanup some useless warnings (thanks johndh) 2011-02-28 23:33:11 +00:00
Mark Vejvoda 1136f056ce - added performance logging for new ai unblock rule when perf logging enabled 2011-02-28 16:47:01 +00:00
Mark Vejvoda 45a646ffef - carved back max nodes in pathfinder to 600 2011-02-28 16:45:15 +00:00
Mark Vejvoda c679c4bfe0 - set pathfinder max to 800 (From 1200) 2011-02-26 00:47:41 +00:00
Mark Vejvoda 823fd842d4 - added NULL guard for units without a move command to avoid segfault 2011-02-26 00:41:00 +00:00
Mark Vejvoda bced200dd1 - bugfix when bad values are in map file, game would freeze at game start due to endless loop 2011-02-25 22:13:11 +00:00
Mark Vejvoda 9de151d975 - added more things to try to improve pathfinding (especially for the AI)
AI players should now detect when units are blocked (surrounded by other units from same faction) and tell the other units to move out of the way
2011-02-25 16:32:27 +00:00
Mark Vejvoda 16c7316887 - initial attempt to enable pathfinder caching (think it might work now). Please test 2011-02-23 07:03:38 +00:00
Mark Vejvoda 69a7f8f1d6 - hopefully stabilized pathfinder for network play so we won't get out of synch 2011-02-16 19:44:12 +00:00
Mark Vejvoda 7a5de218b7 - chasing down out of synch 2011-02-16 04:43:27 +00:00
Mark Vejvoda 14c5b87da4 - debugging out of synch (make bailout logic optional) 2011-02-16 03:48:13 +00:00
Mark Vejvoda 31e722287f - bugfixes for when players disconnect, do not switch observers to AI and only show message once.
- Attempts to debug/improve network performance
2011-02-15 03:32:14 +00:00
Mark Vejvoda 737f95e5dd - for testing made max pathfinder nodecount configurable 2011-02-13 03:31:05 +00:00
Mark Vejvoda 4488a4d388 - make pathfinder caching an ini setting tso its easy to test (disabled by default)
- some code cleanup related to threads and sockets
2011-02-13 03:06:12 +00:00
Mark Vejvoda d056486ec4 - disable a cache that i think causes out of synch 2011-02-12 01:13:52 +00:00
Mark Vejvoda 0533ce2c63 - a simple attempt to improve pathfinder performance (this needs to be tested well and can easily be disabled by setting: const bool tryLastPathCache = false;) 2011-02-11 23:32:24 +00:00
Mark Vejvoda cab252c220 - more expansion of the maximum distance the pathfinder will calculate, this is required for proper play with cliffs 2011-02-11 16:43:57 +00:00
Mark Vejvoda 41907b7728 - increase pathfinders range for better results with cliffs 2011-02-11 07:51:29 +00:00
Mark Vejvoda 6ec92f2127 - attempt to add more randomness to pathfinding and faster AI decsions 2011-02-04 06:34:32 +00:00
Mark Vejvoda 2498d44cd3 - updated AI code for special empty cellmap units, so AI does not look for them (since they already cannot attack them) 2011-02-03 19:19:27 +00:00
Mark Vejvoda 041289770e - cleaned up more compiler warnings in VC++ 2011-01-29 17:42:34 +00:00
Mark Vejvoda bbab778738 - attempt for improved harvesting when congested 2011-01-28 08:58:16 +00:00
Mark Vejvoda 177531c376 - commented out some debug statements and corrected stuck harvesting a bit 2011-01-28 08:37:48 +00:00
Mark Vejvoda 23135b5bab - when units get congested now we try to randomly pick different approaches to find resources 2011-01-28 07:17:32 +00:00
Mark Vejvoda 66261ad662 - updated line endings to unix style characters to fix Bug #3085838 2011-01-20 15:56:30 +00:00
Mark Vejvoda ccbd707ae1 - numerous bugfixes including fixing a slowdown introduced in a previous recent checkin.
- Added Network Text Message queue as this is required in some tricky cases
- added more logging of memory cleanup events
- added memory safe snprintf calls
2011-01-11 22:09:46 +00:00
Mark Vejvoda 896b1c308c - added a backtrace for gcc compiled binary when we get a runtime error.
- added more out of synch checks and better error handling
2011-01-02 00:39:13 +00:00
Titus Tscharntke 75541aec3b Contact email changed; lots of strings replaced to MegaGlest 2010-12-13 00:32:59 +00:00
Mark Vejvoda 15aab7a581 - some intial changes to support cross-compilation under mingw 2010-12-04 23:19:43 +00:00
Mark Vejvoda 8deec8d518 - changed debug world synch formatting so on xplatform we don't have issues with filename and other header tag items 2010-12-01 23:38:03 +00:00
Mark Vejvoda b02da7d1e0 - finally found and fixed out of synch related to AI.
- added ability to log all unit activity to world synch logfiles so we can diff game info from different network clients
2010-11-30 23:32:39 +00:00
Mark Vejvoda e62f3ca64c - reverted AI's repair rule logic to hunt down an AI out of synch 2010-11-28 07:38:03 +00:00
Mark Vejvoda ca2408073e - disabled more caching to determine if any of these caches cause out of synch 2010-11-28 03:35:44 +00:00
Mark Vejvoda edbc14a176 - disabled another cache in pathfinder trying to hunt down xplatform out of synch 2010-11-28 02:36:06 +00:00
Mark Vejvoda 664b2b1b7d - disabled another cache in pathfinder trying to hunt down xplatform out of synch 2010-11-28 00:07:08 +00:00
Mark Vejvoda cc4f268988 - some additional AI caching for improved performance 2010-11-11 08:02:50 +00:00
Mark Vejvoda d89953ee96 - improved performance and bug fixes. 2010-11-09 09:06:52 +00:00
Mark Vejvoda 9d9fa0deeb - improved performance for when the AI decides which resource is closest. 2010-11-07 03:27:06 +00:00
Mark Vejvoda 9e55d8e46b - added a small cache to improve pathfinding a bit
- added logic to IGNORE the following characters when doing CRC checks in XML files
 (space,tab,CR,LF)
2010-11-07 01:06:14 +00:00
Mark Vejvoda cb52b4895d - performance fix in both pathfinder and debug output when pressing the debug key 2010-11-02 19:52:20 +00:00
Mark Vejvoda 9978cbeff5 - added some initial work to support FBO (frame buffer objects)
- added many NULL check guards throughout the code
- added a safe mutex around ptr access of background thread on custom menu
2010-11-01 16:44:05 +00:00
Mark Vejvoda 1e104f0496 - attempt to further improve pathfinder performance when MANY units are on the map 2010-10-26 06:53:04 +00:00
Mark Vejvoda c47b6c676c - attempt to further improve pathfinder performance when MANY units are on the map 2010-10-26 06:43:42 +00:00
Mark Vejvoda 8bbbe403ad - more performance improvements for resource cache logic (try to avoid repetitive caching logic when it was already done once) 2010-10-25 22:02:36 +00:00
Mark Vejvoda 117521a8d4 - disabled the recently introduced pathfinding cache as its too slow and not sure that it really does any good. This should help performance to be better. 2010-10-24 06:53:30 +00:00
Mark Vejvoda bbc8f96327 - better masterserver thread management during game play (do not start the thread for non published games) 2010-10-24 05:52:21 +00:00
Mark Vejvoda 79318735ab - cleanup of last compiler warnings in Linux (hurray!) 2010-10-21 18:24:54 +00:00
Mark Vejvoda bc7ba297fd - more tweaking for units harvesting, this hopefully cleans up segfaults and makes things more stable. 2010-10-20 20:40:29 +00:00
Mark Vejvoda 913df7ec3b - added more cached information to help deal with units getting stuck while harvesting. Trying to keep them busy instead of standing around. 2010-10-19 22:26:49 +00:00
Mark Vejvoda dda594cf33 - a slight change in dealing with units getting stuck while harvesting. Trying to keep them busy instead of standing around. 2010-10-19 16:54:48 +00:00
Mark Vejvoda 182f2cd20d - bugfixes to AI where workers harvesting think they have arrived but really did not. 2010-10-19 04:38:55 +00:00
Mark Vejvoda 7564635643 - added initial code for switching dropped network players to AI (currently hard coded to normal CPU) 2010-10-18 23:09:43 +00:00
Mark Vejvoda 3d4ccb460c - added a little extra logic for units when pathfinding. We keep temporary lists of bad cells of harvest resources where a unit simply cannot get to. This is kept for small periods of time and then the bad cell list is purged when data gets old. This tremendously helps units to be more active when getting stuck in challenging places on maps. 2010-10-17 08:50:27 +00:00
Mark Vejvoda 55b4f0bd2b - Incremented version to next major release # so new work can begin.
- some initial work to assist units from getting stuck when given commands. This is for both AI and human players and deals with the pathfinder and units getting constantly blocked from their destination.
2010-10-17 06:34:42 +00:00
Mark Vejvoda 02e0a1302f - more AI fixes.
#1: AI does not try to harvest resources that the unit cannot yet harvest (could be an upgrade required)

#2: AI no longer tries to expand near resources that they are not yet able to harvest. (found using RealtimeFreaks test mod and map). This makes for a more aggresive CPU in scenarios where there are additional resource types since they expand much more quickly.
2010-10-02 01:11:59 +00:00
Mark Vejvoda 6013a96efd - stupid compiler fix for vc++ (including limits gives streflop a fit) 2010-09-29 22:59:16 +00:00
Mark Vejvoda 80051e3194 - bugfix for AI units that do nothing when resources exist in the tech that the unit cannot harvest. (thanks RealtimeFreak for pointing this out and giving me a demo tech for testing)
- bugfix for restoring saved game settings (ignore closed slots that have faction set to random)
2010-09-29 04:38:41 +00:00
James McCulloch 4f0846a2c3 * Fix error in RoutePlanner 2010-09-24 04:38:44 +00:00
James McCulloch 1cce764893 * remove exception on illegal move request, invalidate path and return false instead 2010-09-17 16:10:17 +00:00
Mark Vejvoda f84a710d2c - initial logic to allow client side controlled AI 2010-09-14 19:10:37 +00:00
Mark Vejvoda d806e7f9ff - a few more performance optimizations and logging changes 2010-09-09 05:42:19 +00:00
Mark Vejvoda 958184e018 - more memory cleanup 2010-09-07 21:01:22 +00:00
Mark Vejvoda ab44c83168 - added leak_dumper header all over the place (not yet functional in linux)
- Bugfix for particle cleanup
2010-09-07 05:25:40 +00:00
Mark Vejvoda 855443d98f - added a lookup cache for unit updater's frequently called unitOnRange logic 2010-08-25 07:29:35 +00:00
Mark Vejvoda 65cf1bfdac - attempt to lessen memory footprint of particles and speed up rendering 2010-08-24 01:21:34 +00:00
Titus Tscharntke 8e281e2faf new attribute MaxUnitCount in units and yellow select circle for allies 2010-08-22 21:09:35 +00:00
Mark Vejvoda acd2359096 - added performance logging to regular pathfinder 2010-08-22 20:13:30 +00:00
James McCulloch 52c37f0927 * oops, forgot to hook-up ClusterMap updates (causing units to get stuck) 2010-08-08 13:06:33 +00:00
James McCulloch 3d482ca366 * fix (work-around) for apparent MSVC bug, in AStarNode::operator<()
* removed some unused pathfinder stuff, and const-ified some other stuff
 * RoutePlanner is used in scenarios (for testing purposes...)
2010-08-08 04:43:24 +00:00
Mark Vejvoda ed8c08de2f - fixed a bad memory leak in the pathfinder 2010-07-30 01:05:52 +00:00
James McCulloch e73324d317 * added DebugType debugPathFinder 2010-07-24 11:43:03 +00:00
Mark Vejvoda ff586afd0d - some final updates to get the new pathfinder working after adding multi-pathing support 2010-07-21 22:05:50 +00:00
Mark Vejvoda 77ee50b681 - some code cleanup related to supporting multiple path finders 2010-07-21 20:40:11 +00:00
Mark Vejvoda 74b6fc8139 - some code cleanup related to supporting multiple path finders 2010-07-21 19:17:45 +00:00
Mark Vejvoda bca03b0c0c - initial changes to support multiple path finders 2010-07-21 18:21:40 +00:00
Mark Vejvoda f8ada85017 - cleanup of some compiler warnings 2010-07-17 07:07:57 +00:00
Mark Vejvoda e9e1a317e4 - cleanup of some compiler warnings 2010-07-17 06:54:04 +00:00
James McCulloch 8579dbb36e * fix for resource depletion updates to AnnotatedMap and Resource GoalMaps (cell to tile co-ord problem) 2010-07-17 05:13:34 +00:00
Mark Vejvoda 43f4ba71a3 updated impossibleroute text to re-use invalid position text 2010-07-17 01:27:43 +00:00
James McCulloch 4393139496 * restore error check that I had commented out while experimenting with sqrt approximations 2010-07-16 17:13:12 +00:00
Mark Vejvoda 9992f9cb79 fixed minor compiler issues in linux for new pathfinder changes 2010-07-16 16:24:55 +00:00
James McCulloch 20165b4566 * path finding into unexplored areas handled more intelligently (and without revealing/exploiting information the player shouldn't have) 2010-07-16 16:08:09 +00:00
Mark Vejvoda 6e26641799 - a possible fix for the AI. this change will randomize all possible produce, morph and build operations instead of just using the last commandtype found for candidate units 2010-07-13 22:51:27 +00:00
James McCulloch f18061a7ee fix build-site and store adjacency maps for potential building rotation
fix potential annotated map update problem with morphing to a smaller UnitType
2010-07-13 11:05:35 +00:00
James McCulloch 8387ed29dc * wired up RoutePlanner/Cartographer
* added DebugRenderer (mostly dysfunctional)
 * add lots of OutputDebug calls for the path finder, as macro PF_TRACE
2010-07-13 05:33:43 +00:00
Mark Vejvoda f86268b53d - some small changes for new pathfinder code to compile in linux 2010-07-12 06:40:19 +00:00
James McCulloch bdd4f306f4 * added GAE path finder (SearchEngine and friends)
* some small changes to Unit, UnitType, Vec2<> & Map needed for the new path finder
 * compiles, but not hooked up yet, old PathFinder still in use
2010-07-11 18:31:02 +00:00
Mark Vejvoda 8a3709defd bugfixes for AI command execution 2010-06-10 21:53:50 +00:00
Titus Tscharntke 54abe03d86 megacpu bug hunting 2010-06-10 21:33:50 +00:00
Mark Vejvoda 6beaab97fe added another index guard to ensure proper index 2010-06-10 20:37:38 +00:00
Mark Vejvoda f5836bdf99 added more guards and debug info related to AI bugs 2010-06-10 14:58:06 +00:00
Mark Vejvoda 6d519c4cdf added more guards in AI command processing 2010-06-09 00:38:15 +00:00
Mark Vejvoda 4fd75e5d7d - fixed two nasty AI bugs which would cause out of synch and memory corruption problems
- added new glest.ini setting to log commands for each client
2010-06-08 07:40:32 +00:00
Mark Vejvoda e85a269738 - added server controlled AI as a game option 2010-06-03 01:10:40 +00:00
Mark Vejvoda 3dc9c2c623 - bugfix for server controlled AI mode 2010-06-03 00:13:58 +00:00
Mark Vejvoda 64070ca69c - added initial flag to test some server controlled AI code 2010-06-02 22:06:10 +00:00
Mark Vejvoda 1c9b85418a - Some initial changes in prep for support server controlled AI 2010-06-01 16:54:44 +00:00
Mark Vejvoda 58386a72e8 Bugfix for cases where command cache was not yet initialized 2010-05-01 09:27:08 +00:00
Mark Vejvoda f748874601 Ported streflop code to win32 2010-04-24 11:15:15 +00:00
James McCulloch 00dd0f490d * fix for map names (possible duplicate entries if mgm and gbm with same name) & alphabetically sorted now
* re-implemented building rotation (Note: requires particle systems that should be rotated with the building to be 'relative')
2010-03-25 12:15:10 +00:00
Mark Vejvoda b22adbfa02 bugfix for scripted scenarios and placing unit model not showing 2010-03-24 21:26:17 +00:00
Mark Vejvoda 43c3f2457e Code Restructuring to make mega-glest more standard 2010-03-12 05:20:53 +00:00
Titus Tscharntke c4d32651c6 removed old debug printfs in comments
fixed relative switch for unit particles
fixed gravity for unit particles
2010-02-16 23:55:45 +00:00
Titus Tscharntke 0ce9b5fcac initial version ( megaglest 3.2.3-beta3 ) 2010-01-22 01:45:58 +00:00