It is currently Mon Jan 22, 2018 2:15 am 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 mhlakhani » Fri Sep 24, 2010 5:34 pm

Thank you. However it might be better to just have a longer timeout instead of no time out. Case in point: a bot that crashes and doesn't play a move. I guess this viewer would just wait forever for its input in that case..
mhlakhani
Cadet
 
Posts: 9
Joined: Mon Sep 06, 2010 6:19 pm

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

Postby Evgenius » Sat Sep 25, 2010 4:27 pm

I think map aspect ratio shouldn't depend on size of window or anything. I mean, if the map's width is equal to its height, you should draw it accordingly, not distorting distances between planets, so it's easy to measure distances "by sight".
Evgenius
Major
 
Posts: 37
Joined: Fri Sep 10, 2010 10:16 am
Location: Minsk, Belarus

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

Postby albert » Sat Sep 25, 2010 5:34 pm

@mhlakhani: Yea, you are right. Esp. if it is used in scripts. For a single bot debugging session, no timeout is better for me. But I just made it configureable now so that you can just put whatever timeout you want (default is no timeout though, so that when I call it manually, I don't need any extra options).

@Evgenius: Maybe. I didn't really saw this as such a big problem. And I liked the possibility to scale the map in both width/height independently so I always get it like the size of the window. I don't feel like implementing something like this right now but I am happy to accept any patches here which add such an option.
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

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

Postby Evgenius » Sat Sep 25, 2010 5:44 pm

albert, I came to this conclusion when I was wondering why my bot attacks a relatively distant planet when there is the same planet closer. I looked into logs and found out that my bot is doing everything right, it's just different scales along axes X and Y that sometimes can be very confusing.
I fixed this in my local copy, but it was an older version of your viewer and also I don't know how to make patches :)
Evgenius
Major
 
Posts: 37
Joined: Fri Sep 10, 2010 10:16 am
Location: Minsk, Belarus

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

Postby davidkelly999 » Fri Oct 01, 2010 12:56 am

Hello,

Nice viewer. I like it. Just one thing I noticed. When the planet is small, it does not show up on the map, and makes it hard to determine who has control of the planet (a good example of this is on the center of map 1)

David
davidkelly999
Lieutenant
 
Posts: 10
Joined: Sun Sep 12, 2010 4:26 am

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

Postby hexist » Mon Oct 04, 2010 1:54 am

Attached are some patches to this to do three things:

1) Adds a yellow planet id number above the planet ship count
2) Changes the planet radius formula so zero sized planets are visible
3) Scales the map proportionally so relative distances can be eyeballed between planets

I dunno if the creator wants any of these changes, but for anyone else who does here they are.
Attachments
patches.zip
(1.66 KiB) Downloaded 68 times
hexist
Cadet
 
Posts: 9
Joined: Sat Feb 06, 2010 5:14 am

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

Postby albert » Mon Oct 11, 2010 8:35 am

Thanks hexist, I applied your patches and changed them slightly (I already resize the window in a way that the window keeps the 1:1 ratio).
albert
Lieutenant-Colonel
 
Posts: 44
Joined: Sun Sep 12, 2010 9:11 pm

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

Postby Silent_Sky » Thu Nov 04, 2010 9:54 am

Good time!

Please put the latest compiled version for windows.

Thank you.
Silent_Sky
Cadet
 
Posts: 1
Joined: Thu Nov 04, 2010 9:52 am

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

Postby rangzen » Sun Nov 14, 2010 7:43 pm

Thank you very much for sharing this piece of code !
User avatar
rangzen
Lieutenant-Colonel
 
Posts: 42
Joined: Sun Sep 12, 2010 6:14 pm

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

Postby IADaveMark » Thu Nov 18, 2010 12:22 am

I'm a little confused about how to run this thing... I downloaded the code listed in the original post. All the solution and project files are listed in directories below the actual source code files, however. Therefore, VS2008 is getting awfully confused when it tries to build the projects. What am I missing here?
IADaveMark
Cadet
 
Posts: 2
Joined: Wed Nov 17, 2010 11:28 pm

PreviousNext

Return to Technical Issues

Who is online

Users browsing this forum: No registered users and 1 guest