Skip to main content

Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

Umm,,, That's hard, since there are so many, but I think the main one is with how I structured my code.

My game is chess inspired (https://itch.io/jam/gmtk-2019/rate/459874, if you want to check it out. And if you do, don't forget to read the section after IMPORTANT in the itch.io page's description, and don't forget rating the game), and I decided to use class Tile, Player, and the main one. In player I didn't really have much, other then the variable "hisTurn" (which I could keep global as a boolean "white's turn" or something like that) and was useless, and the having only the Tile class makes it a mess of a code.

It's always so tricky trying to decide when you need to refactor your code, and when doing so would be a waste of time. It's doubly hard in a game jam; trying to weigh up how much time any given rewrite will save in the long run is definitely a skill!

Yeah!

Ah, the old entire-program-is-one-class trick. Hope you didn't have to spend too much time debugging that monster ;)

Well, I only had one day to work on the game anyways, so it was ok to write hackey code. But it did mean that now I am having a hard time making a better version. The first thing I did was make like 5 more classes. 

Sometimes I find it's almost nicer to take a step back and start from scratch with the code.

I like drawing out my class dependencies on a whiteboard or big bit of paper, but it probably makes me look like a crazy person.