0
\$\begingroup\$

I am making a simulator game "BEE HUNT SIMULATOR" and in that game we have bees and we have to collect pollen from different fields,this is fully command line game that means a typing game so i have made all things that should be there but the main thing is of collecting pollen out of specific storage for that i had tried this-:

import time

global aa
aa = 15 # POWER OF ALL BEES WHICH ADDED IN POLLEN PER FUNCTION
global b
b = 100 # MAX POLLEN STORAGE
global honey
honey = 0 # IGNORE THIS VARIABLE
global pollen
pollen = 0 # POLLEN WHICH ADDS ON EACH FUNCTION AND DID NOT EXCEND THE STORAGE

def add():

    global pollen
    if pollen < b:

        ss = aa + pollen 
        if ss > b:

            pollen = b
        elif ss <= b:
            print("Collecting pollen....")
            time.sleep(0.5)
            pollen += aa

    else:
        print("Backpack Full convert it to honey or buy a new backapck.")
while True:

    a = input("Press enter or any key: ")

    if a == "s":
        print(a,b,honey,"",pollen)
        print(type(aa))
    else:
        add()
        print("Pollen Collected-: ",pollen,"/",b)
        time.sleep(1) 

That code is fully working and its output is like this-:

Press enter or any key: 
Collecting pollen....
Pollen Collected-:  15 / 100
Press enter or any key: 
Collecting pollen....
Pollen Collected-:  30 / 100
Press enter or any key:

But i think that this can bored peoples and they can easliy collect pollen so i need more system like this which should not bored peoples and they take enough time to collect pollen.

I am using pyCharm

This code is fully working i only need ideas for collecting pollen , so that players like to do and they dont get bored and they take time to collect pollen.

\$\endgroup\$
2
  • 4
    \$\begingroup\$ I think that's a feature-request, not a request for a review of the code provided. Are you sure you're on the correct site? Please take a look at the help center. \$\endgroup\$
    – Mast
    Sep 9, 2020 at 9:35
  • 4
    \$\begingroup\$ I’m voting to close this question because it is not a request for review. Please take a look at the help center. "Do I want feedback about any or all facets of the code?" \$\endgroup\$
    – Mast
    Sep 9, 2020 at 12:36

1 Answer 1

3
\$\begingroup\$

As mentioned in comments above, your question is about gamedesign. But since you brought your code here already, here's a suggestion: use better variable names - aa and b are very non-descriptive and as the amount of code will grow, you'll have a hard time to understand what's going on there with variables like these.

So instead of b, use something like MAX_POLLEN. When you'll see it in the code you'll immediately know what it is. And since it's UPPERCASE, which is a Python's convention for constants, you'll also know it won't change its value over time.

\$\endgroup\$
0

Not the answer you're looking for? Browse other questions tagged or ask your own question.