(I used antiyoy-dd as the name, anything else is fine)
Download the libgdx project generator: https://libgdx.badlogicgames.com/download.html
Use it to generate a project:
- Fill details
- Antiyoy:
- antiyoy-dd
- yio.tro.antiyoy
- YioGdxGame
- D:\Projects\Android\antiyoy-dd
- Antiyoy:
- Remove ios and html sub-projects
- Under ‘Extensions’ enable the following:
- Freetype
- Inside ‘Advanced’ enable ‘IDEA’
- Click ‘Generate’
- Verify appropriate build-tools (23.0.1) & API (20) versions (NO,OK,NO,OK)
Open ‘antiyoy-dd.ipr’ (do not import) in IDEA Ignore ballon notification about ‘unlinked gradle project’ (better just press ‘do not show anymore’)
Open settings (Click Ctrl+Shift+Alt+S)
- Set Android SDK (default of libGdx - API 20)
- Set language level (Antiyoy minimum - 7)
Edit Run/Debug Configurations
- Android
- Click ‘+’ and select ‘Android Application’
- Name it RunAndroid
- Select module ‘android’
- Desktop
- Click ‘+’ and select ‘Application’
- Name it RunDesktop
- Set the ‘Main class’ by the button to the right of the field (Shift+Enter)
- e.g. com. … .desktop.DesktopLauncher
- Set working directory to android/assets
- Select module ‘desktop’
Or it can be done easier:
- Android
- Go to AndroidLauncher.java
- Press Ctrl+Shift+F10
- Desktop
- Go to DesktopLauncher.java
- Press Ctrl+Shift+F10
- Go to run configuration and set working directoy to ‘android/assets’
At this stage you should be able to run the android and the desktop version of the generated example. Use the run button or press Shift+F10. Also you can use Alt+Shift+F10 to choose which run config to run.
##Copy Antiyoy Source Files Delete ‘android/assets/badlogic.jpg’.
Download or clone the github repository of Antiyoy from: https://github.com/yiotro/Antiyoy
Overwrite the files in ‘antiyoy-dd’ with the files from Antiyoy repository:
- The ‘assets’ directory shoud overwrite ‘android/assets’ directory
- The ‘core’ directory shoud overwrite ‘core’ directory (At least one file should be replaced, the one that extends ApplicationAdapter)
Open ‘android/AndroidManifest.xml’ Change screenOrientation to portrait
At this stage you should be able to run Antiyoy, try it!
AI that can progressively learn to play better against the human player, without a constant predefined set of rules.
Using Google Play Games Services: https://developers.google.com/games/services/android/turnbasedMultiplayer AI players should still be an option, as described in: http://stackoverflow.com/questions/26125273/how-to-create-a-computer-opponent-in-turn-based-google-play-game?rq=1