Share your repls and programming experiences

← Back to all posts
Bram Jam Submission -- Creepy Scary Music 'n' Story!
Bookie0 (5977)

BOOOO!!! 👻

Did I scare you? Did I? Did I?!?!?!

Ok fine I probably didn't :(

Hope y'all are having a great month of October and preparing for HaLoWeEeEeEnNnN!!

Long time no see repl talk share board! I've mostly been posting tutorials in the tutorial section as I didn't have much ideas for games or projects unfortunately, but luckily there's this jam!


TL;DR: This is my submission for @Bruhmley's Bram Jam #2. Aim of game: with several other people, after a starter of the story, one word at a time everyone types a word to form a spooky Haloween-themed story.

I've called my submission Creepy Scary Music 'n' Story! (yea not the best of names lol, but at least it rhymes!). We were supposed to do a Haloween-themed multiplayer game for the "Electric Boogaloo".

So uh, mine isn't exactly "multiplayer", but it actually kinda is in a way. You'll see.

Set-up Before Game

1) Ok so first, let's run the repl. For some reason, I can't find the button that makes your console go in a new tab, is it just me or does everyone not find it? Anyways, I dunno if this works in a new tab, but to be safe just run it in the same page, and expand the console to be as big as possible.

2) After hitting Run, there'll be some updates, downloads, package installs, etc. Ngl, it's gonna take about 30-40ish seconds. Maybe more lol.

When you see:

- Updating aiohttp (3.6.2 -> 3.6.3)

this means you have about 30 more seconds to go. Just wait for it to load, you can do something else while waiting (like 20 jumping jacks and a few push ups lol). After running it for the first time, it'll be faster for the other times.

3) Next, you'll have a chance to choose between music. You can choose either Spooky Scary Skeletons Remix, originally by Andrew Gold, or you can listen to Danse Macabre, by Camille Saint-Saëns. Pretty obvious why I chose them. Or you can listen to no music which is sad so you shouldn't do that lol.

Thank you to @AllAwesome497 for helping me set up the music with audio!

( audio docs here)

4) Once you choose, the game will now start.

This is the multiplayer part!

Get a friend, family member, siri, a soft toy, or anyone you want!

Then verything else is pretty straightforward, so I won't walk y'all through everything. But basically, type how many people will be playing, then the name of the first player, their color (their name will have this color, as well as the text they type), and then repeat for as many players as you first put. Next type how many words in the story, and you're ready to start!

Game Play

Firstly, there'll be the title screen:

[image here]

Secondly, there shall be a quick set up, with number of players, names, and colors, as well as how long the story is.

Secondly, there will be the starter of a sentence, and you'll have to each, player by player, type 1 word. Each word will be added to the story, and you can't remove a word after it is added, so choose wisely! This is a multiplayer game, so the goal is for everyone to participate and make together a good spooky story.

You'll know when it's your turn as it will tell you, with colors, so you'll easily be able to quickly rotate who's turn it is to type a word. Oh yes, only 1 word, if you put several words it won't accept it!

After the story is finished, depending on how many words you choose, the whole story will be outputted for you to see. You can also play again, and if you do, you can choose new music if you want!

Thank you to @CodingCactus for helping with the pausing of the audio!

And if you don't want to play again, then the game will end. You can always come back again with different people to play!

The Code

So I already put many many comments explaining what each part does, so feel free to read them if you want. But I'll still explain what the code does a bit because why not lol.

So first, I have a list containing some story starters used to start the story. Then, the important inputs are the ones asking how many players, the names of the players, and their colors. I used a for loop that loops through the number of players so that it asks every single player their name and their color.

After that, it adds their color and name to a dict (so that later it can be outputted easily). Next, it asks how many words will there be in the story, randomly selects a story starter, and the setup is finished. The game now begins!

