Share your repls and programming experiences

← Back to all posts
151
Three Ways

Hello !
This is my three ways game. You can move the ball with k, l, and m or arrows. Press enter to play and retry. It's better to play in a new tab. I hope you will enjoy it.
I'm still working on it, so it's not finished. I will add a system to change the size of the game on the screen, change the menu screen, and add a config to move with the arrows. You can tell me if you find bugs or things to improve.
If the screen is oversized, you can go to this link :
https://three-ways--equation.repl.co/
You enjoyed the game ? Don't forget to upvote !
Now available : gold rush ! Go on the paddle to earn gold !
Have fun !
(Sorry for my bad English, this game comes from France ;)

Loading Repl
Commentshotnewtop
13

I love this game! It's brilliant!!

11
[deleted]

This is a really good game!

6
5

omg how can this game not be famous ? the creator is a genious !!

4

This is so addicting

4

cool, really cool
which language was used?

3

@DudaYa Thanks !
It's in Javascript, html and a little CSS.

1

@Equation Do u know how to create on graphic interface on Python ? Because I am also creating a game ( an RPG game more precisely ) but I really don't know how to open a new tab with it... Can you give some advices ?

1

@dleboulaire
To open the console in a new tab, you shall press the button with an arrow in a square, "open in a new tab".
To create a graphic interface with the python language, I have the regret to say to you that it's impossible... You may use Javascript, CSS and HTML. If you want to learn these languages, there are many tutos and videos on Youtube.

1

@EmilienBUSSON1 Ok thanks for your advice ; I am going now on ytb !

2

@Equation Cool game! Quick question: how did you get the game to show in one screen? I'm also working in JS, but my game shows the code as well. How do I get mine to do what you're doing? Thanks!

2

@MatthewStirling Thanks ! To show only the result and not the code in a post, you have to put the url of the result (the url of the game when you open it in a new tab) as the post's repl. You can upvote if you enjoyed the game !

1

@Equation You have my upvote. Many thanks!

2

@dleboulaire You have to use a third party module such as Tkinter or Pygame

2

@dleboulaire its not impossible, just use tkinter or pygame

2

@Murzikal I try pygame and my game is working ! ; ) Thanks !

3

My winning strategy is to always stay in the middle. Great game!! My high score is 152 btw

1

@Suparn Thanks ! Nice score, try to beat mine (1200 :)

3

this is really good, made it to 62! maybe add a "press enter to run" text on the starting page so stupid people like me don't try and click the run button because they didn't read the post properly haha

1

@AmeliaBlackwell Nice score ! You're right, I'm gonna add this message, it's a good idea. Thanks for playing, I hope you enjoyed my game !
PS : I'll try your fishing game, it looks very fun ;)

1

@Equation hahaha, thank you!! hope you enjoy :)

3

Wont work. Play button wont make it run

1

@RoylatGnail Press enter to start the game

1

@RoylatGnail Yes you don't have to click on "Run", it's more simple : press enter and your beautiful game will restart. : )

3

Hello, I did not get a chance to play your game but I'll try it later. Could you help me with my code.
I am a complete beginner (a baby in programming or python world)
my code is as follows

import random
random.randint(20,100)
age=int(input("What is your age:"))
agegap=int(random.randint(20,100))
print (agegap)
while True:
if age>agegap:
print("You are older")

elif age==agegap:
print ("You are of the same age")

else:
print("You are younger")
after it prints you are younger, same age or older I want it to ask the question again. How would I do that? I 've tried adding while true: but loops the answer in an infinite loop. I want it to give the answer once and ask the question again.

Could you help me with it

thank you

Sakura

2

@SakuraKimiko hello !
You can add a system of parts in your code, like that :

import random
random.randint(20,100)
agegap=int(random.randint(20,100))
print (agegap)
myBolleanValue == True

step = 1

while myBolleanValue == True:
if step == 1 :
age=int(input("What is your age:"))
if age>agegap:
print("You are older")
step ++

              elif age==agegap:
                          print ("You are of the same age")
                           step ++

               else:
                        print("You are younger")
                        step ++
     elif step == 2 :
            age=int(input("What is your age:"))
             //

First, add a boolean variable as condition to your loop. Like that, if you want to stop it, you just have to write myBooleanValue = False in your code.
Second, a step system will ask the question to the user, analyse the answer (older or younger) and go to step 2. In step 2, you write that the variable value is "age" equal to the user answer, so it will ask the user a second time.

I hope it will be useful. If you have more question, you can ask me.

