Ok cheers all
?davef21370 wrote:intolerably slow
Thanks very much rurwin. I'll give it a go, see what I come out with. Would you recommend starting with something similar to Gold Horse before I try and do a realtime thingy?rurwin wrote: if you only rewrite stuff that changes, and you keep that to a minimum, Python has a lot of potential.
Pygcurse is just a pygame port of curses, which I have discovered will probably be how to only have the current messages displayed- ie unlike GoldHorse, where the screen is not cleared.dr_d_gee wrote:I'd suggest having a look at Pygcurse
Code: Select all
def strike(e_attack, p_defence): # The enemy's attack if temp_defence != 0 : p_damage = randint(1,6)*e_attack-(p_defence+temp_defence) else: p_damage = randint(1,6)*e_attack-p_defence if p_damage < 0: p_damage = 0 return p_damage while Enemy.isalive() and Player.isalive(): print ("The ", str(Enemy.name), " strikes you!" strike(Enemy.attack, Player.defence)
I was running in idle, it just said that there was a syntax error and highlighted the word "strike" in red. I commented it out and then it did the same thing on the next line.davef21370 wrote:Could you post the full error?