There's a for loop that will loop for as many words in the story as the user first entered. The program, with an input will ask each player to enter one word (the program checks if there's a space in what the user wrote, so you can't write several words), and will add that word to a list containing the whole story. The input will specify which player's turn it is, with the color they chose before (that's why I recommend using different colors). This was the kinda hard part; I had to use a dict to store the colors and the names. So when I need to color the player's name a specific color (the color they first picked), I can get their name through the dict which will give me that player's appropriate color.

And finally, when the whole story is finished, it prints the whole story, and asks if you want to play again. If you do, you get to choose a new music, but if want to leave and play again later, then the program stops with a break that breaks the while True loop.

Final Words

So yea, I guess that's about all. I think I'm pretty satisfied with my work, up to y'all if you like it too! :)

I originally thought I wouldn't be able to make/finish a game for this jam, but looks like I did it lol. I even had some time to make the style nicer and more uniformed with colors and stuff. One week seems little, but during the weekends I got a lot done.

Thanks again to @AllAwesome497 and @CodingCactus for help on this!

Enjoy the game!!!

Have an fabulous day everybody! =)

Oh, and

Happy Halloween! 🎃 👻 😈 🧟 😱

(Stay safe! ;)

Edit: seems like audio isn't working for some people, tell me in the comments if it doesn't, make sure your speakers are loud and you selected a music choice. If it still doesn't work, try opening the repl

and running it.

Also you might need to turn on explorer mode! (Go to account >> roles >> explorer)


RayhanADev (1942)

Sweet! Nice BramJam submission, I love how the console actually looks awesome! GG
~ Ray

Bookie0 (5977)

lol thanks! :) @RayhanADev making it nice was an important part of my code

Bookie0 (5977)

Oh, and also! Contest for scariest/creepiest video here!

ThIs My ScArIeSt ViDeO: here ;)

zplusfour (890)

@Bookie0 how the frick, got rick rolled, but I checked that it is not qWblagvlag

elipie (364)

@Bookie0 when you block the word rickroll in your wifi

RayhanADev (1942)

@elipie hmm, wonder which genius gave you that one...

elipie (364)

@RayhanADev yup i really wonder... (i did it yesterday during lunch get on the repl...)

NoNameByProgram (198)

@Bookie0 you fool i have rememberd every rick roll link there ever was >:)

realTronsi (911)

Ah you got some time to make a submission after all! Good luck

Bookie0 (5977)

@realTronsi yup, I had to sacrifice some stuff during the weekends lol!

thanks! :D

realTronsi (911)

@Bookie0 very fun, unfortunately I have no friends

realTronsi (911)

@Bookie0 You basically got guaranteed 3rd since I don't think there are that many participants

Bookie0 (5977)

@realTronsi oh what were the other submissions? I didn't see them
could u link them plz thanks! :)

realTronsi (911)

@Bookie0 well it ends on Saturday and I know Rayhan is participating, but other than that it has been quiet. I submitted mine yesterday night at 12am here

Bookie0 (5977)

@realTronsi ah ok, then yes seems like I'm third lol!

TalinSharma (69)

Cool + Fun!
Wish there was a way to embed python projects/games into websites. (Just a side note. Nothing for you @Bookie0)

rediar (497)

@TalinSharma It is possible to embed python projects into websites using the url and an <iframe> html element

ZePanda9711 (1)

It was a cool game, it would be cool if you put one word and then the story put the rest, and then it continued like that, just saying.

Bookie0 (5977)

@ZePanda9711 ah yes, that's a cool idea, but then I'd have to figure a way for the computer to put a word that makes sense after what the user says.

but thanks anyways! :)

PattanAhmed (1397)

Python game, WOW
Good work!

PattanAhmed (1397)

@Bookie0 welcome!
btw, I wasn't scared of your BOOO!!!

HackermonDev (2006)

Audio only works for people with explorer mode.

Bookie0 (5977)

@PDanielY Hum, I thought audio works for people without it, I think they made it public. Actually I checked again, seems like yea you'll need explorer, thanks for reminding! :)

DynamicSquid (4624)

I like your readMe(only if you want lol).md file

Bookie0 (5977)

does the music work? do you hear the audio?

zplusfour (890)

@Bookie0 np, more 9 cycles and you'll have 4000!

HahaYes (1862)

You prob shouldn't include the color black in there because it kinda blends in with the background of the terminal

Bookie0 (5977)

