diff --git a/2020/ferguson1/troubleshooting.html b/2020/ferguson1/troubleshooting.html index fd4002ddc..dfab2b27d 100644 --- a/2020/ferguson1/troubleshooting.html +++ b/2020/ferguson1/troubleshooting.html @@ -141,20 +141,25 @@ or be a problem but actually are not. For each one I have included a summary, a more thorough description and any resolutions (from easiest to hardest). For anything that can cause more than one issue I will list those separately to keep it as structured as possible/easiest to find.
--- The top wall isn’t (all/some of the time) visible! -- The snake isn’t moving! -- I can’t see the snake head (or other part of the snake)! -- I can’t see the bug! -- The game froze! -- The game gets slower as the snake gets bigger! -- I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why? -- I like black text on a white background but even with a white background terminal it ends up black! -- The text is hard to see (not bright enough)! -- Can I move the snake faster temporarily without having to modify the wait time? -- On environmental variables more generally and string to int conversions -- Errors and error reporting
-Because the score line is dynamic in length depending on the terminal size it can happen that the score/status wraps to the next line(s). This can be fixed by modifying the status line (see HACKING.html but @@ -175,7 +180,9 @@ See the The snake isn’t moving! +
Unless the game is paused this should not be happening. It can appear sometimes that there isn’t movement and sometimes it might have to take a moment to ‘unwind’ but as long as the head is moving then everything is fine.
@@ -197,7 +204,9 @@ it’ll catch up; just give it the time it needs.BOTTOM LINE: If you want more information then see the bugs.html file.
Possibly this could happen with too long a score line which I already discussed. It also used to be possible during cannibal mode whilst cannibalising: you would just have to continue moving on and you’d eventually find your head (assuming @@ -211,7 +220,9 @@ same time see it!
score line is covering the wall, snake and even bug; I gave two resolutions to that earlier in this file. To get a recommended number of columns usemake test.
-This has happened to me a number of times and early in development there were times that I could swear I even saw it beyond the walls but this should not be a problem now if it ever was.
@@ -241,7 +252,9 @@ since* is a regexp metacharacter). This has happened to me numerou
RESOLUTION #3: If the colour contrast is not good for your eyes use the snake-colours.sh script to select a different colour scheme.
This should not be possible either but without certain safety checks in place I have caused this (and I did this deliberately in development to find all the conditions I could to resolve them).
@@ -305,7 +318,9 @@ then it’s(maxy - 2) * (maxx - 2); above that would be:
kill the game by e.g. ctrl-c since the bug placement is stuck in a loop.
This shouldn’t happen though.
-Realistically the game shouldn’t take that much memory but maybe in some very busy systems it would have a problem.
SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?RESOLUTION #0: The size includes the head but what should it show if the size is 0? The head is the obvious choice so once you do get to size 1 you will still @@ -334,7 +351,9 @@ you moving the head until you find a body to use! Once you have size >= 2 then cannibalism mode counts.
BOTTOM LINE: In some senses SIZE=0 and SIZE=1 are the same thing.
This is a curses thing but fortunately it should be easy enough to solve.
RESOLUTION #0: Try setting the terminal to monochrome for the invocation of @@ -357,7 +376,9 @@ eat too many bytes in the entry (I cite the functions in the
I discuss colours and terminals in much more detail in terminals.html.
RESOLUTION #0: Make sure that your terminal settings have for bold text a brighter font. The way I have my terminal profiles set up is to use bright @@ -370,7 +391,9 @@ you mess up your old one. FWIW I haven’t had this problem on consoles only and in my systems I have the option to enable brighter colours for bold - it was only in testing that I came across this problem.
Yes. The getch() call is non-blocking when the timeout value is positive so
it’s up to that number of milliseconds.
What happens if you do:
WALLS= ./prog
Can you run into the wall since you didn’t specify a value and the default is 1? @@ -421,7 +446,9 @@ example:
I discuss the signed/unsigned issue to do with curses and sizes in C being unsigned in bugs.html but probably there isn’t anything more to say here.
-If curses fails to initialise you should get an error that says ‘curses error’ and you have every right to curse it to hell if that’s what you so wish. Apparently curses will report an error itself if that function fails but that diff --git a/2020/ferguson1/troubleshooting.md b/2020/ferguson1/troubleshooting.md index 1bad406f7..047f4403d 100644 --- a/2020/ferguson1/troubleshooting.md +++ b/2020/ferguson1/troubleshooting.md @@ -7,7 +7,7 @@ more thorough description and any resolutions (from easiest to hardest). For anything that can cause more than one issue I will list those separately to keep it as structured as possible/easiest to find. - +