I sort of made this mistake with my current game. I started working on it by building a side feature that was not the core behavior of the game and then trying to build the core of the game around that.
Having the side feature was nice, but made actually getting the game working much more difficult. Imagine building a house and you put some furniture and appliances on the ground then try to lay the foundation under them. It is not pretty. It could be done, but works a lot better if you put the priority on getting the foundation laid to support everything else.
The Right Order
The correct order is to build as simple as possible playable version of your game first. For example if you are building a platform, start with a character that moves on the screen and jumps with a flat foundation that it doesn’t fall through.
In my case, I am building a turn based combat game similar to the second game I made using the Monkey-X programming language. The right way to do it (the way I started over doing it) is to first make a map and put a unit on it that can move, then can attack another unit in some way.
Moral of the Story
Build the simplest working version of the game first.
Don’t start putting your games’ furniture in until you have the foundation and probably walls of the game built.
Keep making awesome games.