Allegro.cc - Online Community

Allegro.cc Forums » Programming Questions » jagnet Java game networking progress

This thread is locked; no one can reply to it. rss feed Print
jagnet Java game networking progress
gillius
Member #119
April 2000

After I started up JAlleg (Java Allegro binding) I needed some complement for a networking library because games are best with friends :).

I am making some good progress. I took the Pong clone I made earlier with JAlleg and networked it. But one cool benefit is that I have built in proxy capabilities so you don't have to worry about firewalls or NAT. You can connect via a proxy server, and that proxy server can even be hosted on a free Heroku account.

jagnet is here: https://github.com/gillius/jagnet

All you need to try is Java and an Internet connection. Everything will be downloaded for you (even the Gradle build system) following the directions of the main page. If you are on Windows even Allegro static library will download. But if you are not on Windows there is not a static library so for example on Linux you must have Allegro 5 shared libraries available in the normal way (liballegro or liballegro_monolith).

It's not documented on the public page, but I have for the time being my Heroku app running if you'd like to test. Due to it being a free account, it "goes to sleep" after idle time so if you are the first person to hit it when it's asleep it might take 10-30 seconds before you see it connect. As an example you can run the server and client (on same machine or different ones), replacing gillius below with some unique string like your name. All that matters is that server and client use the same tag:

./gradlew runServer -Puri=proxy+ws://jagnetproxy.herokuapp.com:80/websocket?gillius

./gradlew runClient -Puri=proxy+ws://jagnetproxy.herokuapp.com:80/websocket?gillius

If you haven't seen the game before you can see more about it here: https://github.com/gillius/jalleg

You can use A/Z and up/down arrows to control paddles or click and drag the mouse. The server is the left player and the client is the right.

{"name":"BallAndPaddleExample.png","src":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/9\/79dbc6949eb903b87993b07f0647614b.png","w":642,"h":528,"tn":"\/\/djungxnpq2nug.cloudfront.net\/image\/cache\/7\/9\/79dbc6949eb903b87993b07f0647614b"}BallAndPaddleExample.png

Gillius
Gillius's Programming -- https://gillius.org/

Go to: