You are browsing as a guest. Sign up (or log in) to start making projects!

8h 51m 8s logged

Third Devlog - Tetris in C!

This one took me a while
(My favorite bugs I encountered are attached)

It has:

  • Game logic and Rendering in separate files
  • Bag Randomizer for more fair pieces
  • Ghost display of where your block is going to fall
  • Different colors for almost every piece (no orange)
  • Wall kicks when rotating

Stuff I learned:

  • Using calloc() instead of malloc()
  • When to actually use the & operator
  • Using a struct to save the game state
  • More gdb debugging
  • Writing to a debug log file since I cant print to terminal while using ncurses
  • Extern keyword when saving read only data in another file

Biggest challenge:
Debugging different logic errors was really hard, since there’s just so many more different spots where the code can go wrong when handling memory yourself
(out of bounds arrays don’t always crash, they can sometimes just give you random data)

0
60

Comments 0

No comments yet. Be the first!