Special Question for Jon Mavor.

Discussion in 'Backers Lounge (Read-only)' started by Elevenxray, November 9, 2014.

  1. Elevenxray

    Elevenxray New Member

    Messages:
    5
    Likes Received:
    1
    First off I want to say, I was an early backer because Total Annihilation was simply AWESOME.

    However after seeing some of PA I've been on a search for a few things, and I think you may be the only one who can answer.

    So, TA rights and source code and all that got bought by the "World of Tanks" peeps supposedly, so I was wondering, if you could tell me what programming language was TA written in?

    Now my next question might be rude, and I truly don't mean to be, but what happened to Brian W. Brown? I ask this, because after some research it seems he is the one who wrote the code for the flight pathing in TA. However this person has simply disappeared.

    I am "young" and interested in programming so I've been looking to see how TA was made, because I feel it was ahead of its time and still is, yet there will probably never be an open source for TA and other than PA and Supreme Commander games, the flight pathing of TA is truly unique and I would very much like to know how its done.

    I hope this isn't too much to ask as an early backer and If needed I understand if this has to be answered in private.

    Also it would be awesome if instead of games if y'all sold game programming training, there may not be much of us, but i'm sure a handful of us every year would be very much interested in paying for it.
  2. lizard771

    lizard771 Well-Known Member

    Messages:
    372
    Likes Received:
    322
  3. Quitch

    Quitch Post Master General

    Messages:
    5,173
    Likes Received:
    5,961
    TA was a mixture of C++ and Assembly (for 2D sprite effects) IIRC.
  4. Elevenxray

    Elevenxray New Member

    Messages:
    5
    Likes Received:
    1
    Thanks for the link, my thing is that the original TA flight pathing no one has come close to it, as well as the projectile flight time and elevation trajectories. Maybe I should look better, but it seems like most RTS projectiles are a type of homing missile (even if its a bullet) while TA was not.

    Quitch, Ya that's been the general consensus, just kinda wanted to hear it from one of the original programmers lol, from what I know Chris Taylor was very good at Assembly. Although these days, it seems like it's a rare language.
    Last edited: November 9, 2014
  5. exterminans

    exterminans Post Master General

    Messages:
    1,890
    Likes Received:
    1,014
    TA had full collision detection and ballistic curves for projectiles, and it also used rather accurate models for air units which did respect the momentum. Plus every unit type in TA had its very own path finding and moving algorithm, so of course it looked different from when you only have one parametric one-fits-them-all algorithm which is applied to any unit in the game (like e.g. in PA....).
    Because you rarely need it any more. The only cases where you are still using it, is if you want to use either next gen instructions the compiler isn't fully aware of yet, or if you want to do low level stuff in embedded systems. And even then you can *often* achieve the same result in C or C++, unless of course you want to do some timing critical stuff where you have counted the precise number of instructions to be executed.

    Compilers have made huge advances since back then, it's really hard to beat them in any way. Plus you have a much lager variance of platforms to cover, there's no longer just 1-2 CPU architectures you can manually fine tune to in order to squeeze some nice software rendering from it, but a whole variety of architectures on the GPU side which is impossible to cover without much higher level abstraction. Plus not a single software developer I know of still understands how the internals of a modern Intel or AMD processor actually work in all detail ;)

    I can only ensure you that they do weird things to your machine code, things you don't have any control over via assembler - and you shouldn't care since the outcome is still what you wanted.

    Oh, and there are so many instructions int the x86 extensions nowadays, a sane human wouldn't even know which combination to pick for maximum performance. Your compiler is also much better at making that decision as soon as it understands your "intention". "Proper use" of the C++ STL can often get you better performance than any hand tuned assembler. Often enough it's even smarter to write it the naive way, and let the compiler do it's magic. (Unless of course you are sure that you know of an algorithm which completely outsmarts the compiler, but even then you don't want to go into detail optimization all to much.)
    yrrep, ace63 and Quitch like this.
  6. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    TA didn't have different algorithms for each unit, but the units could specify a few parameters to affect valid locations they could move to, namely maximum slope or minimum/maximum water depth. This affected where they were allowed to go, but didn't affect the method use to determine how to get there (eg., the actual path-finding algorithm), which was the same for all land/sea units afaik (Aircraft were probably coded differently because there's no terrain to worry about, and they can travel in straight lines to their destination).
    squishypon3 and Quitch like this.
  7. Elevenxray

    Elevenxray New Member

    Messages:
    5
    Likes Received:
    1
    I'm sure the aircraft did have a different algorithm, they use to fan out if you had them attack from a distance if you didn't set up a rally point before hand, and they would seemingly move and maneuver a lot quicker which gave it the agility to actually dodge certain projectiles.

    Idk it just all felt and seemed more real then any RTS I've seen today. Rather than using short cuts and making many quick games, I wanted to learn from the best on how to truly make a quality game.

    I think Planetary Annihilation was an AWESOME idea, just some bad execution. Some things may be asking for too much, but I thought the space battles were going to be bigger to some extent, with maybe Homeworld type unit control. I been playing with my brother but, we often say "Didn't TA have this? Why can't we do that in PA?".

    Please, I apologize if I come off as rude, but me and some people I talked into donating that once played TA had truly high hopes for PA. It seems like that "Band" back then simply created a masterpiece and when the "band" fell apart I see people from TA trying stuff but never seems to really leave that lasting impression that TA had.

    IDK if my questions are something they want to avoid, but if they do and if they read this, please don't abandon PA. Even if its just a few people on it please perfect it! SC had NOTHING on TA, I think if you polish and further balance or streamline PA it could very well be the next REAL competitive RTS.
    ace63 likes this.
  8. cdrkf

    cdrkf Post Master General

    Messages:
    5,760
    Likes Received:
    4,836
    Just a quick fyi.... There very much is an open source rts out there with these capabilities.... You ever come across the spring rts engine? The ta based balanced annihilation mod replicates the ta air behavior very well imo and is fully open source. Would be a good place to start from :)
  9. fuzzels

    fuzzels Member

    Messages:
    90
    Likes Received:
    34
  10. xfreezy

    xfreezy Member

    Messages:
    70
    Likes Received:
    16
    That's mostly the case in Blizzard RTS games (Starcraft, Warcraft). But for example every C&C game, Age of Empires games, TA, SupCom 1 & 2 and also PA have projectiles that your units can dodge.
  11. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    Not really true for Blizzard, C&C and Age of empires - these might have some specific weapons that can be dodged (ballista/catapults from Warcraft come to mind) but for the most part they are either instant-hit or % based chance to hit, rather than simulated (they may appear to be simulated, but it can just be a visual effect with the result already determined in advance).
    squishypon3 and Gorbles like this.
  12. igncom1

    igncom1 Post Master General

    Messages:
    7,969
    Likes Received:
    3,138
    Non-simulated projectiles is good for games that really don't require it.

    Such as games before the age of gunpowder, or games that don't want the player focusing on the interactions of projectiles, and prefer to have them always hit to keep it simple.
  13. Dementiurge

    Dementiurge Post Master General

    Messages:
    1,094
    Likes Received:
    693
    None of the weapons in said games were simulated (as the games had no volume, they were entirely 2D).
    That said, you could still dodge.

    In C&C (and Red Alert, the originals), most attacks (shells, rockets, artillery, napalm) target the ground, and you could in theory dodge out of the way before they hit. Even bullets were an area of effect attack against the ground, though you obviously can't dodge instant attacks. In practice, most units were simply too slow to manage it, though you could often reduce the game taken by getting away from the epicenter.

    In Blizzard's games, attacks always follow the target, but if the target moves sufficiently far away from its original position, the attack would 'miss' and do nothing. It's a useful mechanic in DotA.
    Quitch likes this.
  14. squishypon3

    squishypon3 Post Master General

    Messages:
    8,011
    Likes Received:
    4,368
    2D games can have Simulated projectiles, that's part of the simulation.

    Ex: Total Annihilation.
  15. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    TA was actually 3D but with a fixed camera - the units were 3D, and the terrain (underneath the 2D image) was a 3D heightmap.
    Quitch likes this.
  16. squishypon3

    squishypon3 Post Master General

    Messages:
    8,011
    Likes Received:
    4,368
    Yes, but do SC maps not do the same with heightmaps? As for the units weren't they *sometimes* 3d, depending on circumstances.
  17. Raevn

    Raevn Moderator Alumni

    Messages:
    4,234
    Likes Received:
    4,338
    I assume by SC you mean starcraft and not SupCom. Starcraft 1 units were entirely 2D (sprites), and it used layers instead of a heightmap. Starcraft 2 units are of course 3D.

    But I didn't mean to imply 2D games can't have simulated projectiles. Just clarifying that TA wasn't 2D.
  18. exterminans

    exterminans Post Master General

    Messages:
    1,890
    Likes Received:
    1,014
    The units were full 3D in the game files, and they were rendered to imposter textures for ingame display to save resources since the game only used CPU rendering. It's pretty close to "real 3D" since it still used Z buffers to correctly calculate clipping, only the orthogonal projection was inevitable since that was the prerequisite for being able to use textures rendered for a fixed resolution and view angle. So yes, the graphics were actually just 2D sprites, but the world coordinates where units and projectiles moved were 3D non the less.

    And yes, SupCom did use a heightmap as well. Besides, heightmaps are actually just 2D, that means every XY coordinate pair can only have one height value, so stuff like bridges are impossible with heightmaps. Just like in TA, the only 3D terrain elements in SC were trees, rocks and other 3D decals which had an hitbox of their own. But unlike in PA (where the planet surface is still just using a 2D heightmap as a base!), decals couldn't actually fuse with the level geometry so they could never become pathable.

    Oh, and no: 2D games can't have fully simulated projectiles. Only direct fire works in 2D, indirect fire does not. It's just not possible to have accidental direct hits with e.g. artillery shells since they have to ignore collisions in order to be able to fly "over" other units in the first place.
  19. xfreezy

    xfreezy Member

    Messages:
    70
    Likes Received:
    16
    Sorry but imo you are wrong here ^^. I played all of those games and I know for sure about that fact, because this is one of the reasons why I don't like Blizzard RTS games compared to other RTS.
    So as I said, Blizzard RTS do not have any projectile with ballistics, everything there are pretty much homing missiles or instant hits. Because Blizzard games are so well known I could see why some ppl may think that it is uncommon for RTS to have units with independant projectiles. But actually that is not very uncommon, as multiple other RTS games had that too, not only TA/SupCom. As I said, for example also C&C and AoE do have those. The implementation in those games may be different to TA (so maybe TA ran all sorts of crazy calculations due to its 2D/3D hybrid engine, while in the 2D C&C games projectiles just were aimed at the ground and had a certain speed so one could dodge them by moving onto another tile before the projectile arrived), but the result in gameplay is the same. The fact remains that you could dodge artillery shots and even ordinary tank shots (move your unit upwards when a tank standing below shoots at you) by movement in C&C1 already, and you could do that in every other C&C game aswell. You could force-fire on the ground since C&C1 aswell, so also units that were not directly targeted but moved into the impact area took damage. So with your artillery you could force-fire into the movement path of an enemy to still be able to hit the unit despite the slow moving projectile. That was not based on % or luck. In fact that was one of the things Chris Taylor was inspired by to make TA. Over time the engines became more complex, so in TibSun (C&C2) the same system as in TA might have been applied, 3D simulation rendered with a 2D fixed camera. TibSun hat different terrain heights that affected projectiles, for example the grenades of the grenadiers could be dodged, they then would bounce off the ground depending on the terrain angles. Some other units could not fire in certail height angles, for example those Nod Devils Tongues (flamethrower) had trouble firing on units on a different height level and needed a straight line of fire. In the 3D C&C games I'm pretty sure that the projectile simulations going on there were comparable to those in SupCom. For example in Generals projectiles detonated mid air when hitting something in their way (with some exceptions that where made gameplay wise (just as in SupCom), for example you could fire through friendly units/buildings). Actually this was one of the reasons that made micro in C&C great. When you had a unit that was under fire by a tank, you could sneak around a corner of a building and the incoming shots would hit the building instead of the unit. You also had to take terrain into consideration, cliffs where blocking the line of fire. Or another example: rocket troops had missiles that were slightly homing (so could still be dodged), but they ran out of fuel after a certain time, so when following an aircraft they dropped to the ground after a time and damaged stuff that they fell on. Just like aircraft that was shot down damaged the units where it crashed. China had also a scrampler unit (ECM tank) that deflected incoming rockets, making the units around it taking damage depending on where the deflected rocket impacted. So there was definitely a more sophisticated projectile game going on in that game and that was a part of the success of that title.
    Regarding other games: In Age of Empires 2 for example you can dodge the arrows of archers/turrets or the shots of catapults, nothing based on luck, just movement. In fact in AoE2 you can research an ability in the university that makes your units predict the pathing of enemies to aim more accurately (you still could dodge then but it became harder).
    And now that I think about it, also Earth2160 or Dark Reign 2 had projectiles that you could dodge.

    So no, only Blizzard RTS have that crappy implementation.

    (I wrote a german article about the ballistic projectiles in C&C games a while ago because in the now canceled Generals 2 the Dev team wanted to take the Blizzard approach of homing projectiles, that I argued against. http://www.cnc-inside.de/command-an...-mit-zielsuchender-munition-feuern-sollen-673)
    Last edited: November 27, 2014
  20. igncom1

    igncom1 Post Master General

    Messages:
    7,969
    Likes Received:
    3,138
    Well hit scan weapons are fairly easy to balance.

    Never have to worry about when it doesn't hit.

Share This Page