(don't forget to vote ;)

2

@SakuraKimiko what is wrong with this?

import random
random.randint(20,100)
agegap=int(random.randint(20,100))
print (agegap)
while True:
  age=int(input("What is your age:"))
  while True:
    if age>agegap:
      print("You are older")
      break
    elif age==agegap:
      print ("You are of the same age")
      break
    else:
      print("You are younger")
      break
1

@JohnnyWobble The nested while loop is unnecessary. You could use try/except to try doing int(input("What is your age:")). Then, if the user enters something like "end", there will be an error which will trigger the except. In the except, put break. If you're confused, try looking through the documentation.

1

@CalsonLee Thank you for your help, do you have any websites you can recommend, I am currently learning from udemy

2

@Equation Hello sorry for the late reply but thank you so much for your help in this equation, is this all python or are we adding some other coding language,
I really want to become good in python because I want to do something in data analysis and I think it uses either r or python.
I could really use you help just like this. Thank you

1

@SakuraKimiko No problem ! To learn more about programming in python or in other langage, there are many lessons on YouTube, and I know a site, https://openclassrooms.com : it's a very good site to learn coding, and it's free. I learn JavaScript here. Thanks for playing, and if you have more question, you can ask me :)

1

@Equation Hello again I need your help with this code

memberlist=[]
print ("**Welcome to mymailbox.com *")

asking whether they would like to sign up or already a user

alreadymember=input("Are you a member?:").lower()

while True:
if alreadymember=="Yes" or alreadymember=="YES" or alreadymember=="yes" or alreadymember=="y" or alreadymember=="Y":
print("Welcome, Please login")

elif alreadymember=="No" or alreadymember=="NO" or alreadymember=="no" or alreadymember=="n" or alreadymember=="N":
signup=input("Would you like to signup?:").lower().upper()

member=input("Enter your user name:").strip().title()

if member in memberlist:
print("Welcome", (member))

else:
print ("member not found")

signup=input("Would you like to signup?:").lower().upper()

if signup=="yes"or signup=="YES" or signup=="yes" or signup=="y" or signup=="Y":
print("Kindly fill out the following form")

First_name=input("Enter Your first name:")
Second_name=input("Enter Your last name:")
Age=int(input("Enter Your age:"))
Occupation=("What is your occupation:")
Username=input("Enter your username:")
memberlist.append(First_name)
print("Welcome to the Team",(First_name))

elif signup=="No"or signup=="NO" or signup=="no" or signup=="N" or signup=="n":

print("Enjoy browsing mymailbox.com, Hope you change your mind and join our team")

print(memberlist)

there are a few problems with it they are as follows

when I say I don't want to signup it shows "enter your username" where as I want it to say "Enjoy browsing mymailbox.com, Hope you change your mind and join our team" (as I have mentioned at the end of the print)

It doesn't add the name in the list. I have given the command to print the name once added in the list, but when I enter the name again (in the same process) it says member not found. e.g. if i say i want to sign up and fill the form with the name nancy etc it shows the name nancy and it asks again enter your user name when I enter the name nancy again it says member not found.

I will appreciate your help, I have been wracking my brains on it for about a week now

Thank you in advance :)

1

@SakuraKimiko Could you send me your repl's link, so that I could look it more precisly ?

1

@Equation ..

https://repl.it/@SakuraKimiko/dictionaries

if this doesnt work I am copying the code once more

memberlist=[]
print ("**Welcome to mymailbox.com *")

asking whether they would like to sign up or already a user

alreadymember=input("Are you a member?:").lower()

while True:
if alreadymember=="Yes" or alreadymember=="YES" or alreadymember=="yes" or alreadymember=="y" or alreadymember=="Y":
print("Welcome, Please login")

elif alreadymember=="No" or alreadymember=="NO" or alreadymember=="no" or alreadymember=="n" or alreadymember=="N":
signup=input("Would you like to signup?:").lower().upper()

member=input("Enter your user name:").strip().title()

if member in memberlist:
print("Welcome", (member))

else:
print ("member not found")

signup=input("Would you like to signup?:").lower().upper()

if signup=="yes"or signup=="YES" or signup=="yes" or signup=="y" or signup=="Y":
print("Kindly fill out the following form")

First_name=input("Enter Your first name:")
Second_name=input("Enter Your last name:")
Age=int(input("Enter Your age:"))
Occupation=("What is your occupation:")
Username=input("Enter your username:")
memberlist.append(First_name)
print("Welcome to the Team",(First_name))

elif signup=="No"or signup=="NO" or signup=="no" or signup=="N" or signup=="n":

print("Enjoy browsing mymailbox.com, Hope you change your mind and join our team")

print(memberlist)

I had added the print(memberlist) at the end because I wanted to see whether it is accepting the name or not, when you run it again in the same process, you'll notice it will show the name e.g nancy but when you'll enter the name nancy again it 'll say member not found.
Secondly if we say we don't want to signup it should say
Enjoy browsing mymailbox.com, Hope you change your mind and join our team
rather it says enter user name
Thank you again for your time :>

3

