Index of /coindood/java/netpong

      Name                    Last modified       Size  Description

[DIR] Parent Directory 21-Mar-2006 16:53 - [TXT] Todo.txt 19-Oct-2005 04:52 1k [   ] NetPong.java 19-Oct-2005 04:52 1k

NetPong Draft v1
Alex Perez

* Uses udp/ip to communicate with other player
* Differentiates between client and server mode
  (server embedded within the program rather than seperate)

uses concepts:
	* swing
	* java2d within swing
	* object rotation
	* udb packet generation
	
- creates a jframe holding the menubar, a  gamepanel, and a scorepanel.

- the menubar has 3 menus:
	# file
		+ new game
		+ end game
		+ exit
	# Game
		+ game settings
	# help
		+ help on game
		+ about

- the game has seperate classes for:
	% ball
	% paddle
	% ball control 
	% packet generation
	% game panel class
	% options class
	
- the ball class returns a graphics primittive 
	* two options
		@ server controlled 
			+ used by hosting system
			+ directly controlled by game control class
		@ remote controlled
			+ used by client player
			+ recieves server ball position
		
- the paddle class returns a graphics primmitive and implements keylistener
	* two options
		@ user controlled
		@ remote controlled
	
- the game control class implements actionnlistener
	* a timer is implemented to control the frame rate and object movement	
	* based on the server/client configuration:
		@ client duties only:
			+ receive ball and enemy paddle positions
			+ send paddle position only
		@ server duties:
			+ send client:
				# ball
				# enemy paddle position 
				# winner
				# points
				# game state  
			+ receive from client:
				# paddle position
				# game state
	  
- packet generator class
	* generates packet based on program state
		@ client packets sent
			+ current paddle position
			+ current game state
		@ server packets
			+ current hosting paddle position
			+ current ball position
			+ current game state

- game panel class extends JPanel
	* controls all the elements of the game background and playing field
	* affected by options chosen by user
	
- options class
	* saves and reads user options to file
	
Hosted by www.Geocities.ws