[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/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 - Another Game Engine

It is currently Mon Apr 23, 2018 11:24 pm Advanced search

Another Game Engine

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

Re: Another Game Engine

Postby ksdigerati » Thu Sep 30, 2010 5:28 pm

ksdigerati
Cadet
 
Posts: 2
Joined: Sun Sep 26, 2010 1:30 am

Re: Another Game Engine

Postby misterikkit » Thu Sep 30, 2010 6:37 pm

Nice looking engine! Note that on Windows I had to put double quotes around my script name because there was a space in the path.

use_quotes.png
Remember to use quotes!
use_quotes.png (4.3 KiB) Viewed 1605 times
misterikkit
Cadet
 
Posts: 3
Joined: Thu Sep 30, 2010 4:42 pm

Re: Another Game Engine

Postby StillAlive » Tue Oct 26, 2010 5:44 am

Hi! I have downloaded your game visualiser, and it works perfectly with the example bots on Windows 7.

I wrote my bot in c++ and have a mybot.cpp, PlanetWars.h and PlanetWars.cpp. In mybot.cpp, I am using new functions that I have defined in the PlanetWars.h and .cpp files. How do I run my bot? I am using Visual Studio 2010.

Thanks for the great visualiser.
StillAlive
Cadet
 
Posts: 6
Joined: Fri Sep 17, 2010 6:23 pm

Re: Another Game Engine

Postby siconize » Tue Oct 26, 2010 10:20 am

Compile your project (=make an .exe). PlanetWarrior can work with this .exe.
siconize
Captain
 
Posts: 27
Joined: Wed Oct 20, 2010 9:48 pm

Re: Another Game Engine

Postby Demerzel » Tue Oct 26, 2010 3:05 pm

Ah this is the one I was using - there is some kind of issue when it gets heavy fleet-wise where it thinks that orders are invalid that aren't.

Also the fact that it displays a turn ahead is pretty confusing, I spent so long trying to debug with this one where there were no bugs, namely that it was calling invalid orders and I thought my bot's info was a turn behind.

Then I just said screw it and it tried it on the tcp server and it worked perfectly lol
Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Another Game Engine

Postby StillAlive » Tue Oct 26, 2010 8:48 pm

Alright, I have made a .exe and tried to load my bot. However, I got the error message "Couldn't start the bot." This might be a problem with my code because my bot always issues an invalid order on the first turn, according to the official server.

How do I step through my code and watch the variable values, to see where the bug is? The debugger in Visual C++ doesn't "run" the code in the game setting, like your visualiser.
StillAlive
Cadet
 
Posts: 6
Joined: Fri Sep 17, 2010 6:23 pm

Re: Another Game Engine

Postby Demerzel » Tue Oct 26, 2010 8:53 pm

Demerzel
Colonel
 
Posts: 72
Joined: Sat Oct 02, 2010 6:06 am
Location: themendios at gee mail

Re: Another Game Engine

Postby zzz000 » Tue Oct 26, 2010 11:02 pm

zzz000
Cadet
 
Posts: 3
Joined: Thu Sep 23, 2010 8:09 pm

Re: Another Game Engine

Postby StillAlive » Wed Oct 27, 2010 5:19 am

Thanks to everyone for their help. I freely admit that I am new to programming; I've had one semester in C++ and that's it.

I see in the main() function that a PlanetWars object is initialized with a string. I copied the contents of a map file, copied its contents, and set the string to those contents, then ran the debugger. It seems that this is not the correct way to feed a map into the program because the member variables of the PlanetWars object end up not having correct values (eg pw.fleets_ is empty, pw.planets_ is empty). How do I properly feed a map in and run the first turn in Visual C++?

More importantly how do I generally debug my bot in the gamestate? What is meant by using a proxy, or by JIT? (Just-In-Time compilation?)

I'd appreciate any advice.
StillAlive
Cadet
 
Posts: 6
Joined: Fri Sep 17, 2010 6:23 pm

Re: Another Game Engine

Postby iouri_ » Wed Oct 27, 2010 7:46 pm

iouri_
Brigadier-General
 
Posts: 105
Joined: Thu Feb 11, 2010 4:16 pm
Location: Toronto, Canada

PreviousNext

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 2 guests

cron