Quasi estranei game
It was Thursday evening when discovered from the web this card game:
WE ARE NOT REALLY STRANGERS
What’s the purpose of that game?
From their official website:
We’re Not Really Strangers is a purpose driven card game and movement all about empowering meaningful connections. Three carefully crafted levels of questions and wildcards that allow you to deepen your existing relationships and create new ones.
Seems interesting! How it’s made?
Unlike other card games, this one isn’t about winning. As explained:
“This game has two options: play safe or play to develop. The second aspect is how you win.”
The cards guide you through a series of questions and icebreakers that will strengthen or develop new connections, whether you play with your girlfriend or a stranger.
There are three stages that have been purposefully developed.
The first (perception) will call into question whatever preconceptions you may have about anybody you play with. Expect queries such, “What was your first impression of me?” or “Do I seem like a morning person or a night owl? why?”
The second level (connection) delves a little further with suggestions like, “When was the last time you surprised yourself?” or “Describe your perfect day!”.
The third level (reflection) will put everything into context and bring you closer together in unexpected ways. Questions like “How would you describe me to a stranger?” add a layer of interconnexion to the game.
And since the answer to the questions will likely change over time, you’ll never get bored of playing the game.
There are also some special “Dig Deeper” cards (one per player) that give the opportunity to ask more deeper details on te question and can be used one time per level.
How to play
The game starts staring to the other players. The one that blinks first, go first.
The player pull out a Level 1 card. Read it and the other players reply the question on the card.
Then it’s the turn to the player on the right.
It takes the Level 1 card and do the same.
After 15 or more cards (suggested number, you can choose as you wish) from Level 1, you can choose to move on and use the Level 2
The game ends after the Level 3 with a surprising open ending.
Ok and now?
There are some problems:
-
There is no italian version. If I want to play with someone in italian I want to use at least italian cards.
-
If there is no italian version I have to make my own. But I’m not a designer. I would really love to know how to design and paginate all these ~150 cards but I’m just an average guy.
-
It’s Thursday evening and tomorrow is work day. I cannot stay up all the night working on this.
So…
But as computer scientist I live in the world of the “divide et impera”!
Let’s divide it into subproblems:
- I need the data: a list of all the text on the cards
- Then something that can draw boxes and text on a pdf.
- Then a little bit of logic to make it works together.
The data
Luckly enought, searching on Github there is a repository with all the cards in a programmable formatting.
The data is found!
The translation into meaningful questions is pretty fast: Google Translate, Deepl or chatGPT will do it in a matter of seconds and I can fix it later.
I’ll translate the name of the game in a creative way: “we are not really strangers” can be translated in “non siamo realmente sconosciuti” but it sound awful. Better use a new name that reminds that two people know eachothers but there is always something to discover: “Quasi estranei” (“almost strangers”).
Next step.
The pdf drawing
I have no relevant experience working with pdfs.
Last time when I played with pdfs and code, I was as kid in the glorious php5 era.
Does the fpdf library still exists?
…
Yes! And exists also a python version!
The logic
As said before, I’m rusty working with pdfs. I’ll ask ChatGPT to help me out.
Me: Hi! Please wrie a python code that generates a set of playing cards and save as pdf. The cards must be in the playing card format and have a red border.
ChatGPT:
from fpdf import FPDF
def create_cards(cards):
pdf = FPDF()
pdf.add_page()
pdf.set_fill_color(255, 0, 0)
for card in cards:
pdf.rect(10, 10, 50, 70, 'F')
pdf.set_xy(15, 20)
pdf.set_font("Arial", size=12)
pdf.cell(40, 10, txt=card, align="C")
pdf.output("cards.pdf")
cards = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"]
create_cards(cards)
# This code uses the FPDF library to create a PDF document and add a page to it.
# It then sets the fill color to red using set_fill_color(255, 0, 0).
# For each card in the input array, it draws a rectangle with a fill color of red (the border) at the coordinates (10, 10) with a width of 50 and a height of 70.
# Then it sets the position of the next text to add using set_xy(15, 20), sets the font to Arial with a size of 12 and adds the card value to the center of the rectangle using cell(40, 10, txt=card, align="C").
# Once all cards have been added, the PDF is saved with the filename "cards.pdf".
Seems a good start to me! There is something that mustt be fixed.
Me: Thank you! Can you update the coordinates like it will cover all the page and not be one on another?
ChatGPT:
from fpdf import FPDF
def create_cards(cards):
pdf = FPDF()
pdf.add_page()
pdf.set_fill_color(255, 0, 0)
x_pos = 10
y_pos = 10
for card in cards:
pdf.rect(x_pos, y_pos, 50, 70, 'F')
pdf.set_xy(x_pos + 5, y_pos + 10)
pdf.set_font("Arial", size=12)
pdf.cell(40, 10, txt=card, align="C")
x_pos += 60
if x_pos > 270:
x_pos = 10
y_pos += 80
pdf.output("cards.pdf")
cards = ["A", "2", "3", "4", "5", "6", "7", "8", "9", "10", "J", "Q", "K"]
create_cards(cards)
# This code uses the FPDF library to create a PDF document and add a page to it.
# It then sets the fill color to red using set_fill_color(255, 0, 0). For each card in the input array, it draws a rectangle with a fill color of red (the border) at the coordinates (x_pos, y_pos) with a width of 50 and a height of 70.
# Then it sets the position of the next text to add using set_xy(x_pos + 5, y_pos + 10), sets the font to Arial with a size of 12 and adds the card value to the center of the rectangle using cell(40, 10, txt=card, align="C").
# After that, x_pos incremented by 60 and if it's greater than 270 it's reset to 10 and y_pos incremented by 80, this will make sure that the next card will be added on a new line.
# Once all cards have been added, the PDF is saved with the filename "cards.pdf".
Better, but I have to fix the code to make it create a new page when the bottom is reached, and add some logic and the data.
Let’s do it by myself.
That’s it.
A simple version of the script:
from fpdf import FPDF
level1 = [ # 49 carte - Perception
"Qual è stata la tua prima impressione di me?", # What was your first impression of me?
# ...
];
level2 = [ # 52 cards - Connection
# ...
];
level3 = [ # 49 cards - Reflection
# ...
]
finalCard = [ # Final card
# ...
]
def create_cards(cards, level):
pdf = FPDF(orientation = 'P', unit = 'mm', format='A4') # A4: 210mm x 297mm
pdf.add_page()
pdf.set_fill_color(255, 255, 255)
x_pos = 10
y_pos = 10
for card in cards:
pdf.rect(x_pos, y_pos, 70, 50, 'D')
pdf.set_xy(x_pos + 5, y_pos + 5)
pdf.set_font("Arial", size=12)
if pdf.get_string_width(card) > 60: # 60 is (the width of the card - 10)
pdf.multi_cell(w=60, h=8, txt=card, align='C')
else:
pdf.cell(50, 10, txt=card, align="C")
x_pos += 80
if x_pos > pdf.w - 80:
x_pos = 10
y_pos += 60
if y_pos > pdf.h - 50:
pdf.add_page()
x_pos = 10
y_pos = 10
pdf.output(f"cards_{level}.pdf")
cards = level1
create_cards(cards, "level1")
And it works!
Finals
The draft is ready!
There are a lot of improvements that I can add to it, but for now it’s a pretty draft version!
The game is ready, now I need the players.
Are you free this evening?
Without knowing the world of others, your own world will never get rich!
Mehmet Murat ildan