Make a Doubleback Game in Monogame

Поділитися
Вставка
  • Опубліковано 7 вер 2024
  • Double Back is a really old game for the Radio Shack TRS-80 Color Computer. I'll show you the basics parts of making a clone of this game, but it's your job to finish the game and mold it in your own way. The code can be downloaded from: github.com/dle...

КОМЕНТАРІ • 2

  • @CallousCoder
    @CallousCoder 2 роки тому

    That if tree in that check for collision within that foreach is really elaborate (dare say ugly and hard to debug).
    You can refactor that by inverting the if and continue when it doesn’t match.
    It puts all the ifs in a nice straight line.
    There hardly is a reason to have more than two bested ifs. When I happen to code it that way, I always refactor it immediately.
    Coming from an assembler background that is just second nature, otherwise you get so lost in the branched and jumps.

  • @CallousCoder
    @CallousCoder 2 роки тому

    Oh hell the checkIfLooped is even worse with nested ifs.