Jump to content

Leaderboard

Popular Content

Showing content with the highest reputation on 2015-08-13 in all areas

  1. Reminder: One related ticket to the collision detection is: http://trac.wildfiregames.com/ticket/1901
    1 point
  2. It seams like the problem is that units are shown in fog of war if they die (So maybe not really the units but their decals, not sure about the terminus/implementation). (Thus a player that has no vision on an area - only scouted it beforehand - can tell fighting takes place there) Thanks for reporting this.
    1 point
  3. Yep, I mean that the buildings need to change when up to new phase. Can u teach me how to mod this game? Or how join this project.
    1 point
  4. Here's the patch for collision detection and as "standalone" as possible: rmgen_collision_detection.diff The entity IDs are stored in the collision grid and are returned if something is to be placed but collides. However, I didn't find a safe and fast way to find the blocking entity by ID (is in g_Map.objects or in g_Map.terrainObjects). So if anyone knows how to do this (without going through the entirety of both lists) or what the IDs are for in the first place, plz let me know. This would be extremely illuminative... EDIT: Like suggested by sanderd17 I'll add a function that can be called with the actor string, the position and the angle to check for collision without actually placing anything (so a temporary abstract object is generated but not placed) However, to generate the obstruction map the collision check has to be called every time an object (with obstruction, checked in the function) was/is about to be placed. It might be better to just log collisions because they are rarely fatal. To know what the entity ID is for would be very nice (in fact vital if e.g. the IDs must be continuous since the above function (as well as not placing "units" because they are blocked by "buildings") will then break things)! The remaining questions are: - What's the entity ID for? - Does the 0.5 m grid catch all units (like e.g. any small chicken)? (It's checked but there might be rarely occurring cases) - How to get an object by ID (For me this seams to need to go through all g_Map.objects and g_Map.terrainObjects and compare the entity ID to their ".id" property which would be horribly slow. If we don't do it too often (the average map contains about 20 collisions) this may still be an option)? A fast solution to find an entity object by it's ID would be not to use "this.objects.push()" to add objects but use "this.objects[entityID] = " and then check for with "if (entityID in g_Map.objects)" (or "if (g_Map.objects.hasOwnProperty(entityID))") and at map export do the same check (and cycle to 150+ undefined objects, yes, but only once so that's OK IMO). Same goes for map.terrainObjects ofc. That's for sure not the cleanest solution but for a clean solution I need to know what the entity ID is supposed to do/ment for!
    1 point
×
×
  • Create New...