From de897443917f9453f4d90d1c97524cbf4a56547f Mon Sep 17 00:00:00 2001 From: Landon Curt Noll Date: Sun, 21 Apr 2024 23:06:57 -0700 Subject: [PATCH] fix links in 2020/ferguson1/troubleshooting.html Ran `make gen_other_html` to perform the above. --- 2020/ferguson1/troubleshooting.html | 77 +++++++++++++++++++---------- 2020/ferguson1/troubleshooting.md | 54 ++++++++++++++------ 2 files changed, 92 insertions(+), 39 deletions(-) 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

-

The top wall isn’t (all/some of the time) visible!

+
+ +
+
+

The top wall isn’t (all/some of the time) visible!

+

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! +

+

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.

  • -

    I can’t see the snake head (or other part of the snake)!

    +
    +

    I can’t see the snake head (or other part of the snake)!

    +

    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 use make test.

    -

    I can’t see the bug!

    +
    +

    I can’t see the bug!

    +

    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.

  • -

    The game froze!

    +
    +

    The game froze!

    +

    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.

    -

    The game gets slower as the snake gets bigger!

    +
    +

    The game gets slower as the snake gets bigger!

    +

    Realistically the game shouldn’t take that much memory but maybe in some very busy systems it would have a problem.

    -

    I set SIZE=0 GROW=1, ate a bug but still only the head was visible! Why?

    +
    +

    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!

    +
    +

    I like black text on a white background but even with a white background terminal it ends up black!

    +

    This is a curses thing but fortunately it should be easy enough to solve.

    -

    The text is hard to see (not bright enough)!

    +
    +

    The text is hard to see (not bright enough)!

    +
    -

    Can I move the snake faster temporarily without having to modify the wait time?

    +
    +

    Can I move the snake faster temporarily without having to modify the wait time?

    +

    Yes. The getch() call is non-blocking when the timeout value is positive so it’s up to that number of milliseconds.

    -

    On environmental variables more generally and string to int conversions

    +
    +

    On environmental variables more generally and string to int conversions

    +

    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.

    -

    Errors and error reporting

    +
    +

    Errors and error reporting

    +

    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. - +

    - [The top wall isn't (all/some of the time) visible!](#topwall) - [The snake isn't moving!](#notmoving) - [I can't see the snake head (or other part of the snake)!](#invisiblehead) @@ -20,9 +20,12 @@ it as structured as possible/easiest to find. - [Can I move the snake faster temporarily without having to modify the wait time?](#movefaster) - [On environmental variables more generally and string to int conversions](#envvars) - [Errors and error reporting](#errors) +
    -## The top wall isn't (all/some of the time) visible! +
    +## The top wall isn't (all/some of the time) visible! +
    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 @@ -53,7 +56,9 @@ you shouldn't need it to be very wide. see). -## The snake isn't moving! +
    +## 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 @@ -84,7 +89,9 @@ e.g. when the snake is growing. file. -## I can't see the snake head (or other part of the snake)! +
    +## I can't see the snake head (or other part of the snake)! +
    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 @@ -102,7 +109,9 @@ that earlier in this file. To get a recommended number of columns use `make test`. -## I can't see the bug! +
    +## I can't see the bug! +
    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 @@ -139,7 +148,9 @@ since `*` is a regexp metacharacter). This has happened to me numerous times. [snake-colours.sh][] script to select a different colour scheme. -## The game froze! +
    +## The game froze! +
    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 @@ -226,7 +237,9 @@ snake. See below for some tests. This shouldn't happen though. -## The game gets slower as the snake gets bigger! +
    +## The game gets slower as the snake gets bigger! +
    Realistically the game shouldn't take that much memory but maybe in some very busy systems it would have a problem. @@ -244,7 +257,9 @@ the snake is bigger i.e. the screen is rather fuller than when you first begin? Or is the system rather busy? -## I set `SIZE=0 GROW=1`, ate a bug but still only the head was visible! Why? +
    +## I set `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 @@ -264,7 +279,9 @@ Try: * BOTTOM LINE: In some senses SIZE=0 and SIZE=1 are the same thing. -## I like black text on a white background but even with a white background terminal it ends up black! +
    +## I like black text on a white background but even with a white background terminal it ends up black! +
    This is a curses thing but fortunately it should be easy enough to solve. @@ -294,7 +311,9 @@ so that's probably why; in CentOS I did have to install it specially. [terminals.html][]. -## The text is hard to see (not bright enough)! +
    +## The text is hard to see (not bright enough)! +
    * 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 @@ -308,7 +327,10 @@ out if enabling brighter colours is possible. 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. -## Can I move the snake faster temporarily without having to modify the wait time? + +
    +## Can I move the snake faster temporarily without having to modify the wait time? +
    Yes. The `getch()` call is non-blocking when the timeout value is positive so it's up to that number of milliseconds. @@ -323,8 +345,9 @@ than the regular wait time. For negative wait time (drawing mode) you have to hit a key every time to move because it is blocking. - -## On environmental variables more generally and string to int conversions +
    +## On environmental variables more generally and string to int conversions +
    What happens if you do: @@ -398,7 +421,10 @@ 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. -## Errors and error reporting + +
    +## Errors and error reporting +
    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.