Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - softcoder

Pages: 1 ... 86 87 88 89 [90]
2226
Does it happen when you have a lot of models on the screen or does it happen even when very little activity is taking place? Edit your glest.ini and set DebugMode=1 and you will see additional stats. What kind of fps do you get and what do the other stats show?

Thanks

2227
Bug report / Re: I still have this problem (0xc0150002)
« on: 31 March 2009, 05:05:53 »
Are you able to play any other games that use OpenGL (graphics) and OpenAL (sound)?

2228
Is this in multi-player mode (network) or single player mode.

2229
Multiplayer / Re: multiplayer lag
« on: 31 March 2009, 02:04:09 »
Just an FYI I replied to this in the bugs group so go there for more details.

2230
To answer the original question, I beleive the networkconsistencychecks flag in the glest.ini file may possibly be why? It seems to do a CRC check of various files on all networked pc's and on different OS's (windows. linxu, mac) you would get different CRC values for some files (definately the main binary if it checks that.. i have not looked at that part of the code yet). But setting the consistency checks to 0 in the glest.ini you should be able to connect but you'll likely have other synchronization issues.

Thanks

2231
Bug report / Re: I still have this problem (0xc0150002)
« on: 31 March 2009, 01:37:12 »
I think you'll need to give more details about your error. When does the error occur, what video card are you using, what operating system, did glest ever work, what version of glest are you using?

Thanks

2232
Bug report / Found the reason why network play can be very slow
« on: 31 March 2009, 01:33:42 »
I have recently been hacking away at the glest 3.2.1 code and fixed a bunch of network play items. Today I found out why numti-player network mode can get very slow and choppy... and I have a fix. The key problem (in my opinion) in the glest code is the fact that all the subsystems run in the content of only 1 thread. That means when multi-player network mode is enabled.. for every x frames of gameplay glest tries to process network messages (which can be VERY slow depending on your network configuration and response times of other clients). I did some tweaks and found that there are two sections of code that process network messages. I wrapped those two sections into pthreads so that the networking can run in parallel with the rest of glest.... and now when we play 4 player mode... nothing is choppy and all the commands are sent properly in the background. Even the server gets around 60fps!

I would call the current code that I have more or less a hack of the glest code as it was an attempt to understand what glest was doing and why 4 player network mode was so slow. If anyone is interested or has experienced this same issue perhaps we could work with the glest authors to add multi-threaded mode?

Thanks

2233
Bug report / Re: Tech build nothing...
« on: 30 March 2009, 15:56:00 »
Just started looking at Glest code this past week, but you should be able to debug the AI by looking at what your faction is doing through the AI engine. Edit glest.ini and add:

AiLog=99999 # I picked 99999 cause I don't know the max loglevel, the logfile will get created called aiXX.log where XX is a faction index number
AiRedir=1     # only use this if you want glest to output to console instead of a logfile

I got this info from the code below:

logLevel= Config::getInstance().getInt("AiLog");
redir= Config::getInstance().getBool("AiRedir");

string getLogFilename() const   {return "ai"+intToStr(factionIndex)+".log";}

2234
Bug report / Re: Found and corrected bugs in 3.2.1
« on: 29 March 2009, 00:29:43 »
As we did with Blood Frontier so we did with those factions in glest... we modified those models / animations / sounds to suit our acceptance. In the case of Blood Frontier we re-branded the game "TeamFest" :) in addition to modifying models etc. before deploying on the workstations.

Thanks

