Lead Nations. Compete. Outsmart.
Table Of Contents
Defcord is a multiplayer, discord application based game.
You play as a leader of a nation and it is your responsibility to make good decisions based on the information given to you.
You should make sure all of your vital attributes stay positive.
You can't know what vital attributes increase/decrease for the given information for the decision you make because you know, people are complex.
Whoever stays alive till the end of the game is the survivor of the game. If multiple people survive they are also survivors.
The main goal is to make sure you won't run out of your vital attributes in order to survive.
Attribute | Default Value |
---|---|
Money | 100 |
Loyalty | 50 |
Security | 50 |
World Opinion | 50 |
One player is mapped with only one game. So at a time, a player can game participate in only one game.
The game time will be a random time between 12.5
and 16
minutes.
We have 3
stages, each stage will make the information flow faster.
If the player is AFK or non-responsive to the information for 60
seconds, they're disqualified automatically.
We use this command to create a defcord game. Whoever creates will be part of the game by default and they'll be the only one who can start the game.
User needs to enter the number of players they want in the game and the nation name they want to be the leader of.
Once the game is created, a message will be posted with the invite code. Other players need to use the invite code to join the game.
A player can join from a different channel or even a different server. Only requirement is in that server defcord
should be installed.
Other payers need to use this command with the given/taken invite code from the game creator in order to join a defcord
game.
They also need to enter their nation name, via a modal prompt.
Once the required number of players join, the game creator can start the game. Once invoked, the command will automatically start the game that the current player created and part of.
After that, stage 1
begins. Players will receive information at a slow rate first, as the game progresses it'll get faster.
Now the players should start respond to the information by making a good decision in order to survive.
If the player wants to leave in the middle of the game or before the game start, they can do. But if they leave in the middle of the game, they cannot rejoin. They can join another game.
If you are the last member to quit, you are the survivor of the game as you have no one to compete. But you can play till the game time and see what the game brings you. If you run out of an attribute than you are done.
Given theme is Information Overload
. Here we try to make the player overwhelmed by giving them information continuously.
They need to keep making good decisions in order to survive. Because they can't give yes
to all the requests i.e. army tool requests, it'll cost their money. This is also applicable to the reverse situation where the player denies all requests.
After every stage we show the player's attributes so they need to make a quick play to proceed with the next stage. We have AFK mechanism in place so they can't sit idle, information flow till the game end.
/defcord start
will show asApplication did not respond
in the invalid use case scenarios instead of showing a relevant message to the user. This is due to a fact that we missed toawait
that message call during a code refactor. Invalid use case scenarios,- Trying to start the game without being in one
- When in a game, trying to start it (only creator can)
- Trying to start a game is already running
- Trying to start the game before all the players join
- We have an image embedded in each message to represent the actor of the message. But sometimes the service that we used to host the images goes down. So sometimes the images won't appear. If you receive any error due to this in the console or bot crashes due to this, you can set this env variable
WITHOUT_ACTOR_THUMBNAIL
toTrue
to disable thumbnail functionality.
- Include attribute sabotage and request mechanism so that it'll be more PvP instead of PvE.
- Game time can be configurable by the creator.
- Include encryption like mechanism to make it harder for the user.
- Option to stop the game by the creator (current work around is to make all players leave / die).
- Enhance random information picking logic to make it more relevant to the players context and reduce repetitiveness of information.
- Option to pause the game.
- Option to start the game if everyone has not joined.
- Clueless_conoisseur (krishnabhat): Checking PRs, structuring the project
- Automafun (Dhanvantg): Basic game character formation, logo creation
- Diverman (hazyfossa): Coding game factory, player classes, implementing character templates, weighted randomness logic
- Maheshkumar: Coding button interactions, defcord start command, advanced UI components
- Sapient: Basic UI elements, PlayerState class default values, Game class creation, game flow, Anti-AFK mechanism, character images
We require you to have python 3.12
.
git clone https://github.com/krishnabhat3383/code-jam-24-luminous-lightyears.git
if you prefer ssh way,
git clone git@github.com:krishnabhat3383/code-jam-24-luminous-lightyears.git
cd code-jam-24-luminous-lightyears
python3 -m venv .venv
source .venv/bin/activate
pip install -r requirements.txt
export DEFCON_BOT_TOKEN=<token>
for a persistent way,
touch .env
echo "DEFCON_BOT_TOKEN=<token>" >> .env
python main.py
After the starting of the bot, following would need to be done to start the game.
-
To initiate the game the player (further referred as 'creator' of the game) need to use
/defcord create
and add the max number of players in the game. -
The creator will receive a modal, which will ask for their nation name.
-
After entering the nation name the creator will receive 3 messages.
1st message referring to them as a player and their nation name.
2nd message is a game code, for anyone joining the game (visible to everyone in chat)
3rd message is the standard joining message, indicating how many players are left to join and who has last joined (here the game created if of 2 players)
-
Other wannabe players would need to use
/defcord join
with the invite code to join the game -
After everyone joining the game, everyone in the game will receive this message
(Here
Thonk
being the last player joined) -
After this the creator is able to use the command
/defcord start
to start the game, and then everyone will receive 3 messages (3rd one being part of the main game, hence covered below) -
Game flow - example