Announcement

Collapse
No announcement yet.

Why So Slow? What's the Bottleneck?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • #46
    The issue is the mental bottleneck at Firaxis when they departed from their previous sound policy of writing software designed to include as many people as possible and not just the tech heads.

    Comment


    • #47
      As Conquerer said, buy more RAM! 64Mb is definitely not enough RAM these days. Despite my post about possible slowing of some systems with too much RAM I would guess that 256 Mb is a nice round number (its what I use). 128 is OK but maybe not enough these days. Given the colour probs, it also sounds like your video card or motherboard is crappy. Is this an E machine or something?
      We need seperate human-only games for MP/PBEM that dont include the over-simplifications required to have a good AI
      If any man be thirsty, let him come unto me and drink. Vampire 7:37
      Just one old soldiers opinion. E Tenebris Lux. Pax quaeritur bello.

      Comment


      • #48
        Originally posted by Shadowlord
        (I'm getting sick of having to reboot 3 times before I can play Civ....)
        If you have to reboot, the problem is your computer. First buy more RAM - as much as you can. Then clean out as much as you can and re-install windows. Or get it to the shop, you definately have a problem with your computer.
        Sorry....nothing to say!

        Comment


        • #49
          Originally posted by jimmytrick
          The issue is the mental bottleneck at Firaxis when they departed from their previous sound policy of writing software designed to include as many people as possible and not just the tech heads.
          Question for you jt: Do you blame Firaxis for everything? You act like they stole your girlfriend. Relax. It's all ok. Just stupid computers and stupid computer games. It doesn't really matter in the real world.
          Sorry....nothing to say!

          Comment


          • #50
            Originally posted by jimmytrick
            Poor design or poor coding. One or the other or both. Unacceptable. If I were running Firaxis and they brought me something like this to release I would see that they learn to respect people of moderate means by long stints in the unemployment line.
            I have to agree with this one... Civ3 is a TURN BASED strategy game. Keeping that in mind, think about other games strategy games you've played (assuming TBS games aren't the only you play) like the Command & Conquer genre, Age of Empires, etc. They work in real time, and do a pretty good job of it, without the 45 sec to 2 min lag between moves that you see in Civ3.

            I really have no clue what is taking so much in the way of resources in the games. Civ3 isn't graphic intensive or anything, as the units mainly just sit there until you move them, so it isn't the heavy-duty graphics causing slowdowns like you get in other real time games. Note that graphic rendering is what primarily causes games to need so much horsepower these days. Some might argue that it is the AI learning routes or developing its strategy -- again, you don't see that kind of significant slowdown on real time games.

            Without having access to the code, the best I can do is speculate that there is a single-threaded engine that decides unit movements and strategy. Real time games are multi-threaded in that respect... You don't see the AI in Age of Empires taking two minutes to figure out where to individually move its units because the multi-threaded engine allows calculations for many units at the same time. Also, real time games tend to re-use routes it discovers; I don't believe that to be the case with Civ3. To sum things up, by comparing it to other strategy games, you can call it inefficient code without being a "Firaxis sucks" groupie.

            -- twistedx

            Comment


            • #51
              Firaxis is capable of good work. Gettysburg, for example was a nice game.

              Comment


              • #52
                Well, I've noticed, at the periphery of my empire, that the AI engages in a cycle of 'activate/fortify' with AFAICT *all* of it's units *each* turn. That *has* to slow things down when you're talking about hundreds of AI units on large maps.

                Cheers,

                Dr. Charm

                Comment


                • #53
                  Not to get anyone hopes up, but maybe the reason behind the compressed saves is that they are getting ready to implement PBEM multi-play?

                  Just a thought.
                  "In Italy for 30 years under the Borgias, they had warfare, terror, murder and bloodshed. But they produced Michelangelo, Leonardo da Vinci and the Renaissance. In Switzerland, they had brotherly love. They had 500 years of democracy and peace. And what did that produce? The cuckoo clock."
                  —Orson Welles as Harry Lime

                  Comment


                  • #54
                    Good thought
                    We need seperate human-only games for MP/PBEM that dont include the over-simplifications required to have a good AI
                    If any man be thirsty, let him come unto me and drink. Vampire 7:37
                    Just one old soldiers opinion. E Tenebris Lux. Pax quaeritur bello.

                    Comment


                    • #55
                      Originally posted by ACooper
                      jt you obviously know nothing of design, coding or computers. The reason the game runs slow is because of the computers, not the game. If people would properly maintain and work their computers they would find that the game runs just fine. (Or they could pay my standard $135 / hr fee and I'll do it for them. )
                      Most of the time it is the computer hardware that will make most of the difference but I can remember a unix programing class I took when I was an undergraduate at UC Santa Barbara whne the professor would show how he could take almost any program and reduce the size of the code by 20%-30% and still have it run faster.
                      If I recall correctly the problem was most programers just piece togeather premade pieces of code that they got from a few of the programing utilities. They do this so they don't have to "reinvent the wheel" every time they want to proform a certain function; thus making programing cheaper, faster, and easier.
                      The down side is the programs are not optimized to proform with the least amount of code so the computer ends up running WAY more functions then it needs to and ties up tons of resources.
                      If we had better coding then we wouldn't need such powerful machines. That said it would be very labor intensive which is why I myself will not do it.
                      Try http://wordforge.net/index.php for discussion and debate.

                      Comment


                      • #56
                        Good points Oerdin.

                        Add to that the limit of what people will pay for software and you flesh out the trend towards bloat-ware in general.
                        (\__/)
                        (='.'=)
                        (")_(") This is Bunny. Copy and paste bunny into your signature to help him gain world domination.

                        Comment


                        • #57
                          For what it's worth, I'm glad to see this conversation has taken a more objective tone rather than "stop whining, you troll!", "Firaxis sucks!", or "upgrade to 2 gigs of RAM!"

                          -- twistedx

                          Comment


                          • #58
                            Stop whining you troll.
                            (\__/)
                            (='.'=)
                            (")_(") This is Bunny. Copy and paste bunny into your signature to help him gain world domination.

                            Comment


                            • #59
                              And upgrade to 2 gigs of RAM!
                              I'm building a wagon! On some other part of the internets, obviously (but not that other site).

                              Comment


                              • #60
                                Im pretty sure its both the path finding and the culture

                                Culture because in late games for me on larger maps if I found a city or raze one (or abandon now), there is a noticable 3 second or so lag. I can only assume the same happens between turns if the AI does so. However, this probally isn't too big of a deal because I can't notice any lag at all when a culture radius expands, and how often are cities being added/destroyed/changing hands in the late game. In most of my games, its at least far from every turn. This could also easily be attributed to the trade networks though and not culture, and in fact, maybe more likely since Ive only seen it with adding/removing cities from an empire. There's also a good chance that the trade networks use a variant (hopefully a variant since you only need a path not the shortest one) of the path finding.

                                About pathfinding..... It could probally be improved alot by assuming the ocean/sea/coastal tile shortest paths won't change throughout the entire game (no roads/railroads). Then when a game starts, just compute a series of evenly spaced waypoints (10 or so tiles apart), and the shortest path between any two waypoints and save that. Then movement on the sea would boil down to move from start to closest waypoint, move from waypoint to waypoint closest to destination, move to destination. Its a little less efficient (closer waypoints make it more efficient but use more mem), but assuming the pathfinding doesnt look at the whole world to move 10 spaces it should be alot faster. Course, I could be a moron and they are already using waypoints rather than trying to compute the paths directly. Something similar could be used on land, but it'd be more annoying to players (since moving out of the way obviously would waste turns), and be subject to changes due to roads/rails. However, on most maps, the land situation could be helped by breaking the map up into continents for the pathfinding routine. Afterall, why does the world size matter when most of the time you want to move over land from point a to b using a land unit that only has a few hundred possible tiles it can move to anyways. For all intent and purposes the world for that land unit isn't going to be 120x120, it's going to be more like 20x10 (or whatever the continent size is)

                                The other issue is yes, the ai does still seem to have a need to expend all the movement points it has on non defending units. In my last game this was readily obvious when the chinese had a small city on an island with me that controlled 4 tiles of the island (the city square plus 3 around it, their culture border never expanded and mine met with it). THey had 2 or 3 calvary stationed in the city, and everyturn id watch them all move in a circle along that cities small borders. If they are going to let the ai see the whole map, then they might as well take advantage of that assumption and kill stupid patrols.

                                PS:
                                Im running a athlon 900 with 512 megs Performance tends to start lagging for me (within acceptable levels) once a larger world fills up. Typical waits though are no more than 6-10 seconds a turn max if im playing the large map size. For huge, its probally more like 15-20 seconds a turn.

                                EDIT: Few more pathfinding speedups that can be used
                                First, they probally already have every unit remember the path its going to take. Thats a pretty large use of memory though. Assuming 1 byte per tile remembered on a path and the largest map size (256x256, I think), thats 64x256 max possible tiles to remember. Or 16k mem per unit for path remembering. (64 because only half the horizontal tiles are used and the map wraps in that direction so worst case your halfway around the world) This could be cut down using the waypoint system mentioned above though on the ocean though, and except on true pangeas, a land unit isn't going to be moving that far unassisted anyways.

                                Secondly, there could be a path cache. Since most calls to the pathfinder will tend to be repetive in a given turn (especially with stack movement, surely with stack movement they only make 1 call to the pathfinder already). They can simply remember the start/destination and path computed for every call made to the pathfinder on that turn, and if a second identical call is made skip right to the shortest path we already found. Since the ai probally doesn't use stack movement, that should help out a good bit with large ai unit stacks.
                                Last edited by wervdon; April 24, 2002, 05:30.

                                Comment

                                Working...
                                X