[CODE] Match, Gauntlet, & AI Test modes

All code submission.
Locked
holgern
Posts: 65
Joined: Sat Feb 02, 2013 4:50 pm

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

Post by holgern »

In Version 2.3, i add a unbalanced credit screen for human player.

The basis credit value is 400 plus: for each won game 100, for each won match 100, perfect bonus 500 and "80 percentage of games won" bonus of 250.
I know that this is not fair, but just a first try.

I will clean up the code and i will try to improve the credit and score screen.

Your Feedback is needed!
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.]

holgern
Posts: 65
Joined: Sat Feb 02, 2013 4:50 pm

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

Post by holgern »

I am now very happy with my tournament mod. I improved the score screen a lot in this new version. It is fun to play more then one game against hard AI decks.
I will add a KO-tournament mode, by which the playes against all AI decks. The number of games is log2(number of ai decks available) and the decks are choosen randomly, e.g. for 107 decks available, 6 ai decks are selected randomly. The player can only win, if he win all matches.

The credit screen has to be improved and balanced.

The following is already possible with my tournament mod:
* Play more then one game gainst a single deck. As after each game the tournament is stored, something like a sideboard is possible. You can play one game, go to the main screen, go to the deck editor and change your deck and then go to continue tournament.
* A round robin tournament against some different ai decks. All ai vs ai games are decided randomly, as real ai vs ai matches would by boring (this would be possible, but is deactivated at the moment).
* For won matches and tournament you will get credits
* It is possible to rank your ai decks, by let them play against. The results are stored. A ai -deck can be play against all other decks (choose demo, ai deck and then gauntlet) or all ai decks plays against each other (chose demo, gauntlet and again gauntlet)

*changelog
-tournament.dat is saved in player dir

Ok new version is online.
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.]

Last edited by holgern on Mon Feb 25, 2013 9:54 am, edited 2 times in total.
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

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

Post by Zethfox »

I'm currently waiting for internet to transfer to my new apartment, I'm excited to see the changes, I'm limited to only phone internet now :/
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

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

Post by Zethfox »

just a quick note,
(mParent->gameType == GAME_TYPE_CLASSIC || mParent->gameType == GAME_TYPE_DEMO)
this does not actually restrict it to demo and classic,
reason is
all modes that are not demo are classic, except mimor and story.
test suite and aiab test are both demo gametype.
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

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

Post by Atriel »

I can't compile this mod. I use the versión 2.4 and SVN r4723.
Atriel
holgern
Posts: 65
Joined: Sat Feb 02, 2013 4:50 pm

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

Post by holgern »

What is the error message? I can only compile my with, when i remove the following line unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror from wagic-qt.pro.
Ich changed
unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
to
#unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

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

Post by Atriel »

holgern wrote:What is the error message? I can only compile my with, when i remove the following line unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror from wagic-qt.pro.
Ich changed
unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
to
#unix|macx:!maemo5:!symbian:QMAKE_CXXFLAGS += -Werror
Let's see, I'll explain the steps I do:

1. I Download the latest SVN.
2. Take the files Credits.cpp and GameStateDuel.cpp and place them in mtg/src.
3. Take the files Credits.h and GameStateDuel.h and place them in mtg/include.
4. Make a clean solution.
5. Build the game.

It makes me many mistakes in credits and gamestateduel files, and i can't generate wagic.exe

What's wrong?
Atriel
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

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

Post by Atriel »

There's the code generated by Visual Studio 2010:

Code: Select all

