[CODE] Match, Gauntlet, & AI Test modes

All code submission.
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Atriel »

Code: Select all

2>------ Operación Generar iniciada: proyecto: SDL, configuración: Release Win32 ------
1>src\JGE.cpp(203): warning C4305: '=' : truncamiento de 'double' a 'float'
1>c:\documents and settings\atriel\mis documentos\wagic\jge\dependencies\sdl\include\SDL_config_windows.h(144): warning C4005: 'HAVE_STDDEF_H' : redefinición de macro
1>          c:\documents and settings\atriel\mis documentos\wagic\jge\dependencies\include\jconfig.h(10) : vea la definición anterior de 'HAVE_STDDEF_H'
1>src\JGui.cpp(178): warning C4244: '=' : conversión de 'float' a 'unsigned int'; posible pérdida de datos
1>src\JLBFont.cpp(146): warning C4244: '+=' : conversión de 'double' a 'float'; posible pérdida de datos
1>c:\documents and settings\atriel\mis documentos\wagic\jge\include\../Dependencies/include/fmod.h(344): warning C4005: 'FSOUND_FREE' : redefinición de macro
1>          src\pc\JSfx.cpp(15) : vea la definición anterior de 'FSOUND_FREE'
1>src\zipFS\zfsystem.cpp(508): warning C4244: 'argumento' : conversión de 'std::streamoff' a 'size_t'; posible pérdida de datos
1>src\zipFS\zstream.cpp(335): warning C4244: '=' : conversión de 'std::streamoff' a 'uInt'; posible pérdida de datos
3>------ Operación Generar iniciada: proyecto: mtg, configuración: Release Win32 ------
3>src\GameStateDuel.cpp(2296): error C2220: advertencia tratada como error; ningún archivo 'object' generado
3>src\GameStateDuel.cpp(2296): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(2300): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(2302): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(2309): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(2311): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(2322): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
========== Generar: 2 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========
Thre's no way... :(
Atriel
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Zethfox »

start a round robin, finish the first match.
exit game completely, restart it and select demo mode, best of 3.
game plays first match of demo, then continues the round robin instead of finishing the best of 3 demo.
holgern
Posts: 65
Joined: Sat Feb 02, 2013 4:50 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by holgern »

I installed visual c++ 2010 and i removed all errors, it should now compile under windows.
Atriel, can you try again?

I removed some bugs and the scoretable should display now the correct results after a match.
Attachments

[The extension zip has been deactivated and can no longer be displayed.]

[The extension zip has been deactivated and can no longer be displayed.]

Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Zethfox »

looking good, round robin bug fixed.

ai vs ai matchs now run with optimizedhands.
missalexis
Posts: 36
Joined: Sat Mar 05, 2011 7:37 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by missalexis »

Thanks for the cool patch.

I tried the latest under iOS. It compiles fine, but crashes in the same place, but not each time it's run.
Stack trace is:
GameApp::Create()
GameStateShop::GameStateShop(GameApp*)
GameStateShop::GameStateShop(GameApp*)
libstdc++.6.0.9.dylib`std::basic_string<char, std::char_traits<char>, std::allocator<char> >::basic_string(char const*, std::allocator<char> const&)

Debugger says:

wagic(41286,0x3de3eb88) malloc: *** error for object 0xea5804: incorrect checksum for freed object - object was probably modified after being freed.
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Atriel »

Finally works!. Thanks for your dedication. :D

Want me to hang in my compiled version in the post I have in Spanish? So Spanish speakers so we can test and fix errors more easily. ;)
Atriel
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Zethfox »

see that extra text on the match count menu, lets get rid of it, those options are self explanatory.
cnogmenu->Add(CNOGMENU_ITEM_BESTOF3,"Best of 3","The first player who wins 2 games,\nwins the match.");
===>
cnogmenu->Add(CNOGMENU_ITEM_BESTOF3,"Best of 3","");
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Zethfox »

case DUEL_STATE_CNOGMENU_IS_CLOSING:
if (cnogmenu->isClosed())
{ // Is the closing animation finished?
setGamePhase(DUEL_STATE_CHOOSE_DECK1);
SAFE_DELETE(cnogmenu);
}
else
cnogmenu->Update(dt);
break;

// The next state occurs when the player selected "Cancel" in the cnogmenu
case DUEL_STATE_CANCEL_CNOGMENU:
cnogmenu->Update(dt);
if (cnogmenu->isClosed())
{ // wait until menu has closed, then go back to main menu
setGamePhase(DUEL_STATE_BACK_TO_MAIN_MENU)
SAFE_DELETE(cnogmenu);
}

this removes the memleak from playing multiple matchs.
also the player doesn't need to know that the ai matchs in round robin will be determined randomly. :) leave that to imagination.

player ranking in a round robin, if we can't find a way to display the deck name instead of the deck number, then lets remove this. or just tell us what place we are in as a player.
people don't know the deck numbers by heart :P
holgern
Posts: 65
Joined: Sat Feb 02, 2013 4:50 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by holgern »

Version 2.10 is available!
Changelog
* i replaced deck numbers by its names
* SAFE_DELETE(cnogmenu); added. Thanks :)
* New KO mode. In this mode, the player has to fight all available decks. The tournament is won, if log2(number of Decks) Matches are won. (107 Decks -> the player has to win 7 Matches). The decks are shuffled.
* The new KO mode works also for AI vs AI and is a good and fast way to find out which AI_Deck is the strongest.
* the scoretable is better now
* some more bugs removed
Attachments

[The extension zip has been deactivated and can no longer be displayed.]

[The extension zip has been deactivated and can no longer be displayed.]

Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

Re: [CODE] Match, Gauntlet, & AI Test modes

Post by Zethfox »

Is everything in this patch considered release ready? please if not, let slow down on adding more modes and work on polishing this. ;) the faster it is in, the faster it gets tested, the sooner I'll add you to svn commit rights :P I'm really liking this change.
Post Reply