I've been recruited in a small team of seven developers about 4 months ago on a small scale Java project involving a basic game development, where each programmer has to do a certain part. For example programmers 1,2 and 3 have high experience in Java and they get harder tasks, while programmers 4 and 5 handle the small details of the project. (They also program, but they get the boring stuff)
We are relatively well organised, we all live in different countries and communicate by skype and share the source by Dropbox, where we keep a log of updates, a task list and whatnot, but in general a problem always occurs in the project development.
Basically everyone gets motivated for a day or two and works on some fast code that does it's job (Although not always 100% efficient, but clean and maintainable) then stops working and becomes un-motivated because he thinks he's the only one doing his job. Very little work gets done and their programming knowledge could lead the project sky-high if they used it properly. There's always a de-motivating factor in project development, such as "I don't like this feature, I think we should go back" or "Nobody works so I won't either" and in the end, it all turns out messy.
My question is - what could be done to motivate them? How could I manage them in a way to constantly have them working on the project?
EDIT: I forgot to add that all the programmers on the project are doing this mostly for experience, they work for free and they do not get paid. I personally work because I wish to gain experience in working with a team.