Jump to content
  • Advertisement

Time4Tea

Member
  • Content Count

    13
  • Joined

  • Last visited

Community Reputation

0 Neutral

2 Followers

About Time4Tea

  • Rank
    Member

Personal Information

  • Interests
    Art
    Design
    Programming

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Something else I'm wondering about is how/where to actually host the server. As I'm a fan of free software and want to use as much of it as possible in this project, I've been looking into free-software alternatives to Amazon Web Services. This page here seems to list several interesting options: http://101.datascience.community/2013/06/07/open-source-alternatives-to-aws/ Does anyone have any experience of using any of these? Any recommendations for any that would be particularly well-suited for hosting a web-based game implemented in Java? Sorry for asking so many questions, but it seems that there is quite a lot of research and planning to do, just to figure out where to start with this!
  2. @dmatter: Thanks for your post and for listing all those options - many of them seem very interesting. With so many options available, it seems difficult to figure out where to start. Which one would you recommend to someone who is very new and inexperienced with client-server web app design? Of those options, I think I'm leaning towards the Jetty servlet container, as it seems to incorporate websockets and seems to be more dedicated towards web applications. So, with that, my game server would be implemented as a Java servlet, running inside Jetty? Does Jetty also provide functionality for user authentication and communicating with a MySQL database? Also, how would I implement the other pages of the website with that option (i.e. outside of the 'game' application page)?
  3. @alnite and @hplus0603: Regarding the client/server development, what hplus0603 said is more-or-less the sort of thing I had in mind. I think I will have to develop them both in parallel, starting very simple and gradually building up. The first thing I will probably do is go through some tutorials for whichever web server option I decide on and try to make a very simple client to interact with it. For example, just a web page with a single button that sends a request to the server when it is pressed and then displays the response from the server. As hplus0603 says, I imagine I'll probably have to get the communication protocol side working first, before I try to build up to more complicated functionality and eventually do the actual game coding. Although, I haven't done any of this before, so it seems like it will be a lot of work and a lot of things to learn! :-)
  4. As well as the bi-directional communication, a specific thing I want to have is a turn timer, which the server will pause if it detects a client disconnection. So, for that I figured I would need a persistent connection. Although, I guess I could 'fake' it, like you say, with some sort of regularly-timed polling. So, for the 'wesocket' option, are you suggesting I could make a server based on that from scratch, or is there an off-the-shelf Java server that could implement websockets (and is free software and more lightweight than GlassFish, etc.?) ;-)
  5. I had a quick look at it and it does look very interesting, the way it allows you to create your own custom protocol. One thing I didn't quite gather from the Wikipedia page though, is whether it can provide a websocket-style persistent connection to a web client?
  6. Ok. I had a look at the Wikipedia page for Node.js and it does look like it would be quite quick to get up and running. But, there are a couple of things that put me off of it: Firstly, I'm not a big fan of Javascript. I was hoping to implement as much as possible on the server side in Java, and make the Javascript web client relatively thin. Secondly, it looks like it is tailored towards making a web application; however, one of my goals is for the server to be able to connect to both web and non-web clients. So, I'm not sure Node.js would be best suited for that. I guess I could consider starting with a web-only version, which would be faster to get up and running. But then, that would probably lead to a lot of re-coding work later on, if I want to expand it to non-web clients. Seems like there is a trade-off there between development speed and functionality. Could you recommend anything that is more lightweight than GlassFish/Tomcat, that would allow me to code the server in Java and be able to connect to both web and non-web clients (using websockets and also based on free software)? It would also need to connect to an SQL database for permanent data storage/retrieval. I gave some more details of the server requirements in another thread I made here:
  7. Thank you all for your interesting replies. Although, I'm a bit unclear now about the threading aspect. Both @alnite and @swiftcoder mention it; although, earlier in the thread, @Satharis recommended steering clear of threading, if my game has very low performance requirements (turn-based, fairly low # of concurrent games). Ok. I'm thinking about going through some tutorials for GlassFish or Apache Tomcat, to find out more about them. Do you think either of those might be suitable?
  8. Ok, thanks again, @hplus0603, I appreciate your advice :-)
  9. @hplus0603 Thank you for your detailed reply. I know my question is quite broad - I'm trying to feel my way to a good place to start with this. I'm not so sure about the 4-layer system that you describe though. It sounds quite complex and like it might be quite a lot of work to learn how to put all of that together. Sorry, I didn't quite follow what the advantages would be of using a 4-tier architecture, over a simpler 3-tier one. Could you please clarify? In terms of the communication protocol, I think I've narrowed it down to some sort of socket (either websocket or TCP). This is because I want my game to have a turn timer, which the server would pause, if one of the clients got disconnected. So, because of that, I think I will need to have the persistent connection of a socket (as opposed to HTTP requests), so that the server can be aware of when a connection has been lost. Does that make sense? So, in terms of whether it should be a websocket or TCP, the other thing is that I want the server to be able to connect to different types of clients. One might be browser-based, but others might not. Would either websockets or TCP sockets be better-suited for that? I assume that a websocket could be implemented in a client that is not necessarily browser-based? Otherwise, perhaps I could make my server able to handle both types of sockets, depending on the type of client that is trying to connect? At this point, I think I'm leaning towards writing my own server, with just the functionality that I need.
  10. This is linked to another question that I asked here a couple of days ago: I'm looking at making a client-server game with a game server programmed in Java. The game will be a 2D turn-based game (like a board game), with a maximum of around 50-100 games going on at any one time. So, the performance requirements are not very high. The reason I would like to use Java for the server are because I already have some familiarity with it and I would like the server to not be tied to one particular platform. I would also like to design it so that the client interface to the server is as generic as possible, so that the same server could be used with multiple different clients. For example, there might be a web-based client, or someone else might design a stand-alone 3D client application later on, using the same server. So, I am looking for some advice on where to start with this, as I have very little experience with coding servers. I was planning to use web sockets for the client-server connection, which apparently uses Java EE (Enterprise Edition), which seems to require the use of the GlassFish server. However, I have been advised that a fully-fledged application server, like GlassFish, may be overkill for a game server. So, here are my questions: Should I use something like GlassFish? Does it makes sense for the type of game server I am describing? If not, then what sort of networking protocol/library would experienced Java game designers recommend? Are there any existing, general-purpose Java game servers that exist, which I might be able to use as a starting point? (Or even free software/open-source client-server games?) Or, should I look at coding my own game server from scratch? In which case, again, what sort of connection type/library would be recommended? Does anyone know of any suitable introductory tutorials that deal with how to make this sort of game server in Java? I guess my priority is probably minimizing the learning curve and the amount of time/effort involved, over performance. How much effort is this sort of undertaking going to require? Thanks in advance! :-)
  11. @King Mir: Ok, thank you for your comments. Re. Question 1: Sorry, when you say "choose a networking library", what do you mean by that? Do you mean the networking protocol? Re. Question 2: I think the persistent connection seems more appealing and is closer to what I had in mind. I have read that it can be achieved using 'web sockets', although I don't yet know much about how they work. Yes, I will have to code in some way that the system can deal with disconnections and allow a game to be resumed after a client reconnects. Re. Question 3: Ok, thanks. Yes, I think it would probably be best if we start with images at a fairly high resolution, and scale them down if necessary for smaller screens. @Satharis: Ok, thanks again. It seems like the non-threaded server process is the way to go
  12. Hi Satharis, thanks very much for your reply. Your comments about the server are very interesting and I'm sure it will save me some work, if I don't have to get into multi-threading. So, for a non-threaded process, basically each 'game' that is running could be a separate instance of a game object class, and the server process would manage which client communications are going to which? Thanks also for the advice about 2D images. Although, if anyone has any specific experience with making scalable web games, I would greatly appreciate any tips they have.
  13. Hi, this is my first post on here :-) So, I've been discussing with a friend of mine about making a client-server web-based game, and I'm looking for some advice. The game would be a fairly simple 2D turn-based game, similar to a board game, which two people would play through the website. Here are my specific questions: I know this is fairly broad, but is there any recommended language for coding the server part? I've read that it could probably be just about anything, but I was thinking of using Java, so it could easily be run on either a Windows or Linux machine. Would that make sense? What is the best way of allowing the server to handle multiple games being played at the same time? I was initially thinking of having one central server process, which could 'spawn' a separate 'game server' process for each game on demand. But maybe that is unnecessary? Would it be easier to create multiple threads (for each game) in the same server process? We don't anticipate many more than about 30-40 games going on at once. For the web client, ideally we want to allow the playing 'board' graphic to be scalable, so it can be scaled automatically to fit any window/screen size (tablets, etc.). What is the best way to handle that? Can it easily be done with raster graphics, or is it better to use 100% vector? I have heard that the HTML5 Canvas might have some useful functionality - would anyone recommend using it? As you can probably tell, I don't have much experience of writing client-server applications. If anyone can point me to any good online articles that might help, it would be much appreciated! :-)
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!