Jump to content

ickylevel

Community Members
  • Posts

    23
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by ickylevel

  1. The macro phase is way too long in this game. The speed of the units, the fact that armies can gather resources, the strength of the buildings, all of this really penalizes early aggression and turn every game into a macro game. There are no possibilities in this game and you feel like on a rail, especially with the territory system. My solutions : Lower buildings hp. Remove territory system. Lower buildings construction times. Create hardcounter unit types. Remove army gathering or limitate it for one unit type per civ. Have a nearly orthographic 45 degree camera per default to make unit selection easier (like starcraft 2). Make resources less abundant so that players focus more on aggressive strategies than turtling. Nerf farms by having only one worker per farm (like in AOEII).
  2. Have ranged units have limited ammo, have this ammo replenished over time when the units are in controlled territory.
  3. Well some other ranged as well. So what do you do to kill a player who is doing ranged only? What is the hard counter? A hard counter that's tier one, as I rush.
  4. Sorry by 'faster' I meant the framerate is higher. A fight between 300 units as a much lower framerate than 300 units moving to a target location.
  5. There is something wrong with combats/ target acquisition. Lots of Units moving are way faster than units fighting each other. Some optimization needs to be done there as well.
  6. Have skirmish formation (ranged units that keep a distance automatically), a tech that must be developed at tier 2.
  7. The performance issues we are having with the unit count makes it likely to become blizzard like imo. Atm the game is totally imbalanced and making 1 type of unit (ranged cavalry) is all it is about anyway. The game has a long way to go...
  8. Here we go : http://trac.wildfiregames.com/ticket/2908
  9. It would be really interesting to try that in multiplayer. I moved a part of the pathfinding recalculation when a unit hits another units in 'immediate mode' which means it's being calculated in a way that could cause synchronization issue. We definitely need to try that solution in multi-player first to ensure its validity. Even if it's not working in mp I think we could still start to work on having gatherers not colliding with units.
  10. I need to update the workers javascript (I think its the script) code so they dont collide when they harvest, and the game would become playable 1v1 with a 300 population cap.
  11. As I said obstructed units do too much calculations, so I propose this fix : Index: simulation2/components/CCmpObstructionManager.cpp===================================================================--- simulation2/components/CCmpObstructionManager.cpp (revision 15848)+++ simulation2/components/CCmpObstructionManager.cpp (working copy)@@ -431,7 +431,7 @@ } } - virtual bool TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r);+ virtual bool TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r); virtual bool TestStaticShape(const IObstructionTestFilter& filter, entity_pos_t x, entity_pos_t z, entity_pos_t a, entity_pos_t w, entity_pos_t h, std::vector<entity_id_t>* out); virtual bool TestUnitShape(const IObstructionTestFilter& filter, entity_pos_t x, entity_pos_t z, entity_pos_t r, std::vector<entity_id_t>* out); @@ -536,7 +536,7 @@ REGISTER_COMPONENT_TYPE(ObstructionManager) -bool CCmpObstructionManager::TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r)+bool CCmpObstructionManager::TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r) { PROFILE("TestLine"); @@ -559,8 +559,12 @@ CFixedVector2D center(it->second.x, it->second.z); CFixedVector2D halfSize(it->second.r + r, it->second.r + r);- if (Geometry::TestRayAASquare(CFixedVector2D(x0, z0) - center, CFixedVector2D(x1, z1) - center, halfSize))+ if (Geometry::TestRayAASquare(CFixedVector2D(x0, z0) - center, CFixedVector2D(x1, z1) - center, halfSize)) {+ x1 = center.X;+ z1 = center.Y; return true;+ }+ } std::vector<entity_id_t> staticShapes;Index: simulation2/components/CCmpPathfinder.cpp===================================================================--- simulation2/components/CCmpPathfinder.cpp (revision 15848)+++ simulation2/components/CCmpPathfinder.cpp (working copy)@@ -583,6 +583,8 @@ } } ++ void CCmpPathfinder::ProcessShortRequests(const std::vector<AsyncShortPathRequest>& shortRequests) { for (size_t i = 0; i < shortRequests.size(); ++i)Index: simulation2/components/CCmpPathfinder_Common.h===================================================================--- simulation2/components/CCmpPathfinder_Common.h (revision 15848)+++ simulation2/components/CCmpPathfinder_Common.h (working copy)@@ -260,7 +260,7 @@ virtual CFixedVector2D GetNearestPointOnGoal(CFixedVector2D pos, const Goal& goal); - virtual bool CheckMovement(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r, pass_class_t passClass);+ virtual bool CheckMovement(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r, pass_class_t passClass); virtual ICmpObstruction::EFoundationCheck CheckUnitPlacement(const IObstructionTestFilter& filter, entity_pos_t x, entity_pos_t z, entity_pos_t r, pass_class_t passClass); Index: simulation2/components/CCmpPathfinder_Tile.cpp===================================================================--- simulation2/components/CCmpPathfinder_Tile.cpp (revision 15848)+++ simulation2/components/CCmpPathfinder_Tile.cpp (working copy)@@ -420,7 +420,7 @@ // Hack to avoid spending ages computing giant paths, particularly when // the destination is unreachable- if (state.steps > 40000)+ if (state.steps > 10000) break; // If we ran out of tiles to examine, give upIndex: simulation2/components/CCmpPathfinder_Vertex.cpp===================================================================--- simulation2/components/CCmpPathfinder_Vertex.cpp (revision 15848)+++ simulation2/components/CCmpPathfinder_Vertex.cpp (working copy)@@ -851,7 +851,7 @@ } bool CCmpPathfinder::CheckMovement(const IObstructionTestFilter& filter,- entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r,+ entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r, pass_class_t passClass) { CmpPtr<ICmpObstructionManager> cmpObstructionManager(GetSystemEntity());Index: simulation2/components/CCmpUnitMotion.cpp===================================================================--- simulation2/components/CCmpUnitMotion.cpp (revision 15848)+++ simulation2/components/CCmpUnitMotion.cpp (working copy)@@ -629,6 +629,11 @@ ControlGroupMovementObstructionFilter GetObstructionFilter(bool forceAvoidMovingUnits = false); /**+ * Returns an appropriate obstruction filter for use with path requests.+ */+ ControlGroupMovementObstructionFilter GetObstructionFilterNoAvoid();++ /** * Start moving to the given goal, from our current position 'from'. * Might go in a straight line immediately, or might start an asynchronous * path request.@@ -892,11 +897,17 @@ fixed maxSpeed = basicSpeed.Multiply(terrainSpeed); bool wasObstructed = false;+ bool wasObstructedTerrain = false; // We want to move (at most) maxSpeed*dt units from pos towards the next waypoint fixed timeLeft = dt; fixed zero = fixed::Zero();++ fixed targetX;+ fixed targetY;++ fixed maxdist; while (timeLeft > zero) {@@ -907,14 +918,18 @@ CFixedVector2D target(m_ShortPath.m_Waypoints.back().x, m_ShortPath.m_Waypoints.back().z); CFixedVector2D offset = target - pos; + + // Work out how far we can travel in timeLeft- fixed maxdist = maxSpeed.Multiply(timeLeft);+ maxdist = maxSpeed.Multiply(timeLeft); // If the target is close, we can move there directly fixed offsetLength = offset.Length(); if (offsetLength <= maxdist) {- if (cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, target.X, target.Y, m_Radius, m_PassClass))+ targetX = target.X;+ targetY = target.Y;+ if (cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, targetX, targetY, m_Radius, m_PassClass)) { pos = target; @@ -927,7 +942,10 @@ else { // Error - path was obstructed- wasObstructed = true;+ if (target.X != targetX || target.Y != targetY)+ wasObstructed = true;+ else+ wasObstructedTerrain = true; break; } }@@ -936,8 +954,9 @@ // Not close enough, so just move in the right direction offset.Normalize(maxdist); target = pos + offset;-- if (cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, target.X, target.Y, m_Radius, m_PassClass))+ targetX = target.X;+ targetY = target.Y;+ if (cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, targetX, targetY, m_Radius, m_PassClass)) { pos = target; break;@@ -945,12 +964,68 @@ else { // Error - path was obstructed- wasObstructed = true;+ if (target.X != targetX || target.Y != targetY)+ wasObstructed = true;+ else+ wasObstructedTerrain = true; break; } } } + if (wasObstructed)+ {+ // Oops, we hit something (not terrain).+ // const AsyncLongPathRequest& req = longRequests[i];++ /*+ ICmpPathfinder::Path pathf;+ m_PathState = PATHSTATE_WAITING_REQUESTING_LONG;+ cmpPathfinder->ComputePath(pos.X, pos.Y, m_FinalGoal, m_PassClass, m_CostClass, pathf);+ PathResult(m_ExpectedPathTicket,pathf);+ */++ m_PathState = PATHSTATE_FOLLOWING_REQUESTING_SHORT;+ ICmpPathfinder::Path path;+ ICmpPathfinder::Goal goal(m_FinalGoal);+ ICmpPathfinder::Waypoint way;+ //if (m_LongPath.m_Waypoints.size() > 0)+ // way = m_LongPath.m_Waypoints.back();+ //else+ way = m_ShortPath.m_Waypoints.front();+ goal.x = way.x;+ goal.z = way.z;+ cmpPathfinder->ComputeShortPath(GetObstructionFilter(), pos.X, pos.Y, + m_Radius, SHORT_PATH_SEARCH_RANGE, goal , m_PassClass, path);+ PathResult(m_ExpectedPathTicket,path);+ ++ /*+ CFixedVector2D diffHit(targetX - pos.X,targetY - pos.Y);+ diffHit.Normalize();++ fixed pdistance = diffHit.X.Multiply(diffHit.X) + diffHit.Y.Multiply(diffHit.Y) ;+ pdistance = pdistance.Sqrt();+ diffHit.X = -diffHit.X; + diffHit.Y = -diffHit.Y;+ maxdist = maxdist - pdistance;+ diffHit = diffHit.Multiply( maxdist ) + pos;+ targetX = diffHit.X;+ targetY = diffHit.Y;+ if (cmpPathfinder->CheckMovement(GetObstructionFilter(), pos.X, pos.Y, targetX, targetY, m_Radius, m_PassClass))+ {+ pos = diffHit;+ }+ */+ }++ if (wasObstructedTerrain)+ {+ m_CurSpeed = zero;+ RequestLongPath(pos, m_FinalGoal);+ m_PathState = PATHSTATE_WAITING_REQUESTING_LONG;+ }+ // Update the Position component after our movement (if we actually moved anywhere) if (pos != initialPos) {@@ -964,20 +1039,7 @@ m_CurSpeed = cmpPosition->GetDistanceTravelled() / dt; } - if (wasObstructed)- {- // Oops, we hit something (very likely another unit).- // Stop, and recompute the whole path.- // TODO: if the target has UnitMotion and is higher priority,- // we should wait a little bit.- - m_CurSpeed = zero;- RequestLongPath(pos, m_FinalGoal);- m_PathState = PATHSTATE_WAITING_REQUESTING_LONG;-- return;- }-+ // We successfully moved along our path, until running out of // waypoints or time. @@ -1229,8 +1291,19 @@ return ControlGroupMovementObstructionFilter(forceAvoidMovingUnits || ShouldAvoidMovingUnits(), group); } +ControlGroupMovementObstructionFilter CCmpUnitMotion::GetObstructionFilterNoAvoid()+{+ entity_id_t group;+ if (IsFormationMember())+ group = m_TargetEntity;+ else+ group = GetEntityId(); + return ControlGroupMovementObstructionFilter(false, group);+} ++ void CCmpUnitMotion::BeginPathing(CFixedVector2D from, const ICmpPathfinder::Goal& goal) { // Cancel any pending path requestsIndex: simulation2/components/ICmpObstructionManager.h===================================================================--- simulation2/components/ICmpObstructionManager.h (revision 15848)+++ simulation2/components/ICmpObstructionManager.h (working copy)@@ -171,7 +171,7 @@ * @param r radius (half width) of line * @return true if there is a collision */- virtual bool TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r) = 0;+ virtual bool TestLine(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r) = 0; /** * Collision test a static square shape against the current set of shapes.Index: simulation2/components/ICmpPathfinder.h===================================================================--- simulation2/components/ICmpPathfinder.h (revision 15848)+++ simulation2/components/ICmpPathfinder.h (working copy)@@ -148,7 +148,7 @@ * or impassable terrain. * Returns true if the movement is okay. */- virtual bool CheckMovement(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t x1, entity_pos_t z1, entity_pos_t r, pass_class_t passClass) = 0;+ virtual bool CheckMovement(const IObstructionTestFilter& filter, entity_pos_t x0, entity_pos_t z0, entity_pos_t &x1, entity_pos_t &z1, entity_pos_t r, pass_class_t passClass) = 0; /** * Check whether a unit placed here is valid and doesn't hit any obstructions
  12. It doesn't help. But can you reproduce the issue by the way? Have like an army of 100, select them, make them move and then try selecting and deselecting to see the fps difference. Making them move is easier to spot the fps diff if you dont have a counter,
  13. I still get a 30% frame-rate drop when units are selected. I go from 30 fps to 40 If I deselect a group of 100 units or if I comment out the javascript code of the selection panel.
  14. Thanks i didn't re-run the batch file. Everything is fine.
  15. I can't find what commit deleted them in the logs... But I have looked at every revision in it. I am on windows 7 and I can't compile anymore: 7>c:\users\ickylevel\work\0ad\source\lib/sysdep/os/win/wsdl.h(33): fatal error C1083: Cannot open include file: 'SDL_keysym.h': ...
  16. Well some of the commits removed the sdl includes. I don't know which one I just reverted a couple of revision and it works. This is stuff that has been removed : C:\Users\ickylevel\work\0ad\libraries\win32\sdlC:\Users\ickylevel\work\0ad\libraries\win32\sdl\includeC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDLC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_macos.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config.h.defaultC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_dreamcast.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_error.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_audio.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_cpuinfo.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_events.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_video.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_thread.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config.h.inC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_rwops.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_active.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\begin_code.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_timer.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_stdinc.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_opengl.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_main.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_version.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_symbian.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_win32.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_os2.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_getenv.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_mouse.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\close_code.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_endian.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_byteorder.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_joystick.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_keyboard.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_mutex.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_amiga.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_types.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_cdrom.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_copying.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_nds.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_minimal.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_config_macosx.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_name.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_loadso.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_keysym.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_quit.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_syswm.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\include\SDL\SDL_platform.hC:\Users\ickylevel\work\0ad\libraries\win32\sdl\libC:\Users\ickylevel\work\0ad\libraries\win32\sdl\lib\SDL.libC:\Users\ickylevel\work\0ad\libraries\win32\sdl\lib\SDLmain.lib
  17. When has it been fixed? I am now having an error with the latest trunk: Cannot open include file: 'SDL_keysym.h': No such file or directory
  18. Hello, I am using the latest trunk from svn. Actually i managed to improve performance significantly by having the pathfinder recompute only the short path when a unit gets stuck by colliding with another unit. it makes a 1v1 playable at 300 population WITHOUT formation (which is the laggiest in theory). it still a bit laggy when the population reach that level tough. I think i can achieve good results by making workers ignoring collisions when harvesting, a la starcraft 2.
  19. Hello all, From last year when I last checked the game we still have this huge performance issue. What is the status on this? It seems to occurs when lots of units are moving. I have had a look and it doesn't seem to be due to the pathfinding at first sight but I am pretty new to the code. is pathfinding being called constantly for moving units? The lag occurs at every turn and doesn't seem to be altered if the turn length is changed.Does anyone know the game architecture? I know it has a turn system like age of empire but that's all my knowledge of it. It seems to me that the first frame of the turn has to do all the calculations which is causing all the lag. Is this something inherent to the game engine or is it fixable? Also I have noticed a important framerate drop (10 fps out of 40) due to the drawing of the unit list panel (in javascript) which is the cause for the game running slower if units are selected.
  20. Well I am experimenting atm (not being part of the team I don't have any obligations). I have made a basic light cycle but it makes the game 4x slower as CGameView::CheckLightEnv() is quite expensive. I need to find a compromise... I can at least update only parts of the terrain. Do you think making only visibles objects/terrain dirty will be good enough?
  21. Yeah seasons is probably a flagship feature that will make the game stand out. But would require more work on the art side. I want to do something on my own for now. So wraitii you mean the world lighting is precomputed when the map is loaded ?
  22. I am considering to start working on a day/night cycle, with potential implications on gameplay as well, a la warcraft 3. Will probably require some map editor changes. What are your thought ? Could this go vanilla ?
  23. Hello, Any reason why we don't have something like this, to quit the program (close button) ? It's annoying me to get to the battle report then to the menu when you want to quit the game. Will you merge it to the head if I branch this change ?
×
×
  • Create New...