Jump to content


  • Content Count

  • Joined

  • Last visited

  • Medals

Everything posted by PureCode

  1. Note that many of the '.ent' files (see the 'worlds' directory for example) contain script code as well. As for the executable, it is extremely easy to find out what code does what. I am, however not sure if BI would be happy if changes are made to it (in the form of 'runtime patches', eg, code injection). I have, for example managed to make walruses turn in place with a simple code patch but I am reluctant to post an executable for it (it doesn't change the actual executable file, the changes are done in memory while the game runs, so the patch would have to be started each time you start the game). The path finder does a LITTLE better with 'tank-like' rotation but I think the real problem is that BI choose to use A* for this, I think a pathing grid (in 3D, since there are flying units) in combination with a terrain mask texture to determine where a certain action be done and where one can drive/fly would have been much better. Downside is a small performance hit due to the massive amount of grid look-ups one has to do, but since this grid (think of a cube with many cubes within, each a node) isn't drawn and can be 'moved' to the GPU for most processing it could be minimal. Mind you, this is a lot like A* but has everything already set in place and can be used for MANY more purposes. BI's A* implementation in CC is just... awful.. I can sorta live with the walruses getting stuck (the falling off cliffs part, not so much..) but manta's getting stuck on the lip of a mountain, or refusing to go over a mountain even if it already has enough altitude and just starts hovering in place is just BAD. Maybe recalculating all them nodes every frame is what is really screwing up here, apart from the performance hit, every recalculation of a path or a section of a path could (and often will) result in a whole new path, causing the vehicle to do that 'grandma (or my wife) is trying to park' back and forth crap. I'll look into it further once I have some time to dissect the executable a bit more. Gotta say though, nice and clean code guys, well done (seriously). PS, Thygrrr, I made a native executable based on your depacker, without requiring Python. Also added the ability to select specific files to unpack (or pack back into into the .cc file for that matter). Do you mind if I release that? (You are properly credited of course).