Menu
 
FAQFAQ
SearchSearch

MemberlistMemberlist

UsergroupsUsergroups
RegisterRegister
ProfileProfile
Log in to check your private messages
Log in to check your private messages
Log inLog in
 
 

Community
 

Web Bolo prototype

 
Post new topic   Reply to topic    Winbolo.net Forum Index -> Development
View previous topic :: View next topic  
Author Message
scockroach



Joined: 04 Aug 2005
Posts: 10

PostPosted: Thu Feb 05, 2009 7:02 pm    Post subject: Web Bolo prototype Reply with quote

I've created a web browser based Bolo prototype that you can see here: http://people.apache.org/~mheath/webbolo.Main/Main.html

This is just a proof of concept. I haven't attempted network play yet. It will be be interesting to see how well the game could be played using Ajax.

I used GWT to build it. It's only 250 or so lines of Java code. The source code is in a Git repository at Git Hub: http://github.com/mheath/webbolo/tree/master

This prototype demonstrates that Bolo would at least be feasible using a web browser. My long term goal is to bring JBolo up to date and make it suitable for using with GWT and hopefully build a fully playable version of Bolo.

Any comments or feedback would be welcome.
Back to top
View user's profile Send private message
Sticks



Joined: 23 Feb 2003
Posts: 806

PostPosted: Thu Feb 05, 2009 9:44 pm    Post subject: Reply with quote

Good work!

As far as JBolo goes, I think a few of the guys have been working on it but not really doing many commits. Eventually get it compiled natively and have it run as a standalone rather than in the browser. But I could always be wrong.
Back to top
View user's profile Send private message Visit poster's website
Elvis



Joined: 22 Feb 2003
Posts: 878

PostPosted: Fri Feb 06, 2009 11:27 am    Post subject: Reply with quote

Thats nifty.

You could probably get a single player game implemented pretty easily. The only tricky part would be how to load map file in. JBolo currently processes them via reading InputStreams but they are unsupported by GWT (only some OutputStreams) From memory the only other java types used in the backend are HashSets and ArrayLists which are both supported.

You may need to stub out the networking module as uses some dialogs from the com.jbolo.gui.dialogs package. Probably should be interfaces at some stage. Besides map loading, its just a matter of implementing the two front end interfaces (or stubbing out as required) and then creating a gameclient and calling it from the timer. MapLoad.java shows that.

Networking on the other hand... I'm not sure GWT or javascript supports primitive socket connections such as DatagramSockets which are required for networking as WinBolo networking is all via UDP. The overhead and extra latency of doing ajax call backs to a server middleware may also make it infeasible to play networked. Why not use an applet instead that already supports everything?

Quote:
My long term goal is to bring JBolo up to date and make it suitable for using with GWT and hopefully build a fully playable version of Bolo.


JBolo is a far way behind the C codebase with 1.16 coming out soon (its approximately 1.14) Min I believe is doing some work on bringing it up to speed.

Most development discussion happens via irc on #winbolo (on efnet) and is documented on the wiki. Let me know if you want SVN access.
Back to top
View user's profile Send private message Visit poster's website
scockroach



Joined: 04 Aug 2005
Posts: 10

PostPosted: Fri Feb 06, 2009 8:45 pm    Post subject: Reply with quote

I'm really not sure where I'm going to take the Web Bolo prototype I've started. It's been fun and it's encouraging to see that Bolo can work so smoothly inside of a browser (of course, network play still needs to be tested...).

There's a lot about the Bolo architecture that I don't like. I don't like how everything is limited to 16 (16 players, 16 pillboxes, 16 bases...) Everything is constrained around what was Bolo and doesn't have the flexibility and dynamics that I would like to see.

For example, with frameworks like Apache MINA or JBoss Netty, there's no reason we couldn't build a network server that could support hundreds of players. Bandwidth would be the only limit. We could also build a server that supports multiple protocols like HTTP/Comet for an in browser game as well as a UDP for more traditional clients and even TCP for those stuck behind firewalls that don't let UDP traffic through.