1>------ Operación Generar iniciada: proyecto: JGE, configuración: Release Win32 ------
2>------ Operación Generar iniciada: proyecto: SDL, configuración: Release Win32 ------
1>  SDL_windows_main.c
2>  SDL_windows.c
2>  SDL_clipboardevents.c
2>  SDL_gesture.c
2>  SDL_touch.c
2>  e_atan2.c
2>  e_log.c
1>  Encoding.cpp
1>  JAnimator.cpp
2>  e_pow.c
2>  e_rem_pio2.c
2>  e_sqrt.c
2>  k_cos.c
2>  k_rem_pio2.c
2>  k_sin.c
2>  s_atan.c
2>  s_copysign.c
2>  s_cos.c
2>  s_fabs.c
2>  s_floor.c
2>  s_scalbn.c
2>  s_sin.c
2>  SDL_render_d3d.c
2>  Generando código...
1>  JApp.cpp
2>  Compilando...
2>  SDL_render_gl.c
1>  JDistortionMesh.cpp
2>  SDL_shaders_gl.c
2>  SDL_render.c
2>  SDL_yuv_mmx.c
2>  SDL_yuv_sw.c
1>  JFileSystem.cpp
1>  JGameObject.cpp
2>  SDL_blendfillrect.c
2>  SDL_blendline.c
2>  SDL_blendpoint.c
2>  SDL_drawline.c
2>  SDL_drawpoint.c
2>  SDL_render_sw.c
2>  SDL.c
2>  SDL_assert.c
1>  JGBKFont.cpp
2>  SDL_atomic.c
2>  SDL_spinlock.c
1>  JGE.cpp
2>  SDL_audio.c
2>  SDL_audiocvt.c
2>  SDL_audiodev.c
2>  SDL_audiotypecvt.c
2>  SDL_hints.c
2>  Generando código...
1>src\JGE.cpp(203): warning C4305: '=' : truncamiento de 'double' a 'float'
1>  JGfx.cpp
1>  JGui.cpp
1>src\JGui.cpp(178): warning C4244: '=' : conversión de 'float' a 'unsigned int'; posible pérdida de datos
2>  Compilando...
2>  SDL_log.c
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>  JLBFont.cpp
2>  SDL_nullframebuffer.c
2>  SDL_blit.c
2>  SDL_blit_0.c
2>  SDL_blit_1.c
2>  SDL_blit_A.c
2>  SDL_blit_auto.c
2>  SDL_blit_copy.c
1>  JLogger.cpp
2>  SDL_blit_N.c
2>  SDL_blit_slow.c
2>  SDL_bmp.c
2>  SDL_compat.c
1>src\JLBFont.cpp(146): warning C4244: '+=' : conversión de 'double' a 'float'; posible pérdida de datos
2>  SDL_cpuinfo.c
1>  JMD2Model.cpp
2>  SDL_clipboard.c
2>  SDL_shape.c
2>  SDL_dibaudio.c
1>  JNetwork.cpp
2>  SDL_diskaudio.c
2>  SDL_dummyaudio.c
2>  SDL_dx5audio.c
2>  SDL_dxjoystick.c
2>  Generando código...
1>  JOBJModel.cpp
2>  Compilando...
2>  SDL_error.c
2>  SDL_events.c
2>  SDL_fatal.c
2>  SDL_fillrect.c
2>  SDL_getenv.c
2>  SDL_haptic.c
1>  JParticle.cpp
2>  SDL_iconv.c
2>  SDL_joystick.c
2>  SDL_keyboard.c
2>  SDL_malloc.c
2>  SDL_mixer.c
2>  SDL_mmjoystick.c
2>  SDL_mouse.c
2>  SDL_nullevents.c
2>  SDL_nullvideo.c
2>  SDL_pixels.c
2>  SDL_power.c
2>  SDL_qsort.c
2>  SDL_quit.c
2>  SDL_rect.c
2>  Generando código...
2>  Compilando...
2>  SDL_RLEaccel.c
2>  SDL_rwops.c
1>  JParticleEffect.cpp
2>  SDL_stdlib.c
2>  SDL_stretch.c
2>  SDL_string.c
2>  SDL_surface.c
2>  SDL_syshaptic.c
1>  JParticleEmitter.cpp
2>  SDL_sysloadso.c
2>  SDL_sysmutex.c
2>  SDL_syspower.c
2>  SDL_syssem.c
1>  JParticleSystem.cpp
2>  SDL_systhread.c
2>  SDL_systimer.c
2>  SDL_thread.c
2>  SDL_timer.c
1>  JResourceManager.cpp
2>  SDL_video.c
1>  JSfx.cpp
2>  SDL_wave.c
2>  SDL_windowsclipboard.c
2>  SDL_windowsevents.c
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'
2>  SDL_windowsframebuffer.c
1>  JSocket.cpp
2>  Generando código...
1>  JSpline.cpp
2>  Compilando...
2>  SDL_windowskeyboard.c
2>  SDL_windowsmodes.c
1>  JSprite.cpp
2>  SDL_windowsmouse.c
2>  SDL_windowsopengl.c
2>  SDL_windowsshape.c
1>  JTTFont.cpp
2>  SDL_windowsvideo.c
2>  SDL_windowswindow.c
2>  SDL_windowevents.c
2>  Generando código...
1>  SDLmain.cpp
1>  tinyxmlparser.cpp
1>  Vector2D.cpp
1>  hgecolor.cpp
2>     Creando biblioteca ..\..\..\lib\SDL.lib y objeto ..\..\..\lib\SDL.exp
1>  hgedistort.cpp
2>  SDL_VS2010.vcxproj -> C:\Documents and Settings\Atriel\Mis documentos\Wagic\JGE\Dependencies\SDL\VisualC\SDL\..\..\..\lib\SDL.dll
1>  hgefont.cpp
2>          1 archivos copiados.
1>  hgeparticle.cpp
1>  hgepmanager.cpp
1>  hgerect.cpp
1>  hgevector.cpp
1>  tinystr.cpp
1>  tinyxml.cpp
1>  tinyxmlerror.cpp
1>  zfsystem.cpp
1>  ziphdr.cpp
1>src\zipFS\zfsystem.cpp(508): warning C4244: 'argumento' : conversión de 'std::streamoff' a 'size_t'; posible pérdida de datos
1>  zstream.cpp
1>src\zipFS\zstream.cpp(335): warning C4244: '=' : conversión de 'std::streamoff' a 'uInt'; posible pérdida de datos
1>  JGE.vcxproj -> C:\Documents and Settings\Atriel\Mis documentos\Wagic\JGE\.\lib\Release\JGE.lib
3>------ Operación Generar iniciada: proyecto: mtg, configuración: Release Win32 ------
3>  PrecompiledHeader.cpp
3>  AbilityParser.cpp
3>  ActionElement.cpp
3>  ActionLayer.cpp
3>  ActionStack.cpp
3>  AIHints.cpp
3>  AIMomirPlayer.cpp
3>  AIPlayer.cpp
3>  AIPlayerBaka.cpp
3>  AIPlayerBakaB.cpp
3>  AIStats.cpp
3>  AllAbilities.cpp
3>  CardDescriptor.cpp
3>  CardDisplay.cpp
3>  CardGui.cpp
3>  CardPrimitive.cpp
3>  CardSelector.cpp
3>  CardSelectorSingleton.cpp
3>  Counters.cpp
3>  Credits.cpp
3>src\Credits.cpp(587): error C2220: advertencia tratada como error; ningún archivo 'object' generado
3>src\Credits.cpp(587): warning C4129: '%' : secuencia de escape de carácter no reconocida
3>src\Credits.cpp(600): warning C4129: '%' : secuencia de escape de carácter no reconocida
3>src\Credits.cpp(605): warning C4129: '%' : secuencia de escape de carácter no reconocida
3>  Damage.cpp
3>  DamagerDamaged.cpp
3>  DeckDataWrapper.cpp
3>  DeckEditorMenu.cpp
3>  DeckManager.cpp
3>  DeckMenu.cpp
3>  DeckMenuItem.cpp
3>  DeckMetaData.cpp
3>  DeckStats.cpp
3>  DuelLayers.cpp
3>  ExtraCost.cpp
3>  GameApp.cpp
3>  GameLauncher.cpp
3>  GameObserver.cpp
3>  GameOptions.cpp
3>  GameState.cpp
3>  GameStateAwards.cpp
3>  GameStateDeckViewer.cpp
3>  GameStateDuel.cpp
3>src\GameStateDuel.cpp(1728): error C2220: advertencia tratada como error; ningún archivo 'object' generado
3>src\GameStateDuel.cpp(1728): warning C4305: 'argumento' : truncamiento de 'double' a 'float'
3>src\GameStateDuel.cpp(1733): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(1737): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(1739): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(1746): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(1748): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>src\GameStateDuel.cpp(1757): warning C4244: 'argumento' : conversión de 'int' a 'float'; posible pérdida de datos
3>  GameStateMenu.cpp
3>  GameStateOptions.cpp
3>  GameStateShop.cpp
3>  GameStateStory.cpp
3>  GameStateTransitions.cpp
3>  GuiAvatars.cpp
3>  GuiBackground.cpp
3>  GuiCardsController.cpp
3>  GuiCombat.cpp
3>  GuiFrame.cpp
3>  GuiHand.cpp
3>  GuiLayers.cpp
3>  GuiMana.cpp
3>  GuiPhaseBar.cpp
3>  GuiPlay.cpp
3>  GuiStatic.cpp
3>  IconButton.cpp
3>  InteractiveButton.cpp
3>  ManaCost.cpp
3>  ManaCostHybrid.cpp
3>  MenuItem.cpp
3>  ModRules.cpp
3>  MTGAbility.cpp
3>  MTGCard.cpp
3>  MTGCardInstance.cpp
3>  MTGDeck.cpp
3>  MTGDefinitions.cpp
3>  MTGGamePhase.cpp
3>  MTGGameZones.cpp
3>  MTGPack.cpp
3>  MTGRules.cpp
3>  Navigator.cpp
3>  NetworkPlayer.cpp
3>  ObjectAnalytics.cpp
3>  OptionItem.cpp
3>  PhaseRing.cpp
3>  Player.cpp
3>  PlayerData.cpp
3>  PlayGuiObject.cpp
3>  PlayGuiObjectController.cpp
3>  PlayRestrictions.cpp
3>  Pos.cpp
3>  PriceList.cpp
3>  ReplacementEffects.cpp
3>  Rules.cpp
3>  SimpleButton.cpp
3>  SimpleMenu.cpp
3>  SimpleMenuItem.cpp
3>  SimplePad.cpp
3>  SimplePopup.cpp
3>  StoryFlow.cpp
3>  StyleManager.cpp
3>  Subtypes.cpp
3>  TargetChooser.cpp
3>  TargetsList.cpp
3>  Tasks.cpp
3>  TestSuiteAI.cpp
3>  TextScroller.cpp
3>  ThisDescriptor.cpp
3>  Token.cpp
3>  Translate.cpp
3>  TranslateKeys.cpp
3>  Trash.cpp
3>  utils.cpp
3>  WCachedResource.cpp
3>  WDataSrc.cpp
3>  WEvent.cpp
3>  WFilter.cpp
3>  WFont.cpp
3>  WGui.cpp
3>  WResourceManager.cpp
========== Generar: 2 correctos, 1 incorrectos, 0 actualizados, 0 omitidos ==========
Any idea?
Atriel
Zethfox
Posts: 3029
Joined: Thu Jun 10, 2010 11:28 pm

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

Post by Zethfox »

Use the patch version, it will save you many head aches,

Now back on topic.
Ok let's polish what you have completed here and slow down on adding more modes, get what is currently working to a release state and I'll personally add it to the svn with credit to you. 10,000 users will test this faster than you and I can alone. after the dust settles on the first draft, then continue working on more modes.
Atriel
Posts: 257
Joined: Wed Dec 22, 2010 8:17 pm
Location: Spain

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

Post by Atriel »

Zethfox wrote:Use the patch version, it will save you many head aches,

Now back on topic.
Ok let's polish what you have completed here and slow down on adding more modes, get what is currently working to a release state and I'll personally add it to the svn with credit to you. 10,000 users will test this faster than you and I can alone. after the dust settles on the first draft, then continue working on more modes.
Ok, then I'll wait to add it to svn to translate into Spanish after. Thanks for the advice. I'll try to compile it again because I can play these new modes now. :mrgreen:

Thanks again for your dedication to this project Zethfox. ;)

¡Gracias amigo! :D
Atriel
Locked