Author Topic: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)  (Read 19533 times)

Hrakanku

  • Newcomer
  • Posts: 20
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell
« Reply #15 on: March 13, 2016, 05:22:12 PM »
How slow is really, really slow? 'Cos it's ~ .25 - .50s on the average turn (and the first turn takes a couple times that since all the AI routines are kicking in at once) on my machine, which is a straight-up gaming laptop... I tried doing some optimizations but the result turned out to be super buggy and 10 times slower anyway and it mangled the repo on top of all that...

But yeah, I've got a migraine right now so I can't do much of anything, but once that goes down I'll zip up the required libraries and send 'em to you.

Actually... hmm. This probably won't work, but try sticking the .py files into the same directory as the executable in the win32 distribution and launching from there. Maybe also try replacing all the "import <bla>" statements with "from library import <bla>".

It's something like 0.8 - 1.2s / turn, which actually still is playable, if only just. And yeah, didn't work, tdl.py seems to be the problem. And whatever stuff that depends upon of course. Also: I kind of love the name, even if it is a bit long.

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell
« Reply #16 on: March 13, 2016, 08:10:53 PM »
Oh crap. I just now noticed I left in a debug print that's now screwing up the whole status window. That's great.

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #17 on: March 14, 2016, 01:41:13 AM »
Oh, I should probably actually link to the finished product, huh?

https://schilcote.itch.io/7drl2016

Avagart

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 567
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #18 on: March 14, 2016, 05:37:13 PM »
***ok, everything is ok, my bad***

kipar

  • Rogueliker
  • ***
  • Posts: 105
  • Karma: +0/-0
    • View Profile
    • Email
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #19 on: March 14, 2016, 06:35:31 PM »
I thought i've seen all about optimization after 7DRLs on Unity with ugly ascii chars being shown using modern shaders. But I was wrong. Now i've seen a 7DRL that takes more then 1 second per turn on (relatively old but still) core i7.
So while the name of the game and battle mechanics (and possibly squad mechanics, but i haven't got to it) are great, ii is impossible to have fun from it.
Any plans about post-7drl version which will work, like, 10 times faster?

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #20 on: March 14, 2016, 07:00:54 PM »
Yup! I spent the entirety of the last day re-doing the slowest part, in fact... only to find the "accelerated" version was five times slower. I just have to take a different approach to fixing it.

KhaoTom

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
    • My Projects
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #21 on: March 20, 2016, 05:55:14 PM »
Getting an easily reproducible crash: press A to attack and then immediately hit Enter without inputting anything else.

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #22 on: March 20, 2016, 06:02:09 PM »
Yup, that's a known issue. It'll happen with any text input, in fact. It's actually a wierd thing Python does, I never figured out how to get around it...

The game also crashes if something eats your corpse after you die. :P

KhaoTom

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
    • My Projects
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #23 on: March 20, 2016, 06:28:51 PM »
You can avoid the crash by catching the exception in a try: except (EOFError) block.

Code: [Select]
try:
      command = raw_input('Input command:')
except (EOFError):
      break  # break out of handling the command

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #24 on: March 20, 2016, 06:32:54 PM »
Right, but that means wrapping EVERY input() in a try...except, which isn't exactly elegant. I'd much rather have it replicate the same behavior as reading an empty line from stdin...

KhaoTom

  • 7DRL Reviewer
  • Rogueliker
  • *
  • Posts: 64
  • Karma: +0/-0
    • View Profile
    • My Projects
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #25 on: March 20, 2016, 06:38:32 PM »
Elegance has no place in 7DRL  8)

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #26 on: March 20, 2016, 06:57:18 PM »
Actually, I think working out elegant architecture early on helped me later. I notice that while I was making progress a bit slower than average early on, I was getting stuff done way faster in the last three days.

TOASTEngineer

  • Newcomer
  • Posts: 16
  • Karma: +0/-0
    • View Profile
Re: [7DRL-2016] Some Dogs Go To Hell (Sucks a-I mean, success!)
« Reply #27 on: March 30, 2016, 12:13:10 AM »
Providing what Hrakanu asked for was significantly harder than I expected.

However, I have released a fixed version of SDGTH that runs about an order of magnitude faster, fixes a few annoying bugs, and also includes stairs to other floors (which never end). It's available on itch.io alongside the competition version.