COMP 310
Fall 2017

Lec45:  Lessons from the Labs 

Home  Info  Canvas   Java Resources  Eclipse Resources  Piazza

 

Make sure that your network is NOT set to Public

 

Make sure you fully process the returned data packets when sending a data packet 

 A lot of people are assuming that the returned data packet is an Ok status and are thus ignoring it.     But since the returned value of sending a data packet (via a chat room) is an iterable of data packets, without defining what those data packets are, no assumptions about those data packets can be made and they must be processed as any other data packets.

IHost.getUUID() (the equality identifier for the connection object) and IUser.getUUID() (the equality identifier for the chat room object) must return the same value for all IUsers associated with a given IHost.   (Note: the class names used in a particular course year will be different than the ones used here.)

IHostand IUser must return the same UUID value otherwise it is impossible to invite a user from one chat room into another because the application only knows IUsers in chat rooms but needs the corresponding IHost in order to invite them to a new chat room.    The UUID is the only way that an  IUser can be associated with a particular IHost.

 

Don't use mutable static fields!

Very bad things will happen if you do as this will couple your entire system together.   Just don't.   Ever.  

 

Can game servers reject packets?

What does it mean for a game server to reject a packet?

 

Develop iteratively

Do NOT attempt to write your entire game before testing it!   Develop your application small piece by small piece, continually testing it other people.

 

Program defensively!

Assume that the game clients and game servers that are connected to you will behave badly and put in defensive checks to keep your system from crashing due to someone else's bad code.

 

 


© 2017 by Stephen Wong