@HahaYes yea, I thought of that, but I kept it because it still kinda comes out, and besides black is good for Halloween.
thanks tho!

HahaYes (1862)

@Bookie0 how discord chat going lol

Bookie0 (5977)

lol there's a big vc meeting with many people and zwack talking about all this @HahaYes

Bookie0 (5977)


I'm not in it, but from I heard for a few min is that zwack is explaining about all these hates against mod, and he's trying to tell us what they're trying to do. Wet is posting some pics of mod abuse of his warns in vc text

HahaYes (1862)

@Bookie0 mad that Zwack censored my complaint to repl

HahaYes (1862)

@Bookie0 gotta write a big boi complaint straight to HQ ig

CodingRedpanda (180)

@Bookie0 there is a problem:
I can put infinite special chars and letters into the 'story':

Bookie0 (5977)

@ridark yes, well its supposed to stop after you've wrote the number of words that u first chose

LukeShomper (58)

You have amused the chicken, Ive played with socket a ton, and thought how much fun this would be multiplayer, can I make it multiplayer? Ill credit you of course

Bookie0 (5977)

@LukeShomper Hi, sure you can make it multiplayer (even if kinda already is lol).
Good luck on it!

newGuy1000 (0)

wow music in python i never thought id see it happen

Bookie0 (5977)

lol yea, you can do it with python and JS easily using the audio (I put the docs link in the description of my post). For the other languages, the docs tell you how to do it.

thanks! :) @newGuy1000

JBloves27 (1720)

btw, nice job getting your post on trending!

objectme12 (45)

hey bookie can u just make the music scary skeleton play on a repl cause if so can u help me comment if you can and then ill send you a repl invite to one

Bookie0 (5977)

@objectme12 hi,
check my repl for how to do it. you can try forking it too! but I got audio on audio, I put the docs link in my post description.

Good luck! ;)

objectme12 (45)

what is the download for spooky scary skeleton

Bookie0 (5977)

@objectme12 in the files its called audioNEW.mp3, you can download it from there:

objectme12 (45)

i did but how do i put it into my repl @Bookie0

Bookie0 (5977)

download it, then drag/upload it to the repl @objectme12

objectme12 (45)

i invited u to repl cause its not working for me

Bookie0 (5977)

please don't invite me to repls without asking me first lol. @objectme12 are you sure you downloaded it? then it should appear at the left corner (if you're using chrome) then drag it in your files

Bookie0 (5977)

also are you sure you forked the repl correctly @objectme12

objectme12 (45)

@Bookie0 i fixed it sry your game is good btw

objectme12 (45)

question what website do i use to download music for [email protected]

Bookie0 (5977)

you can download it in anyway but it has to be mp3 for audio on @objectme12

Bookie0 (5977)

@objectme12 you can also use this in the shell to convert downloads to mp3:

ffmpeg -i audio.mp3 audio.wav # Convert to uncompressed audio-only wav format
ffmpeg -i audio.wav audio.mp3 # Convert back to mp3 format 
rm audio.wav # remove wav file

but replace audio.mp3 with your file name

Bookie0 (5977)

thanks! does the audio work? @Code1Tech

Code1Tech (108)

It's working for me. Not sure why it isn't for others.

Bookie0 (5977)

@Code1Tech even if you don't open it? like when you just press run on the same page?

Code1Tech (108)

No. Just when I select my music.

Bookie0 (5977)

ok well that's good that it works lol :) @Code1Tech

zplusfour (890)

I don't hear the music

Bookie0 (5977)

@ZDev1 oh hum thats weird. Make sure you turned your sound up and that you selected a music to listen to (a or b, not c)

zplusfour (890)

@Bookie0 yes I did, it is 100, very loud, and I chose, a

Bookie0 (5977)

@ZDev1 ah ok, try opening the repl

Bookie0 (5977)

thanks! so do you now hear the music if you open the repl? @ZDev1

JBloves27 (1720)

umm, it may just be me, but I don't hear the music?

Bookie0 (5977)

hi, you should be able to hear it. Make sure your speakers are loud, and that you did select a music (a or b, not c) @JBYT27

JBloves27 (1720)

:D ps. the musics good, lol @Bookie0