0

I've got a curses-using roguelike game. I want the map to take up the entire screen, but when I make the necessary modifications, the screen flashes every time the user's character moves.

Are there any optimizations I can use to stop this from happening? I've already tried the following:

  • reduce the area in which monsters are capable of moving
  • reduce the area in which monsters/items spawn

These helped, but not really enough. I've also tried various compiler flags, but none of them really have an effect on the final generated code, so I don't think I will get magic improvements from the compiler.

sadljkfhalskdjfh
  • 747
  • 3
  • 10
  • 17
  • 1
    Try to reproduce the effect with an [MCVE](https://stackoverflow.com/help/mcve), so *we* can try :) Without seeing code, there's only some general advice possible like only use `wrefresh()`/`refresh()` once per screen change and if you have multiple windows, use `wnoutrefresh()` on them and a single call to `doupdate()`. –  Jun 22 '17 at 07:32
  • @FelixPalmen I don't really think that would work, since there are a lot of things happening in my program which would impact the speed (monster movement, spawning, rendering, generation), and I don't want to essentially rewrite the whole thing. General solutions are ok for me, your suggestion did improve performance noticeably (but did not completely eliminate the black lines on the screen). – sadljkfhalskdjfh Jun 22 '17 at 10:38

0 Answers0