Hello,

Here is the sample project/solution in Microsoft Visual C++ 2015 for two Pixoria plug-in computer engines.
Pixoria game operates in MS Windows 8 and 10.

There is open dll api to write your own gomoku engines and to compete against others.

Content:
1) How to develop new engine?
2) How to implement load/store methods to load/save games in Pixoria?
3) How to plug-in your new engine into the pixoria game?
4) How to create exe installer for your new plug-in engine?
5) Batch sampleEngine\distribution\dist.bat
6) Contacts

-------------------------------------------------------------------------------
1) How to develop a new engine?

Install MS VS 2015 with C++ and start .\sampleEngine\msvc\sampleEngine.sln solution.


You can easily rewrite the method:

//-----------------------------------------------------------------------------
// Name: dllEngine_move(long lInstanceId, const char board[], char square, unsigned long remainingTime)
// Desc: It returns the best move
//-----------------------------------------------------------------------------
int dllEngine::dllEngine_move(long lInstanceId, const char board[], char square, unsigned long remainingTime) {
    int dMove = 0;
        do {

                if(isStopped()) {
                        return MOVE_RESULT_STOPPED;
                }

                if(isPaused()) {
                        return MOVE_RESULT_PAUSED;
                }

                dMove = rand() % BOARD_LENGTH;
        } while(board[dMove]!=SQUARE_NONE);
        return dMove;
}

to prepare your engine.

The plug-in engine is defined within engines.xml file with references to dll file and graphics, see:
.\sampleEngine\distribution\plugins\engine01\engines.xml

-------------------------------------------------------------------------------
2) How to implement load/store methods to load/save games in Pixoria?

If you are going to implement pixoria dll engines API including Xerces XML parser:

        bool ENGINES_DLL dllEngine_load(long lInstanceId, XERCES_CPP_NAMESPACE_QUALIFIER DOMNode *playerNode);
        bool ENGINES_DLL dllEngine_store(long lInstanceId, XERCES_CPP_NAMESPACE_QUALIFIER DOMDocument *doc, XERCES_CPP_NAMESPACE_QUALIFIER DOMElement *element);

, then there should be placed files such as:

xerces-c_static_3.lib   (release configuration excluding debug info)
xerces-c_static_3D.lib  (debug configuration inluding debug info)

into ".\sampleEngine\msvc\lib" directory. The linker command line should contain one of them, e.g. debug configuration:

/OUT:"..\bin\Debug/sampleEngine.dll" /INCREMENTAL /NOLOGO /DLL /MANIFEST /MANIFESTFILE:"..\bin\Debug\sampleEngine.dll.intermediate.manifest" /MANIFESTUAC:"level='asInvoker' uiAccess='false'" /DEF:"..\src\sampleEngine.def" /DEBUG /PDB:"..\bin\Debug/sampleEngine.pdb" /SUBSYSTEM:WINDOWS /DYNAMICBASE:NO /IMPLIB:"..\bin\Debug/sampleEngine.lib" /MACHINE:X86 /ERRORREPORT:PROMPT kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib ./lib/xerces-c_static_2D.lib

Static xerces libraries are not part of the package, as they are too long.
Download free pixoria game source project including everything from http://www.pixoria.eu.
Please ask me via mail marek@pixoria.eu if any questions.

-------------------------------------------------------------------------------
3) How to plug-in your new engine into the Pixoria game?

When you manualy update .\distribution\plugins\engine01 or engine02 directories by new dll, gfx, xml files, then
you can copy directories into Pixoria directory, e.g. into:

"C:\Program Files\Pixoria\plugins\engine01" or
"C:\Program Files\Pixoria\plugins\engine02"

Then you just start Pixoria game to see new engines in

main Menu/Options/First Player/Computer Engines/"name of engine"

Pixoria checks during startup all subdirectories in .\Pixoria\plugins\ path to find engines.xml file.

-------------------------------------------------------------------------------
4) How to create exe installer for your new plug-in engine?

The manual install approach can be automatized by means of free Mep Installer Compiler version 2.1.3 International.

See example:
.\sampleEngine\installer\PIXORIA_sample_plugins.MPI

with generated automatical installer:
.\sampleEngine\installer\pixoria_sample_plugins.exe


Mep Installer can be downloaded from many sites, e.g.:
http://www.mephost.com/software/mep_installer.htm

Sample MPI file works with 2 plug-in engines "engine01" and "engine02", you can easily delete one of them to install just the one engine.

-------------------------------------------------------------------------------
5) Batch sampleEngine\distribution\dist.bat

The batch to generate new installer sampleEngine\installer\pixoria_sample_plugins.exe:
1) it clears temporary files done by MSVC in sampleEngine\bin\Debug\, sampleEngine\bin\Release\ and sampleEngine\msvc\ directories
2) prepares/copies files for MEP Installer Compiler to sampleEngine\distribution directory
3) starts MEP Installer Compiler to generate sampleEngine\installer\pixoria_sample_plugins.exe installer

The batch does not compile project into sample\Engine\bin\Debug or sample\Engine\bin\Release directory.

-------------------------------------------------------------------------------
6) Contacts

http://www.pixoria.eu
development: Marek Cichon, marek@pixoria.eu
graphics: Jiri Suchanek, jsx@pixoria.eu
