We were unable to load Disqus. If you are a moderator please see our troubleshooting guide.

M_C • 5 years ago

Bonjour,

Je me permets de proposer quelques idées de pages à rajouter pour les débutants comme moi :

- Une page sur les différents titres de parties possibles dans statement_en.html comme !-- Goal -- etc.

- Une page ou un lien sur l'utilisation correcte de @inject dans ce cadre là car par exemple, je n'arrive pas à réutiliser graphicEntityModule en dehors de la class Referee. C'est surement dû à mon ignorance totale de ce genre d'outil mais si quelqu'un se sent le courage de l'expliquer, il y aura des intéressés je pense.

[CG]Thibaud • 5 years ago

Il n'y a pas de titres spécifiques de sous parties. Le mieux est de regarder un jeu existant qui te paraît avoir un statement clair.

Sinon, on va ajouter ces infos sur l'injection :
1) les attributs @Injecté seront tous à null si tu créé l'objet avec un `new ()`
2) Si tu veux inclure des classes dans ton projet qui utilisent des Inject, faut les injecter dans le init() du Referee (et eventuellement appeler leur init() si besoin)

M_C • 5 years ago

Je viens de voir les explications que vous avez ajoutées, c'est beaucoup plus clair maintenant, je vous remercie.

JBM • 5 years ago

I understand I can build the thingy with mvn compile or mvn package, but how can I run it from the command-line?

Tech.IO • 5 years ago

We encourage you to use an IDE to run the "Main.java" file as a Java Applicaition.

selmernoid • 5 years ago

I'm not a Java programmer at all, and all I want is run and simulate the game. Can I do it without installing some garbage IDEs?

Oli8 • 5 years ago

Connaissant rien à Maven et très peu en Java, j'ai l'impression que la partie "Launch the game" pourrait être plus complète.
Perso j'y arrive pas :)

[CG]Thibaud • 5 years ago

on va ajouter des liens vers des ressources qui pourraient t'aider comme:
https://stackoverflow.com/q...
https://stackoverflow.com/q...

Sinon, je t'invite à poser des questions sur le sdk sur notre Discord: https://discord.gg/PTYt3K8

Oli8 • 5 years ago

Merci Thibaud, je vais voir ça :)

Tanvir • 1 year ago

Is there a way to flip sprites in the sprite sheet?

ThePurificator • 1 year ago

I have a Ultimate Tictactoe bot in the Gold league of the codingame arena, but I am unable to make it work with the sdk instance given by the link https://github.com/CodinGam....

I'm using the sdk from Eclipse, as explained in the documentation above.

Bots are lauched, and they can write to stderr. But they don't have the time to write their results to stdout, so each game begins with a timeout. I have of course tried to raise the turnMaxTime to its upper bound, which is 25000 ms.

I have also tried other bots found on github, in C, Java and Python and none of them work.

Surprisingly, the two dummy bots given with this repository work well.

Is there someting I have missed ? Or is the repository obsolete ?

jmpeg • 2 years ago

Hi,
VSCode works greate as a Java IDE if you install the extensions that it proposes

Radu_Sav • 3 years ago

Hi, any idea why I get "Warning: too many turns and/or too much time allocated to players per turn" even though I changed all the constants?

[CG]Thibaud • 3 years ago

difficult to say without having a look at your project. I suggest you join our Discord server and ask there. There are multiple members who have built games with the SDK and who will be able to help you

jrke • 3 years ago

Error: Could not find or load main class Main
Caused by: java.lang.ClassNotFoundException: Main
I am getting this error when i am running main.java any fix?

luisangelorjr • 2 years ago

Hi! Do you still need help?

Xavier Faure • 3 years ago

Bonjour à tous,
Un énorme merci pour ce tuto qui est d'une clarté incroyable.
J'ai tout de même une question : Comment le projet eclipse fait pour récupérer le fichier core 3 4 2 jar dans les dependencies ? Je n'ai pas trouvé de référence dans les propriétés du projet qui iraient chercher sur les serveurs de codingame le code du core.
Merci encore pour tout ce travail.

ludopant • 3 years ago

Mon ajout qui manque dans la doc:
* les JSON Hash file et spritesheet ne sont pas a être référencés dans le code
* il faut utiliser le nom dans le json pour instancier .createSprite().setImage("monlabel")
* et pour changer de sprite manuellement, le mieux est de rappeler .setImage()

DrDeath • 3 years ago

I cloned the project and opened it in IntelliJ IDEA, but when I tried to run the Main.java file, the build failed with the error:

"java: package com.codingame.gameengine.module.entities does not exist" at game-fishy-adventures\src\main\java\com\codingame\game\Constants.java:6:48

Apparently, there are 25 more errors about packages that don't exist.

Tux4711 • 3 years ago

Hi all,

I'm implementing a multiplayer game at the moment (Atari Go) and I wanted to add a league system next.

The Problem is that I can't find any documentation on...
... how do I configure different bosses for the different leagues?
... how can I test the different leagues after uploading it on codingame?

Any help on this would be great :)

[CG]Thibaud • 3 years ago

You can add bosses in each league by adding a "Boss" bot in each config/levelx folder. Ex: https://github.com/Azkellas...
When you have different leagues, you can test them locally by switching the question at the top right of the IDE. Once uploaded on CodinGame, you test them by submitting a bot and ranking up.
I hope it helps :)

Feel free to join our Discord server. We have a specific channel for games/puzzles creation: discord.gg/PTYt3K8

icecream17 • 3 years ago

How does downloading the source code work? I couldn't figure out what to do with the "git clone" line.
I thought I got it, but probably not because Eclipse couldn't find the "existing maven projects".

I got github desktop for the "git client" thing but that's probably wrong now that I think of it. What do I do?

Qward • 4 years ago

hello, Game Manager page says that the default value for the maximum number of turns is 400, while a quick check in the GameManager code shows the default value is 200

Oli8 • 5 years ago

Y'a t'il un moyen de tester simplement l'output d'un stub ?

[CG]Thibaud • 5 years ago

On a pas encore ajouter cette fonctionalité au SDK. Une façon assez simple de tester, c'est d'utiliser l'éditeur de contribution in/out sur CG

devilSnare • 5 years ago

wow thanks this is much better than the normal python editor
i have been searching for an online editor over the net and at last i find finally made by my favourite website codingame
thank you so much