I've been thinking of starting a new code base using JBolo as a guide but working toward an architecture that is more scalable and more dynamic. Some of the suggestions on the Wiki are great (capture the flag, king of the hill, death ball, etc.). I would like to start working towards an architecture that can easily support those kinds of changes.

Obviously this would be a lot of work. I can't say that I'm committed to getting all that work done but this is the direction I would like to head in.
Back to top
View user's profile Send private message
scockroach



Joined: 04 Aug 2005
Posts: 10

PostPosted: Fri Feb 06, 2009 8:45 pm    Post subject: Reply with quote

BTW - The source code is at GitHub - http://github.com/mheath/webbolo/tree/master
Back to top
View user's profile Send private message
Elvis



Joined: 22 Feb 2003
Posts: 878

PostPosted: Tue Feb 10, 2009 12:10 pm    Post subject: Reply with quote

scockroach wrote:
There's a lot about the Bolo architecture that I don't like. I don't like how everything is limited to 16 (16 players, 16 pillboxes, 16 bases...) Everything is constrained around what was Bolo and doesn't have the flexibility and dynamics that I would like to see.


You can change the number of things (players/pillboxes etc) from 16 to 253 easily by changing the #define's in the C code or the static member variables in the java code. e.g.

Code:

/** The maximum items of each type to exist in the game. */
public static final int MAX_ITEMS = 16;


For a maximum of 253 game items (of each type) two areas of the code would need to be changed.

1. The user interface, to be able to display everything meaningfully.
2. Some of the networking packet creation/extraction - For example: NetMNT/NetPNB classes or modules. Specifically the make() and extract() functions. They currently save a couple of bytes of network traffic per item by bitshifting some of the data as it is known to fit in a nibble. Searching for utilPutNibble() would locate the instances.


It wouldn't be too difficult to support more then 253 game items or players. The data types would need to be changed to be larger types (currently stored in single bytes) and definition of NEUTRAL would need to be changed (currently 0xFF, 0XFE is also considered special)

Outside of those constraints, the amount of game items is only limited by available memory.

Most things in the WinBolo/JBolo code base is configured by #defines. The grand plan was to externalize them to make the configurable by modders. (Points to anyone who can find my now embarrassingly juvenile post about it 11 years ago on the r.g.b)

Quote:
For example, with frameworks like Apache MINA or JBoss Netty, there's no reason we couldn't build a network server that could support hundreds of players. Bandwidth would be the only limit. We could also build a server that supports multiple protocols like HTTP/Comet for an in browser game as well as a UDP for more traditional clients and even TCP for those stuck behind firewalls that don't let UDP traffic through.


Latency is more of an issue in WinBolo then bandwidth (however less then the original mac bolo) It is an action/real time strategy game - A pillbox can destroy a tank in a second when angry, a player can turn 90 degrees on road in about 0.7 seconds and dodge some of the shells and survive. I'm not sure what the impact would be in creating, parsing XML , creating XML response, parsing response etc. if an AJAX or HTTP networking transport was used. WinBolo's networking previously used a combination of TCP and UDP sockets (later simplified to just UDP) as using TCP sockets alone could not deliver the data quick enough even when disabling the Nagle algorithm. This is partly due to the protocol itself which is lots of small packets (10-30 second) of around 25-150 bytes each rather then a continuous stream of data.

That said, to implement a different network transport method have a look at the netclient.c / netclient.java file. Its not an interface yet, but provided the send() and ping() calls are implemented it should work. The equivalent file on the server side is servertransport.c. Minor changes would be required in servernet.c to check multiple transports for new data and netplayers.c/java to remember which player uses what transport.

Quote:
I've been thinking of starting a new code base using JBolo as a guide but working toward an architecture that is more scalable and more dynamic. Some of the suggestions on the Wiki are great (capture the flag, king of the hill, death ball, etc.). I would like to start working towards an architecture that can easily support those kinds of changes.


