Version 0.4.4

Get help with compiling or installing the game, and discuss announcements of new official releases.

Moderators: Forum Moderators, Developers

Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

Yeah, multiplayer does require completely different strategies to single-player, and I think I prefer the idea of single player too.

However, it would be possible for us to investigate objective-oriented scenarios - e.g. to capture and control a certain location, or where one player has to get one of their units to a certain location, and the other player has to stop him.

David
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: A hint

Post by Dave »

zas wrote:It seems there's a bad loop somewhere:

...
ltrace.log:3007288:memcpy(0x40610008, "[multiplayer]\n\tname=The Isle of "..., 138429) = 0x40610008


obtained by ltrace -o ltrace.log ./wesnoth
gthen grep -n '\[multiplayer\]' ltrace.log
it's a truncated log.
there's a repeated memcpy(), copying each time one byte more ....

i suspect config loading code.
I am pretty sure that all these calls to memcpy() are simply standard containers moving around their underlying buffers. In particular, the stringstream used to build the result in preprocess_file(). It would be possible to optimize this by instead using a vector<char> and estimating the space needed, and calling reserve(), but I don't think that's where the performance problem is.

In the function show_title() in menu.cpp I have added a call, SDL_Delay(20); in the for(;; ) loop and it removes the high CPU on startup on my machine.

David
Last edited by Dave on September 5th, 2003, 9:52 am, edited 1 time in total.
zas
Posts: 54
Joined: August 25th, 2003, 9:58 pm
Location: France

About slow start

Post by zas »

Yes, it seems we have a looped allocation and memcpy() smt like tha t (pseudo code):

while (x) {
p = realloc(p, psize+1);
memcpy(p, src, psize+1);
...
}

About SDL_Wait(), well, if it works ;)
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Post by Dave »

miyo wrote:
Yes, I did complete Scenario 1 on first try
http://www.sgic.fi/crossbow/wesnoth/Scenario1Turn11.gz
Ahhh I see how you did it now.

My strategy was to send most the fighters the way you did, but send Delfador and Konrad and a couple of fighters along the road west, then to cross the river by Chantal, and try to head north along the edge of the playing board.

When Delfador and Konrad aren't specifically targetted, this may be a good strategy, but when they are targetted like on hard, this is probably not such a good strategy - by the time I crossed the river, I was heavily blockaded, and had to fight desperately to get through. Only a few lucky rolls allowed me to get through. Delfador was hopelessly trapped, and about to be killed next turn, but Konrad just made it to the signpost in time.

I did manage to finish the scenario with several fighters and a 4-hitpoint hero though! :-)

Unfortunately this was an intermediate version of the game which has been changed slightly since, so a replay wouldn't be possible :(

David
Dave
Founding Developer
Posts: 7071
Joined: August 17th, 2003, 5:07 am
Location: Seattle
Contact:

Re: Please provide a way to shorten downloads

Post by Dave »

zas wrote:Either provide a differential patch
against previous version or split wesnoth
I have sent a request to register the project at sourceforge. Successful registration will give access to a CVS server which will allow me to put the source in CVS. Hopefully this'll make it easier for you.

David
miyo
Posts: 2201
Joined: August 19th, 2003, 4:28 pm
Location: Finland

Post by miyo »

Dave,

you might want to try Savannah - http://savannah.gnu.org/

- Miyo
gandalf
Posts: 157
Joined: August 24th, 2003, 4:15 pm
Location: Sweden

compile problem

Post by gandalf »

Hello, with 0.4.4 I had two errors when compiling.
I fixed it with 3 include lines in the code.
I use Debian Linux 3.0 with gcc 2.95.4 (oldish)

The changes:
In namegen.cpp

#include <cstdio>

In map.cpp
#include <algorithm>
Post Reply