Ask coding questions

← Back to all posts
can any one help me import a clicker game method to this new code
objectme12

i want to know how to make a clikcer game so can anyone help me

Answered by SUHASTADIPARTH1 [earned 5 cycles]
View Answer
Voters
Taya1234567890
SUHASTADIPARTH1
objectme12
Comments
hotnewtop
SUHASTADIPARTH1

Do you mean like in the console?

objectme12

@SUHASTADIPARTH1 yeah like it shows up all the players gold and stuff like that

SUHASTADIPARTH1
objectme12

yeah do u know how to do [email protected]

SUHASTADIPARTH1

@objectme12 You can do it in the python console by doing

clicks = 0

while True:
click = input("Press enter: ")
clicks += 1
print(clicks)

SUHASTADIPARTH1

@objectme12 Yes, You can do it in the python console.

objectme12
SUHASTADIPARTH1

@objectme12 Did you see the python code I posted?

SUHASTADIPARTH1

@objectme12 That's how you can do it in the python console.

SUHASTADIPARTH1

@objectme12 Please mark my answer if it helps. Thank you.

objectme12
objectme12

this thing comes up with an [email protected]

JBloves27

You might want to add an indentation after the while True: statement. like this:
while True:
click = input("Press enter: ")
clicks += 1
print(clicks)
@objectme12
EDIT: it doesn't seem to work, the indenting...

SUHASTADIPARTH1

@objectme12 What error?

JBloves27

Add two spaces before the input. Then do the same with the other 2 lines @objectme12

objectme12
objectme12

u do it soi can see what u [email protected]

objectme12

what do i do after [email protected]

objectme12

what do i do after [email protected]

SUHASTADIPARTH1

@objectme12 This is how your code should look like:


SUHASTADIPARTH1

@objectme12 and then run the repl and press enter and see it in action.

objectme12

ok but now i want to add something to where i can collect more [email protected]

objectme12

like i want to add a [email protected]

SUHASTADIPARTH1

@objectme12. Please explain a bit more. Do you want a shop where people can buy stuff in the console?

objectme12
SUHASTADIPARTH1

@objectme12 Ok. I will show the code. Please give a few minutes.

objectme12
SUHASTADIPARTH1

@objectme12 Thank you.

objectme12
SUHASTADIPARTH1

@objectme12 Hi. I finally have the code. Sorry it took so long. I was away for a while. But I finally have it. Just go to my account, and go to my shop repl. which is after the folders section.

If you want to add more items to you shop, just add the item name and it's price in the shop dictionary. And the rest would be up to.

SUHASTADIPARTH1

@objectme12 Feel free to fork if you would like to :)

Bookie0

Hi!
if you want to make a clicker game, you should probably use HTML CSS JS. here are some tutorials, if you're new to the language:

https://www.w3schools.com/

https://www.w3schools.com/html/html_scripts.asp

https://www.w3schools.com/js/

https://www.coursera.org/learn/html-css-javascript-for-web-developers

https://blog.hubspot.com/marketing/web-design-html-css-javascript

https://www.codecademy.com/catalog/language/html-css

https://medium.com/thebit/top-10-project-based-tutorials-for-learning-html-css-javascript-25f361aadd0

To make a clicker game, check out these websites:

https://dev.to/bastionthedev/learning-with-clicker-games-part-1-html-1i4b

https://code.sololearn.com/WzhK2lJ9L3Q6/

https://www.xspdf.com/resolution/51004049.html

https://codepen.io/samuelbeard/pen/Dsdie

Basically, you'll want a button, or an object acting like a button on the screen. Next, whenever a user clicks on it, you'll want a variable (that is at first 0) to increment (add 1). So each time they click, the variable will be bigger by 1. Add CSS to make the whole webpage look nicer, with colors, layouts, fonts, images, etc. You can also add a shop option where you can get "clickers" to click for you, like it clicks automatically every 10 seconds. It's all up to you.

Check out cookie clicker here to see how they do their clicker.

Good luck! ;)

JBloves27

Oh god! That's a lot of info! :D @Bookie0

objectme12

i know lol
@JBYT27

Bookie0

lol @JBYT27

JBloves27