Mini games ..?

Mini games ..?
0

#1

I was thinking for a while for a platform to create set of challenges that will be fun to play on the side.

For example corner ping cannons, and most efficient defense for each cannon type and attack count.
Also optimal minimal defense to stop N*EMPs in a open field.

There were few discussions for this before:

This have educational value, for new players, and also people can add new challenges over time.

It is some how possible with custom edited replay, on the play ground and cloning for each turn …
But you need to correctly recreate the enemy turn, and re-clone the tab for each attempt.
corner_sim_test.replay (205.0 KB)

But i was thinking for a standalone solution (possible mobile friendly) and it can even have smaller arena size,
as the goal is not to play full games, but more puzzle oriented.

This will help new player get quickly up to speed, and get the key concepts (what is so special about 15 pings, why one encryptor is a game changer, etc …)

Biggest blocker for this right now is simple JavaScript(?) engine / turn_simulator
that is safe to be publicly distributed.

Alternatively it may be hosted somewhere and hidden, but this will remove the offline play option and will be potentially slow.

Does any one have good idea how to solve the engine part ?


#2

I just looked into how the playground works. There a websocket is used for the communication with the engine and the protocol is similar the communication with the engine in real games.

@C1Ryan If using the websocket is allowed to be used by us then this could be a rather easy solution to this problem.


#3

Maybe you could use flask and thus python back end to solve the engine problem. But idk


#4

I can think of one way to allow offline play in a potentially safe for public distribution manner. My simulator is written in Rust, so it could quite easily be compiled into WebAssembly for a browser game or a .so object for another application.


#5

Players are welcome to make anything you guys want with your algos and simulators, and I’m always happy to do what I can to update the API or otherwise support community projects. If there is something that you need from the C1 team or an idea you think will improve the platform, please give a specific request/proposal and we can consider how feasible it is. Keep in mind I won’t be able to divert more than a few hours a week to community requests.

Currently, I don’t have a complete idea of what you are trying to do or, more importantly, how I can help.

I dont fully understand what you mean by this


#6

Sorry for not being clear about what I ment.

I looked into how the playground works (Hand Play vs Hand Play).

To demonstrate what I did I wrote this little script.
TerminalPlaygroundSocket.html (1.2 KB)

This script creates the socket to this endpoint: wss://playground.c1games.com/
Then does some initialization and sends example actions for the first turn.
Lastly it recieves the data from the engine and logs it to the console. (in the same format as replay files)

@C1Ryan My question right now is just weather this is allowed to be used?

If so, then for @Demorf’s idea I would probably use the sandbox config, to be able to setup any form of challenge in one turn.


#7

Sure, go ahead. Its basically the same as playing a playground game on your web browser as far as our backend is concerned


#8

What @Felix showed is actually very interesting. I modified the example he attached and I achieved playing by hand vs somebody’s else algo. I am new to this game, but this seems to not be allowed. Please correct me if I am wrong.


#9

and now I managed to launch playground with not my own algo :slight_smile:


#10

Wait what? How did you do that? I don’t think this would be allowed though.


#11

Steps to reproduce:

  1. You need to get any algo id you would like to play against. It is quite easy by using the api and the list of algos any of your algos have faced (obviously, there are more ways to do it, but this one was the easiest for me).
  2. Inside the file @Felix shared you can find json with game options which is sent to the backend as the config for the game. It contains these fields:
    “player_1”:“manual”
    “player_2”:“manual”
    These fields looks like this then I play against my own algo
    “player_1”:“manual”
    “player_2”:“uploadedAlgo120895”
    Now if you replace my algo’s id with any other id you will play against that algo.
  3. Also you can do this without the file @Felix shared. You only need to breakpoint on initializeSocket method in playground.js and change the id to the one you would like to face it.

The fix:

  1. I think there should be backend check;
  2. I can see that webpack is used to deploy frontend and if it were minimized then all this hack would have become extremely hard (yet still doable)

#12

I tried it out and it works like you said.
Something like that was never possible and I also assume that this will be patched soon.

If this “feature” would stay, one could basically test his own algo against any other algo he wants without waiting hours or even days for a ranked match to happen.


#13

Or one could write an algo which understands which algo it is playing against in the first move and then acts accordingly only to that algo. It would require to know winning strategy against any other algo


#14

That already happened the previos seasons haha, but still now it would be way easier.


#15

First, thanks for pointing that out. We need this patched soon, as it can be exploited in a ugly way @C1Ryan.

Second, just knowing the first few moves and starting layout should not be enough to win vs a top algo, as this it is some what expected that algos will adapt in some way to the opponent layout. You can study Felix games from season5, for some crazy matches with this strategy.