Hi people of java-gaming.org!
I am attending a 5 year high scool java course soon. I have been programming Java for 1 year and am heading in for some bigger stuff, namely a re-make of the NES bubble bubble version in java with network support. I have been designing this project for a while now and I am sure about how to build all the core workings of it (how to program the logic). There are, however, some implementation questions in my design I have yet to answer, namely:
How should I tackle implementing the user interface and still get a nice seperation between ui and core? Creating a rendering module that collects data and renders or simply use Java2D methods inside each class that should paint itself on the graphics object I supply?
Moreover, how should I avoid duplicating alot of code from server-client view? I mean: stuff like movement logic and how “the invader rifleshots” move can be hard to get synchronized by alot of requests? Is a nice way to keep the ui components smooth and non choppy (choppy and non smooth would be becouse of network lag) by letting the objects have a position and a velocity sent to the client so the client can keep objects moving and only send new point and velocity when there are changes?
Say, should I make the server take “left button pressed” and then assure it is pressed until “left button is released” is sent? Couldnt this cause alot of trouble on UDP (planning to use it)? Maybe find a mix by letting it assume it is pressed for an amount of time? Example:
“left pressed” was recieved
assuming left is pressed until “left released” is recieved or for 20 ms (?)
“left pressed” was recieved 15ms later
the “assuming timer” is reset to keep expecting for 20 ms
“left released” was recieved 15ms later, stops moving
Last one:
How can I in a smooth way transfer positions of players, enemies, weapons and items (score, and so on)? Sending objects? (possible?) or sending some kind of raw data and interpet it?
If anybody know the answers for this or have a some good urls that would be great. I’d love to take anything about this project into discussion! (Not just here for concrete facts)

