Could not compiling Java Room Module of Online Multiplayer Pong

Added by Comic Tsai 593 days ago

hi comic,
welcome to Union!

the errors you are seeing are occurring because the currently posted version of Union (1.0 Alpha 7) is older than the one used in the pong tutorial. when we ship 1.0 Alpha 8, you should be able to compile the example without errors. until then, you can modify the reactor client and connect it to tryunion.com:80, which is running the pong module.

if you would like to test out a newer server build, and are willing to risk some instability, please e-mail us at .

regarding translation, there are no copyright issues. we would be extremely happy to see chinese translations of Union's documentation. please send us the urls of anything you post so that we can link to them from our site.

colin

Hello

I am learning "Online Multiplayer Pong!", the Union "Combined Client/Server Code Examples".
when I try to compile the example Room module code "PongRoomModule.java"
I got 5 error messages from javac.exe.

N:\>javac -cp N:\union_serv\lib\union.jar PongRoomModule.java

PongRoomModule.java:296: cannot find symbol
symbol : variable ATTRIBUTE_CHANGED
location: class net.user1.union.core.event.ClientEvent
evt.getClient().addEventListener(ClientEvent.ATTRIBUTE_CHANGED, this,
^
PongRoomModule.java:354: cannot find symbol
symbol : variable ATTRIBUTE_CHANGED
location: class net.user1.union.core.event.ClientEvent
evt.getClient().removeEventListener(ClientEvent.ATTRIBUTE_CHANGED,
^
PongRoomModule.java:380: cannot find symbol
symbol : method getAttribute()
location: class net.user1.union.core.event.ClientEvent
if (evt.getAttribute().getScope().equals(m_ctx.getRoom().getQualifiedID())
^
PongRoomModule.java:381: cannot find symbol
symbol : method getAttribute()
location: class net.user1.union.core.event.ClientEvent
&& evt.getAttribute().getName().equals(ATTR_PADDLE)) {
^
PongRoomModule.java:384: cannot find symbol
symbol : method getAttribute()
location: class net.user1.union.core.event.ClientEvent
String[] paddleAttrs = evt.getAttribute().nullSafeGetValue().split(",");
^
5 errors

As my superficial Java knowledge. I guess Java Compiler cannot find the Field or Method.
So I searched Union javadoc.
I didn't found Field:ATTRIBUTE_CHANGED and Method:getAttribute() in the "union.core.event.ClientEvent".
I found them in "union.core.event.RoomEvent".
Is this the reason I could not accomplish the compiling?
Or I just made some mistakes?

by the way,
I must say the Licensing for Union about supporting up to 1000 simultaneous clients is a super great idea.
When a multiuser app were requiring more than 1000 simultaneous client.
It means the app or business model is worked.
Then it's time to invest more money or inviting investors.
And It's right time to upgrade to Union Enterprise,too.
This Licence policy is a great opportunity and big favor for many small game company or workshop.
It gives a safer way to develop a project or business.
So I am trying to be a evangelist of Union in Taiwan and China.
I will try to promote Union to my clients and other flashers in Taiwan and China.

Right now I am studing and translating the tutorials on www.unionplatform.com to chinese.
Is there any copyright issue in my action? ( I didnot post any doc on my blog till now, all translating docs is just in my harddisk)

Best Wishes
Comic