I don't yet have an answer for implementing different game types (suggestions yes...) as Bolo never had game types or even win conditions. Depending on what direction people want to go - starting from scratch, completing the Java version, rewriting, unifying the C client to a cross platform toolkit I have some ideas....
Back to top
View user's profile Send private message Visit poster's website
scockroach



Joined: 04 Aug 2005
Posts: 10

PostPosted: Wed Feb 11, 2009 12:27 am    Post subject: Reply with quote

Quote:
Latency is more of an issue in WinBolo then bandwidth (however less then the original mac bolo) It is an action/real time strategy game - A pillbox can destroy a tank in a second when angry, a player can turn 90 degrees on road in about 0.7 seconds and dodge some of the shells and survive. I'm not sure what the impact would be in creating, parsing XML , creating XML response, parsing response etc. if an AJAX or HTTP networking transport was used. WinBolo's networking previously used a combination of TCP and UDP sockets (later simplified to just UDP) as using TCP sockets alone could not deliver the data quick enough even when disabling the Nagle algorithm. This is partly due to the protocol itself which is lots of small packets (10-30 second) of around 25-150 bytes each rather then a continuous stream of data.


The latency is what I'm worried about most building a web client. Using Ajax you don't have to use XML, you can use binary encoded data just fine. Using Ajax with HTTP Chunked encoding you basically get the same thing as a TCP stream. Even with the equivalent of a TCP stream, I think you're right and there will still be latency issues because of the overhead intrinsic to TCP. It's certainly something I need to play with.
Back to top
View user's profile Send private message
maokh



Joined: 26 Jun 2013
Posts: 2

PostPosted: Sun Jun 30, 2013 12:49 am    Post subject: Reply with quote

I am going to raise this post up from the dead, because I have been playing around with all the hard work scockroach put into this project a few years back.

introducing http://bolo.io/

Yes its everard island, yes there are a few glitches in the status display.. but it is remarkably functional and nostalgic.

While it does need a little bit more functionality added as well as possibly some backend work, i am thinking of starting with some low hanging fruit.
Back to top
View user's profile Send private message
HalfWayCrook



Joined: 28 May 2009
Posts: 26

PostPosted: Sun Jun 30, 2013 11:30 am    Post subject: Reply with quote

Very Happy i dig this. i like how your view of the map takes up fullscreen. like you said it needs more development, but so far lookin good IMO.
Back to top
View user's profile Send private message
jhood



Joined: 02 Aug 2004
Posts: 734

PostPosted: Sun Jun 30, 2013 2:51 pm    Post subject: Reply with quote

Just one simple tweak, and we're good:

Code:
if(player_name == "Cool Fool"){
   tank_explode();
   quit();
}
Back to top
View user's profile Send private message
hellscream



Joined: 27 Feb 2003
Posts: 278

PostPosted: Sun Jun 30, 2013 7:58 pm    Post subject: ... Reply with quote

LOL @ jhood

and nice work maokh.....will be interesting to see how you take it from here.
Back to top
View user's profile Send private message
hellscream



Joined: 27 Feb 2003
Posts: 278

PostPosted: Tue Jul 02, 2013 3:23 pm    Post subject: Reply with quote

I keep getting a "connection lost" message now.

Is something going on?
Back to top
View user's profile Send private message
ErYan



Joined: 17 Mar 2010
Posts: 138

PostPosted: Tue Jul 30, 2013 3:06 am    Post subject: Reply with quote

Nice work. How different is it from Orona?

How does it work in terms of latency with multiple players?

I can't seem to join the team with no pills.
Back to top
View user's profile Send private message
maokh



Joined: 26 Jun 2013
Posts: 2

PostPosted: Fri Aug 02, 2013 5:33 pm    Post subject: Reply with quote

ErYan wrote:
Nice work. How different is it from Orona?

How does it work in terms of latency with multiple players?

I can't seem to join the team with no pills.


Its hardly different at all... yet. I just forked Orona and made a few modifications to get it running with the current version of nodejs.

So far, it seems stable. I haven't had to restart the server yet.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Winbolo.net Forum Index -> Development All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
 
 
 
Winbolo.net Copyright ©2003 John Morrison