Please, set an arrow-move system ! It's so no-intuitive to move with "k", "l" et "m" ! Moreover, it seems to be the initials of the national air flight company of the Netherlands... KLM
;-)

2

@Equation Great !
Now, why don't put an option screen to konw more about the commands, the controls, maybe about you, the version of the game, the choice of colours...
I know that it's quite hard to set up a system like that, but I hope it will be soon "incoroporé" in this marvellous game !
Thanks
Distingued salutations

3

I love your game !!!!! XD It's so goooooooood !!!!! It's better than fortnite LOL ! My best record is 316 ! Who can beat it ?

2

Wow! This game is awesome!

2

Great game, and I know how to fix the oversized screen.
Just add this in your canvas initialization:

canvas.style.width = "100%";
canvas.style.height = canvas.style.width / 2;

Everything in your game will be unaffected. Those 2 lines I accidentally discovered downsize or upsize your canvas to the exact size of the screen/box it's in. But THE PIXELS STAY THE SAME! I used this for my game (submitted at https://repl.it/talk/challenge/Space-Runner/12625), and I don't have to worry about the size of the canvas at all. My code always thinks that it's 4000 by 2000 pixels.

(also please check out my game no one's even commented on it)

1

@GameMaster1928 Thanks for your help, I'm going to see your game :)

2

You should totally make this game for mobile version,great work loved it

1

@SakuraKimiko yes, it could be fun, but I have to learn how to make it as an app. Thanks for playing !

2

so good. You have my upvote without a doubt! Amazing graphics and Je suis aussi de France!

2

@mdjb4 Thank you ! Merci du soutien la team France !

1
2

This game is life changing !! Love it !

2

I like that it is a simple but hard game.

2

It's an amazing game !
You should sell him to a company

2

I did it still didn’t work

2

You need to size the game down because i cant play it

3

@Sparkster it should be better like that. Open it in a new tab to improve your game experience :)

1

ce jeu est tellement bien
pourrais tu rajouter un highscores juste pour le fun et pouvoir se comparer avec des amis

1

This is a fun game. made it past level two, and still can't stop playing!!! :)

1

@Caleb117 It has been made for ;) thanks for playing

1

Darn Hi-Contrast mid game is this some kind of Dino game rip-off?
Just kidding!

1

@Fire_Kiwi Lol, thanks for playing !

1

Hello its me again , sorry if I bother you every now and then but will you kindly help me with this coding

I send you a signup code a week ago, I made a few improvements, but its still needs further improvement

the code is as follows

memberlist=[]

print ("*Welcome to mymailbox.com****")

while True:
alreadymember=input("Already a member?:")

if alreadymember=="Y" or alreadymember=="y" or alreadymember=="Yes" or alreadymember=="yes" or alreadymember=="YES":

    member=input("Enter User Name:")

    if member in memberlist:
        print ("Welcome", (member))
    
    else:
        print((member),"not found")
    
if alreadymember=="N" or alreadymember=="n" or alreadymember=="No" or alreadymember=="NO":
    
    signup=input("Would you like to signup?:")
    
    if signup=="yes" or signup=="YES" or signup=="Yes" or signup=="Y" or signup=="y":
        
        print("Kindly fill the following form")
        
        First_name=input("Enter Your first name:")
        print("First Name=:",(First_name))
        Second_name=input("Enter Your last name:")
        print("Second Name=:",(Second_name))
        Age=int(input("Enter Your age:"))
        print("Age=:",(Age))
        Username=input("Enter your username:")
        print("Username=:",(Username))
        memberlist.append(Username)
        
        print("Welcome to the Team",(First_name))
        
    if signup=="no" or signup=="NO" or signup=="No" or signup=="N" or signup=="n":  
        
        print("Enjoy browsing mymailbox.com, hope you change your mind")
        
        print(memberlist)

the link is mentioned below

https://repl.it/@SakuraKimiko/member-signup

You will notice that when you type No or no NO it wont ask the question would you like to signup, only on smaller n or no it would ask that,
not to mention when it asks you are you already a member and you say yes, even if you are not, it does respond member not found however I want it to ask would you like to sign up
rather it asks again already a member

how do I fix it

Thank You

Regards

Sakura

1

@SakuraKimiko Hello !
I have created a new repl with comments to explain you what was the problem and some advices.
You can ask me if you have any questions
https://repl.it/@Equation/Member-Signup-test
I hope it will be useful.

1

@Equation Thank you again for your help
it was very helpful, I ll work on another code and share it with you
cheers :>

1

Nice! My highscore was 72.

1

I wish it would save your highscore.

1

c'est quand tu fais un multi-joueurs ?

1
1

@tarkanKELES merci ! Si le jeu te plaît, tu peux le partager à ta classe ou tes amis

1

@Helixable I hope you have upvoted to do some marketing on MY post :)

1

@Helixable I prefer like that :) thanks