2235
Bug report / Re: Found and corrected bugs in 3.2.1
« on: 28 March 2009, 22:33:59 »
My sons and I are getting involved in some open source projects. Glest and BloodFrontier are both games that we download and mod them to suit our needs (due to our Christian Faith we don't play with magic etc). My sons recently got blender working and the glest plugins for blender too. They are making new factions with new models and tweaking the xml settings to ensure fair play.

With that said.. because we are always changing content (for the next while) having consistency checks turned on would make things very difficult for network play since everything has to match (but for now they won't while we are editing things). This is why we turned off the checks. Also I found by changing the static const int networkFramePeriod= 30; (instead of 10) also made things much more stable and we are able to play a long 3 player game (4 player still seems VERY choppy and unusable for some reason). At some point we may post the new factions but not until the bugs have been worked out.

Thanks

2236
We have 6 Ubuntu's here as well (all running 8.10)... using a mix of both NVidia and ATI.

2237
Bug report / Re: Found and corrected bugs in 3.2.1
« on: 28 March 2009, 19:23:05 »
One more thing... we play with network consistency checks turned off... there is a basic problem (i'm sure there are numerous others) when running in this mode.. the most significant one is that all connected computers must have the exact same # of units and they must be loaded in the same order. This is due to how units get loaded in glest.. they get loaded alphabetic i think and a unique ID is assigned to each unit (starting at 1). This ID gets passed around during game play and if one client tells the others to do a command or use a unit that the others don't know about.. get get game out of synch errors. On my end I added a new network message that does a kind of handshake between server and all clients to check the total unit count just before starting the game (After all units are loaded on each PC). If the loaded unit counts are not equal then the game quits (but at least you know there is a problem with unit count mismatch).

Thanks

2238
We have seen this kind of thing also in Ubuntu. It may have to do with your screen saver trying to kick-in (or some other background process interrupting Glest). Also I noticed that if I run google earth and leave it sitting in the background.. when I load Glest it goes to an FPS of 0 and I have to kill the process. Also if you have dual monitor and have it configured as one big monitor (ie twinview) then glest (and all other opengl) games get confused and try to re-center the game improperly and move the game partially off the screen.

Thanks

2239
Bug report / Found and corrected bugs in 3.2.1
« on: 28 March 2009, 09:29:13 »
My family and I have been playing (and creating our own factions) for the past number of months. Since v3.2.1 (we use the linux version in Ubuntu 8.10) we noticed when playing on our LAN with 3 players that we get numerous crash scenarios or corrupt game starts. After spending a long time debugging I have found a few items that the authors should possibly look at in order to fix these:

1. Firstly there seems to be a random timing issue when opening a socket (not sure if this is linux specific). I added some retry code to allow glest to not crash but simply wait until the socket is available:

Code: [Select]
void ClientSocket::connect(const Ip &ip, int port){
sockaddr_in addr;
memset(&addr, 0, sizeof(addr));

    addr.sin_family= AF_INET;
addr.sin_addr.s_addr= inet_addr(ip.getString().c_str());
addr.sin_port= htons(port);

int err= ::connect(sock, reinterpret_cast<const sockaddr*>(&addr), sizeof(addr));
if(err < 0) {
    char szBuf[1024]="";
    sprintf(szBuf,"#2 Error connecting socket for IP: %s for Port: %d err = %d errno = %d [%s]",ip.getString().c_str(),port,err,errno,strerror(errno));
    fprintf(stderr,szBuf);

        if (errno == EINPROGRESS) {

            fd_set myset;
            struct timeval tv;
            int valopt;
            socklen_t lon;

            fprintf(stderr, "EINPROGRESS in connect() - selecting\n");
            do {
               tv.tv_sec = 10;
               tv.tv_usec = 0;

               FD_ZERO(&myset);
               FD_SET(sock, &myset);

               err = select(sock+1, NULL, &myset, NULL, &tv);

               if (err < 0 && errno != EINTR) {
                  sprintf(szBuf, "Error connecting %d - %s\n", errno, strerror(errno));
                  throwException(szBuf);
               }
               else if (err > 0) {
                  // Socket selected for write
                  lon = sizeof(int);
                  if (getsockopt(sock, SOL_SOCKET, SO_ERROR, (void*)(&valopt), &lon) < 0) {
                     sprintf(szBuf, "Error in getsockopt() %d - %s\n", errno, strerror(errno));
                     throwException(szBuf);
                  }
                  // Check the value returned...
                  if (valopt) {
                     sprintf(szBuf, "Error in delayed connection() %d - %s\n", valopt, strerror(valopt));
                     throwException(szBuf);
                  }

                  errno = 0;
                  fprintf(stderr, "Apparent recovery for connection sock = %d, err = %d, errno = %d\n",sock,err,errno);

                  break;
               }
               else {
                  sprintf(szBuf, "Timeout in select() - Cancelling!\n");
                  throwException(szBuf);
               }
            } while (1);
        }

        if(err < 0)
        {
            throwException(szBuf);
        }

        fprintf(stderr, "Valid recovery for connection sock = %d, err = %d, errno = %d\n",sock,err,errno);
}
}

2. The random corrupt startups occurs due to an incomplete NetworkMessageLaunch message sturcture. This structure does not contain 3 additional booleans that exist in the gamesettings class and therefore some network players start with 0 resources and/or units. I corrected that by modifiying the NetworkMessageLaunch class:
Added these 3 missing booleans:

        int8 defaultResources;
        int8 defaultUnits;
        int8 defaultVictoryConditions;

like this:

Code: [Select]
class NetworkMessageLaunch: public NetworkMessage{
private:
static const int maxStringSize= 256;

private:
struct Data{
int8 messageType;
NetworkString<maxStringSize> description;
NetworkString<maxStringSize> map;
NetworkString<maxStringSize> tileset;
NetworkString<maxStringSize> tech;
NetworkString<maxStringSize> factionTypeNames[GameConstants::maxPlayers]; //faction names

int8 factionControls[GameConstants::maxPlayers];

int8 thisFactionIndex;
int8 factionCount;
int8 teams[GameConstants::maxPlayers];
int8 startLocationIndex[GameConstants::maxPlayers];
int8 defaultResources;
        int8 defaultUnits;
        int8 defaultVictoryConditions;

};

private:
Data data;

public:
NetworkMessageLaunch();
NetworkMessageLaunch(const GameSettings *gameSettings);

void buildGameSettings(GameSettings *gameSettings) const;

virtual bool receive(Socket* socket);
virtual void send(Socket* socket) const;
};

NetworkMessageLaunch::NetworkMessageLaunch(const GameSettings *gameSettings){
data.messageType=nmtLaunch;

data.description= gameSettings->getDescription();
data.map= gameSettings->getMap();
data.tileset= gameSettings->getTileset();
data.tech= gameSettings->getTech();
data.factionCount= gameSettings->getFactionCount();
data.thisFactionIndex= gameSettings->getThisFactionIndex();
data.defaultResources= gameSettings->getDefaultResources();
    data.defaultUnits= gameSettings->getDefaultUnits();
    data.defaultVictoryConditions= gameSettings->getDefaultVictoryConditions();

for(int i= 0; i<data.factionCount; ++i){
data.factionTypeNames[i]= gameSettings->getFactionTypeName(i);
data.factionControls[i]= gameSettings->getFactionControl(i);
data.teams[i]= gameSettings->getTeam(i);
data.startLocationIndex[i]= gameSettings->getStartLocationIndex(i);
}
}

void NetworkMessageLaunch::buildGameSettings(GameSettings *gameSettings) const{
gameSettings->setDescription(data.description.getString());
gameSettings->setMap(data.map.getString());
gameSettings->setTileset(data.tileset.getString());
gameSettings->setTech(data.tech.getString());
gameSettings->setFactionCount(data.factionCount);
gameSettings->setThisFactionIndex(data.thisFactionIndex);
gameSettings->setDefaultResources(data.defaultResources);
    gameSettings->setDefaultUnits(data.defaultUnits);
    gameSettings->setDefaultVictoryConditions(data.defaultVictoryConditions);

for(int i= 0; i<data.factionCount; ++i){
gameSettings->setFactionTypeName(i, data.factionTypeNames[i].getString());
gameSettings->setFactionControl(i, static_cast<ControlType>(data.factionControls[i]));
gameSettings->setTeam(i, data.teams[i]);
gameSettings->setStartLocationIndex(i, data.startLocationIndex[i]);
}
}

Pages: 1 ... 86 87 88 89 [90]
anything