from logging import info, debug
from os.path import exists
from os import makedirs
+from multiprocessing import cpu_count
from panda3d.core import Filename, load_prc_file_data, AntialiasAttrib, \
Texture, WindowProperties, LVector2i, TextNode
from panda3d.bullet import BulletWorld, BulletDebugNode
self.__fps_lst.pop(0)
self.__fps_lst += [globalClock.average_frame_rate]
if len(self.__fps_lst) == 4:
- assert(any(fps > 55 for fps in self.__fps_lst))
+ fps_threshold = 55 if cpu_count() >= 4 else 25
+ assert(any(fps > fps_threshold for fps in self.__fps_lst), 'low fps %s' % self.__fps_lst)
return task.again
#+CATEGORY: pmachines
#+TAGS: bug(b) calendar(c) waiting(w)
-* CODE create builds, update website and itch.io
+* CODE asserts (also fps) only for dev or functional tests
+* READY create builds and update website/itch.io
* READY refactoring (recurring task)
* BACKLOG intro animation (from target item to start position)
* BACKLOG buttons of the scenes enabled sequentially
def __similar_images(self, ref_img, tst_img):
cmd = 'magick compare -metric NCC %s %s diff.png' % (ref_img, tst_img)
- res = exec_cmd(cmd)
+ res = exec_cmd(cmd, False)
if exists('diff.png'): remove('diff.png')
print('compare %s %s: %s' % (ref_img, tst_img, res))
return float(res) > .8