Jump to content

ickylevel

Community Members
  • Posts

    23
  • Joined

  • Last visited

  • Days Won

    1

ickylevel last won the day on November 20 2014

ickylevel had the most liked content!

ickylevel's Achievements

Discens

Discens (2/14)

3

Reputation

  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': ...
×
×
  • Create New...