[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 - Game engine in C++

It is currently Wed Oct 18, 2017 12:42 pm Advanced search

Game engine in C++

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

Re: Game engine in C++

Postby delt0r » Thu Sep 16, 2010 7:04 pm

But these echo bots don't produce any fleets. Whats the point? To test sever performance you need fleets and combat.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: Game engine in C++

Postby Terr » Thu Sep 16, 2010 7:10 pm

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

Re: Game engine in C++

Postby igner » Thu Sep 16, 2010 7:40 pm

igner
Lieutenant
 
Posts: 10
Joined: Sun Sep 12, 2010 10:54 am

Re: Game engine in C++

Postby odinsbane » Fri Sep 17, 2010 2:32 am

In regards to the difference in game play. In the java version they use a tree map. This guarantees the order, so in a three way tie, I think the nuetral wins. I don't know if this is guaranteed in the c++ version.

mbs
odinsbane
Cadet
 
Posts: 4
Joined: Fri Sep 17, 2010 2:29 am

Re: Game engine in C++

Postby delt0r » Fri Sep 17, 2010 7:13 am

A little OT.

Terr, don't use scanner, its really slow. I don't know why, but StringTokenizer with Integer.parseInt parsed 400000 fleets in 0.1 secs while it took scanner 6.6 seconds. Don't get me wrong, java can be really really really slow done wrong (much more so that C++) and the provided api's have a pretty large spread in quality.

Of course YMMV.
It was like that when I got here.
User avatar
delt0r
Colonel
 
Posts: 89
Joined: Sun Sep 12, 2010 8:03 am

Re: Game engine in C++

Postby albert » Fri Sep 17, 2010 12:53 pm

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

Re: Game engine in C++

Postby odinsbane » Fri Sep 17, 2010 6:36 pm

I thought a discrepancy was unresolved from previously, @theli_ua. I haven't tried to compile/run the code. I didn't realize std::map was a sorted map. I was just offering a suggestion.

Ill give it a try this weekend though.
odinsbane
Cadet
 
Posts: 4
Joined: Fri Sep 17, 2010 2:29 am

Re: Game engine in C++

Postby Terr » Fri Sep 17, 2010 8:16 pm

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

Re: Game engine in C++

Postby StillAlive » Fri Sep 17, 2010 10:15 pm

Hi albert,

I'm new to programming in general and am trying to set up your game engine and viewer with Microsoft Visual Studio 2010 on windows 7. What I've done is downloaded the zip file from your site http://github.com/albertz/planet_wars-cpp, grouped the files into a project and hit "compile". I listed the errors I got while compiling at the end of my post. I seem to be missing SDL.h, sys/time.h and unistd.h.

How should I find those .h files? Also, how do I encorporate my own mybot.cpp, planetwars.h and planetwars.cpp into your game engine? Finally, how do I test my bot against another?

Sorry for these basic questions. I'll appreciate any help. Thanks in advance.


1>viewer.cpp(10): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
1> utils.cpp
1>utils.cpp(7): fatal error C1083: Cannot open include file: 'sys/time.h': No such file or directory
1> showgame.cpp
1>showgame.cpp(10): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
1> SDL_picofont.cpp
1>c:\users\user\desktop\andy's folder\stillalive with albert's code\albertz-planet_wars-cpp-2994b0a\SDL_picofont.h(16): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
1> process.cpp
1>process.cpp(14): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1> playnview.cpp
1>c:\users\user\desktop\andy's folder\stillalive with albert's code\albertz-planet_wars-cpp-2994b0a\process.h(14): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
1> gfx.cpp
1>gfx.cpp(10): fatal error C1083: Cannot open include file: 'SDL.h': No such file or directory
1> game.cpp
1> engine.cpp
1>c:\users\user\desktop\andy's folder\stillalive with albert's code\albertz-planet_wars-cpp-2994b0a\process.h(14): fatal error C1083: Cannot open include file: 'unistd.h': No such file or directory
StillAlive
Cadet
 
Posts: 6
Joined: Fri Sep 17, 2010 6:23 pm

Re: Game engine in C++

Postby albert » Sat Sep 18, 2010 3:46 am

First, you need SDL for the viewer. (That is easy. Just download it and install as described. Or if you don't want the viewer, just skip that.)

Then, this code (or some small parts of it) currently only runs on Linux/Unix/MacOSX (or probably anything except Windows). don't have Windows here so I cannot really test and port it to Windows, sorry. But maybe someone else already did the work or is interested in it and can share the work with you.

Another solution would be to use Cygwin which is kind of a POSIX layer on top of Windows and other people here reported that it compiles fine on Windows with Cygwin. However, that may have some other drawbacks (not sure exactly; probably the performance is a bit worse).
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 2 guests

cron