Running games locally

I read the README and I am really, really, confused. Is there some step-by-step tutorial someone can do to help me?

There is a video created by the you-tuber CodeBullet. It will likely help to be able to see some of the code people are talking about here in the forums:

I follow him, he does not talk about how to run the game locally. It is not “the code people are talking about” I just don’t understand how to run the game locally.

Ah, well then:

  1. Download the starter kit from Github (you can choose to fork it, etc. If you aren’t familiar with that then don’t worry about it, just get the code)
  2. Make sure you have Java 10 and Python 3 installed.
  3. Open PowerShell if Windows or Terminal otherwise and run Set-ExecutionPolicy Unrestricted (will need admin) in the main Starter-Kit directory (should contain engine.jar, etc)
    4 Close the PowerShell/Terminal window and reopen a new one in the same location
  4. Run: py scripts/

This should start a game between two of the starter algos. To use your algo, pass the directory it exists as a command line argument. For example:

py scripts/ algos/my-algo algos/extreme-algo

This would run a game between my-algo and extreme-algo if they are both located in the algos folder. Note that you are passing the directory name, not a specific file.

how do I open pip “inside the main starter-kit directory?”
Sorry, I am really new to that

I assume you mean PowerShell, not pip.

If you are in Windows 10:
You can simply Shift->Right-Click inside the folder you want (not on a file, the empty space) and select ‘Open PowerShell window here’. This won’t work for an admin version though. For admin, you can run PowerShell (search for it in the ‘Type here to search’ box in the bottom left of your computer). When you click on PowerShell hold down Ctrl+Shift and it should pop up asking for admin rights. Then navigate to the folder in the PowerShell window. The easiest way (in my opinion) is to just go to the folder in File Explorer and copy the path you are at, and then do:

cd [Your Copied Path]\C1GamesStarterKit

cd is the command for changing folders in PowerShell or Terminal.

If you are using Mac or Linux you should do the same steps but with a Terminal window, not PowerShell. Also, as far as I know, the shortcut using Shift->Right Click will not work but just Google how to open up Terminal in a directory for your OS.

1 Like

ah I was using pip, whoops

The Java 10 download is now Java 11, I can’t find the java 10 download anywhere, can you send a link to it?
After I tried to juse Java 11 instead it also says

'java' is not recognized as an internal or external command,
operable program or batch file.