Not sure what *you* mean by "coding the engine" but this is the most often linked response on Gamedev.net on people struggling to create a Game Engine...
Write Games not Engines
In addition, if your design is good to begin with, plough on, get the game finished. If you have written it well you'll have bits of reuseable code which is the beginning of your 'engine'. You can then improve/refactor this as necessary. Again, if you have designed your 'engine' and game well it'll slip straight in and can be used in V2 of your game.
My main issue was (is) making the reuseable code unrelated to my program code. The best way to ensure this is use the engine in separate tests.
Hope it makes sense.
Write Games not Engines
In addition, if your design is good to begin with, plough on, get the game finished. If you have written it well you'll have bits of reuseable code which is the beginning of your 'engine'. You can then improve/refactor this as necessary. Again, if you have designed your 'engine' and game well it'll slip straight in and can be used in V2 of your game.
My main issue was (is) making the reuseable code unrelated to my program code. The best way to ensure this is use the engine in separate tests.
Hope it makes sense.