This site requires JavaScript, please enable it in your browser!
Greenfoot back

Report as inappropriate.

bourne
bourne presents ...

2014/1/24

Shooting Stars

A start of a networking game with server and clients.

NOTE: Of course this will not work onsite.

Location and firing is displayed across all clients via the server.
Supports multiple clients.

This is just a practice project.

** If you host a server, it will ask for a port number (which clients will need to know).

** If not hosting a server, it will need to connect to a server via an IP address and port number. If server is on the same machine you can use "localhost" (without quotes) for IP.

--

Idea is to have the "missiles" be computed by the server in if they collide with to-be enemies. So then clients can be told of exploded missiles (removing them), and having an explosion take their place.

Enemies I'm guessing will have to be synced as close as possible between clients while still represented on server for determining collisions. So movement like the missiles will be done on client side. As well as healths and such.

Let me know if you have any thoughts or questions.


For reusable GUI Components, visit:
http://www.greenfoot.org/scenarios/7578

1744 views / 2 in the last 7 days

2 votes | 0 in the last 7 days

Tags: game demo with-source gui multiplayer client lan bourne server

open in greenfoot

There is no HTML 5 translation of this scenario available.
View legacy version (requires Java plugin)

This scenarios uses Java features that are not available for use after conversion to HTML 5. Please try the legacy version, which requires the Java plugin to be installed.

lordhersheylordhershey

2014/1/24

Hey there is that guy who manipulates the DOM of the webpage with their scenarios, could you make the program get an instance of the scripting engine and make requests to an external server via dynamic tags? Kind of like cross site scripting. I think it would require routines to be inserted that the java program interacted with, while the implanted routines used the dynamic tags.
bournebourne

2014/1/24

@lordhershey, I'm not sure how any of that works, nor do I know if that sort of thing would be prevented in the future.
A new version of this scenario was uploaded on Sat Jan 25 20:16:45 UTC 2014 Added GUI for new game setup (hosting a server or joining one). Also ships appear on all clients when new client joins (without the need of ship moving its location first).

Want to leave a comment? You must first log in.

Who likes this?

herusaputra FireChick