I have to have Tetris made in Java in 3-5 weeks, but I haven't started, and have no idea how to start. I'm not asking anyone to make the game for me, I just need a general idea of what to do to get things rolling. Firstly, what classes should I make? Should I make a separate class for the grid, or should I just put a 2D array in the main class? Should I have a single class that holds all the data for the pieces, or a separate class for each piece? And how should rotations be handled?

I'm sorry if I sound clueless right now, but I'm starting to get desperate. I've been looking through source code for other implementations for the game, but most of it is incredibly convoluted and poorly documented. Also, most other implementations use custom graphics APIs, which I'm not supposed to do.

> I have to have Tetris made in Java in 3-5 weeks, but I haven't started, and have no idea how to start.
Week 1, Draw a shape
Week 2, Move the shape with the keys
Week 3, Rotate the shape with the keys
Week 4, Detect completed lines in the grid
Week 5, highscore, and awesome grades.

> Firstly, what classes should I make?
Who knows - there is no set "recipe" for such decisions.
A large part of it depends on your skill, and what you want to achieve.

Try some stuff, experiment and learn as you go.

Ignore the first plan, and just experiment with all the component steps of the problem for a week.

Week 0: come up with a different product name.
The name "Tetris" is trademarked worldwide and the owners are extremely agressive in enforcing that trademark, taking anyone using it without permission to court even if there's no commercial interest.

Week 0: come up with a different product name.
The name "Tetris" is trademarked worldwide and the owners are extremely agressive in enforcing that trademark, taking anyone using it without permission to court even if there's no commercial interest.

lol

This article has been dead for over six months. Start a new discussion instead.