[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4586: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4588: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4589: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
[phpBB Debug] PHP Warning: in file /includes/functions.php on line 4590: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3765)
AI Challenge Forums • View topic - Game viewer in C++ (also player&viewer merged together)

It is currently Thu Apr 26, 2018 12:00 pm Advanced search

Game viewer in C++ (also player&viewer merged together)

Code won't compile? Found a bug? Post here!

Re: Game viewer in C++ (also player&viewer merged together)

Postby albert » Mon Sep 20, 2010 4:10 pm

@ theli_ua : Thanks, applied the patch.

@ wh1teside: I have had such problems earlier while developing on this. But I thought I fixed them all because it works just fine here. Are you sure you have the latest source?

Otherwise, there is some commented-out debug output in viewer.cpp in Viewer::frame(). Put them back in and maybe they can show what the problem is. Try to reproduce the problem and if they don't help you, post them here.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby wh1teside » Mon Sep 20, 2010 5:18 pm

wh1teside
Cadet
 
Posts: 3
Joined: Mon Sep 20, 2010 1:11 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby theli_ua » Mon Sep 20, 2010 6:56 pm

theli_ua
Lieutenant
 
Posts: 14
Joined: Tue Sep 14, 2010 7:45 am

Re: Game viewer in C++ (also player&viewer merged together)

Postby albert » Tue Sep 21, 2010 9:27 pm

@wh1teside: I maybe have fixed this (problem is that I cannot reproduce it so I am not sure). It's probably because of some slightly different floating number calculation. I hope I have worked around that.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby wh1teside » Tue Sep 21, 2010 11:30 pm

albert: I tested several different game logs with your engine update, and they all step correctly during playback now. Considering you couldn't reproduce the problem it was causing me, I'm impressed that you were able to fix it so quickly. Yeah, I guess if my computer is getting old to the point where I say things like "I'm afraid to mess with such-and-such floating point calculations, because my CPU disagrees with newer ones..." it's probably about time to buy a new one. On the IRC channel the other day I was discussing some calculation differences with my system versus the results on the official server too (C++ bot). I think there's an obscure and minor architecture difference with my aging CPU core or something that GCC is unaware of... I haven't tested other compilers though.

Anyway thank you very much for taking the time to correct the issue! I hope the fix benefits more people than just myself! :lol:
wh1teside
Cadet
 
Posts: 3
Joined: Mon Sep 20, 2010 1:11 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby albert » Wed Sep 22, 2010 2:28 am

Differences in floating point calculations can have many different reasons. There can also be differences between up-to-date CPU architectures. (Actually, I don't know exact details about that.)

Another reason I know is the compiler. I have seen many cases where some compiler optimisation can have different results on such calculations. There is a bug report about GCC about that, several years old now and no real solution. And that can also change between compiler versions.

Well, I hope it works for everyone now.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby Terr » Wed Sep 22, 2010 7:45 pm

Terr
Brigadier-General
 
Posts: 155
Joined: Mon Sep 13, 2010 9:19 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby blimex » Thu Sep 23, 2010 3:32 am

> Now, after I implemented the game engine in C++ (see here), I redid the same thing for the viewer.

Great work! Thank you!
blimex
Cadet
 
Posts: 2
Joined: Thu Sep 23, 2010 3:27 am

Re: Game viewer in C++ (also player&viewer merged together)

Postby mhlakhani » Thu Sep 23, 2010 4:52 pm

This is great, thanks!
Quick suggestion: Just like with PlayGame.jar (i read this somewhere on the forum), can you make this give bots an extra second or two on their first turn so bots using java (for example) don't time out on the first turn as the VM loads?
mhlakhani
Cadet
 
Posts: 9
Joined: Mon Sep 06, 2010 6:19 pm

Re: Game viewer in C++ (also player&viewer merged together)

Postby albert » Thu Sep 23, 2010 9:48 pm

albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

PreviousNext

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest

cron