Issue with Evaporating Keneth [Running really slow]
Hey @couch your game seems to be running really slow.. the character is barely moving, i believe it has to do something with the way you are handling your render loop but i can't be sure. Would you happen to know how to get this sorted out?im' running it on
- OSX 10.13.4
- 2.2 GHz Intel Core i7
- `16 GB 1600 MHz DDR3
- Intel Iris Pro 1536 MB
(log in to comment)
Comments
I apologize but I don't have the hardware to experiment on other machines.
This is unfortunate, but maybe it's due to bad coding on my side.
Things that can maybe help:
1) if it's does to a problem of hardware acceleration: in line 172 of game/ek_display.py:
" self.screen = pygame.display.set_mode(r, pygame.HWSURFACE | pygame.DOUBLEBUF, bestdepth)"
can be replaced by something like:
" self.screen = pygame.display.set_mode(r, pygame.DOUBLEBUF, bestdepth)"
2) reduce the number of "parts": in line 149 of game/ek_objects.py
" self.screen = pygame.display.set_mode(r, pygame.HWSURFACE | pygame.DOUBLEBUF, bestdepth)"
can be replaced by something like:
" self.screen = pygame.display.set_mode(r, pygame.DOUBLEBUF, bestdepth)"
2) reduce the number of "parts": in line 149 of game/ek_objects.py
" while len(self.parts)<self.size:"
can be replaced by something like:
" while len(self.parts)<self.size/4:"
3) reduce the number of "drops": in line 235 of game/ek_objects.py
" if random.randint(0,10) == 0:"
can be replaced by something like:
" if random.randint(0,100) == 0:"
Thank you for letting me know.
It is a bit late for that, but I think the solution is:
in line 239 of game/ek_display.py:
add:
pygame.display.flip()
remove (or comment):
for l in dirty:
pygame.display.update(l)
if redraw:
pygame.display.update()
pygame.display.update(l)
if redraw:
pygame.display.update()
speedlimit35 on 2018/10/31 04:10:
This is happening to me too