If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Enjoy an ad free experience by logging in. Not a member yet? Register.

Java game

Hello! I'm trying to write a game in Java. The Sea Battle game where you should hit and sink the opponents ships...
It has to be in a field 10x10 squares and i had written the code for a square. Here it is:
import java.awt.*;
import javax.swing.*;

Making a game is no easy task... There are utilites for rendering 3d objects and extracting all the sprites you need. As for torpedoes and blowing ships up, thats gonna take some heavy math. You need to generate an applicable physics model (Vectors for the torpedo trajectory, coordinates of all the ships, and the outline of the ships to register hits, etc). It would be cool to explain it in a couple paragraphs, but people go to college for YEARS to study programming, and study programming for YEARS after they get out to get good at game programming. I'd reccommend "Tricks of the Windows Game Programming Gurus" by Andre LaMothe(SAMS) for starters, but your gonna need some understanding of C to see whats going on.

Java Game

No,No,No... Not thst kind of game. The game like in the attached picture. THe concept is:
You have a board with squares 10x10, where you can randomly place 1 4-squared ship, 2 3-squared, 3 2-squared and 4 1-squared. Ships can only be placed vertically or horisontally (not diagonally) and the squared of two different ships can't touch each other. The play should try to hit all the ships in as little time as possible. Look at the attached picture. The red squares are the ships the player has killed and the crosses are the empty spots where there aren't any ship. It's extremely simple game which requares a little knowledge in Java (My teacher said he could write this game in an hour, I can't).
Anyway if you can't help me with this, maybe you vcan help me to write a code for the TicTacToe?

Java Game

Another tricky question.
A have another game, consept is that a player pushes the "Start" button an dbackground should change color, as soon as that happened tha player should press the "stop" button, and tha message dialog should come out telling the player how much time did it take for him to push the "stop" button. Any ideas how to do that?