Java-Gaming.org    
Featured games (78)
games approved by the League of Dukes
Games in Showcase (429)
Games in Android Showcase (89)
games submitted by our members
Games in WIP (468)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2
1  Game Development / Networking & Multiplayer / Re: RMI or Sockets for networked game on: 2012-07-02 17:19:14
In addition to the quite excellent reasons already enumerated, by using RMI you pretty much limit yourself to a Java client for your game which may or may not be a problem for you.  I generally avoid using RMI at all costs for any purpose Smiley
2  Game Development / Networking & Multiplayer / Re: Database for gameserver on: 2012-06-18 18:27:09
We are actually giving a talk at http://qconnewyork.com/ QCon tomorrow on java persistence and multiplayer gaming.  I'm not yet sure if there will be a live stream of the talk, but I can try to provide the info if anyone is interested.




3  Game Development / Networking & Multiplayer / Re: Database for gameserver on: 2012-06-04 17:50:36
FWIW, we use a combination of SQL and NoSQL databases to handle persistence.  Most of the game content and player data is stored in relational databases, and we put stuff like event data in NoSQL.  It is sort of difficult to make a recommendation without a lot more detail.  With either solution, the big challenges mostly lie in caching, and how you handle growing beyond a single database.


4  Game Development / Networking & Multiplayer / Re: Game server general questions on: 2012-05-29 05:35:03
but looking through his post history shows that he's a developer or at least affiliated with the company.
Just look at his profile, where he states his website to be www.electrotank.com


Full disclosure: I'm one of the developers Smiley
IMHO, his shameless plugs are borderline acceptable. I'll leave it at that.

Upon further research, it seemed that 4 out of 4 of his posts in 2012 were plugs to his product. The links have been removed, as JGO will not be abused as a platform to spam. Other than that, the posts are not modified.

Riven,

I have no issue with removal of any links.  I have no interest in traffic, links or anything of that nature.  My interest and passion is multiplayer gaming and Java.  I think a review of my entire posting history on JGO  ( instead of last 4 posts ) would make that abundantly clear. 




5  Game Development / Networking & Multiplayer / Re: Game server general questions on: 2012-05-29 05:29:31

3) You could use Tomcat, but for realtime games, I would recommend something like Electroserver 5 http://electrotank.com which is really designed for making multiplayer games and has support for a variety of client platforms, including Java.


Thanks for the advice, but it would be nice if you disclosed your conflict of interest with electrotank.  Especially when consulting a beginner.  Sad

intothedeepblue,


I just wanted to take a minute to apologize personally if it was in any way unclear that I am one of the developers of Electroserver.  It certainly was not my intention to obscure that.  I generally explicitly mention that if I mention our product but alas, this time i seem to have forgotten to include it.  I believe that information was also available in my profile, but I am not 100% sure there.

In any case, the only reason I mentioned it was because you mentioned Tomcat.  Tomcat is excellent software which I use extensively, but HTTP based servers are generally not the best choice for realtime games.  I am of course making an assumption that you are interested in that type of game.  

Hope that helps!


Edit: removed abnormal amount of whitespace from end of post.
6  Game Development / Networking & Multiplayer / Re: Game server general questions on: 2012-05-26 05:18:01
Hi!  I was hoping to learn more about how game servers are chosen/implemented.  I understand how to write basic TCP/UDP server/client programs in java.  I'm more interested in how this would be applied in industry to make a functional server.

To make a server accepting clients (with the example of a game perhaps):

1. Do game developers buy/rent servers and simply upload a java program onto it?

2. Is a server for this type of application basically a regular computer just running a java program 24/7?

3. Would Apache Tomcat be used for something like this?  (Basically in my searches I have found things like Tomcat and I don't understand how they fit into the picture.  Does a server run Tomcat which enables you to run your java-server-program?)


1)  Depending on the project and the requirements we might use virtual or dedicated servers.  Some at work some examples might be Amazon EC2, Softlayer.  I have a personal VM on Chunkhost that works great as well.  

2) Yes.  You can probably get a long way during development just hosting on your own home machine if you want to save costs, but at some point you will end up needing dedicated hosting.

3) You could use Tomcat, but for realtime games, I would recommend something like Electroserver 5 which is really designed for making multiplayer games and has support for a variety of client platforms, including Java.

Moderator note: this member is a developer of the advised product.




7  Game Development / Networking & Multiplayer / Re: Resources for game networking on: 2012-05-04 20:52:47
Thanks for all the useful advices!
You might want to check out Electroserver 5.  Not open source, but it is free to use up to 50 concurrent users, and has a bunch of client API's including a Java client API.  In the docs there are quite a few client examples using Java, and the server code is Java, if needed.

Full disclosure: I'm one of the developers Smiley

I will have a look at it later. If I experience any problems - may I contact you?

Sure thing.  We also have user forums if you would prefer that option.
8  Game Development / Networking & Multiplayer / Re: Resources for game networking on: 2012-05-04 19:13:00
You might want to check out Electroserver 5. Not open source, but it is free to use up to 50 concurrent users, and has a bunch of client API's including a Java client API.  In the docs there are quite a few client examples using Java, and the server code is Java, if needed.

Full disclosure: I'm one of the developers Smiley
9  Game Development / Networking & Multiplayer / Re: Turn-based servers + hosting - recommendations / experiences? on: 2012-04-04 16:42:30
You should check out Electroserver 5. We don't currently offer this as SaaS, but as you may have found the problem with that type of offering is there are typically fairly tight restrictions on what you can do in their environment.  The good news is that you can easily use an EC2 or virtual machine that is fairly small as long as you don't need very high message rates and tons of concurrent users.  You can also develop with no cost upfront, so that is nice.

Without knowing all the details of your game, I couldn't say how much coverage would be there in terms of game mechanics, but the API is fairly rich and very easy to develop.

Let me know if you have any questions!

Edit: Full disclosure, I'm on the the devs at Electrotank Smiley






10  Game Development / Networking & Multiplayer / Re: BDB native library set for Linux host on: 2007-05-08 05:08:56
This is in the FAQ

http://www.java-gaming.org/forums/index.php?topic=16255.0
11  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-17 03:02:09
As a side note...  second life's back-end architecture is pretty sneered at by most of the MMO development community.

I'm not sure id take second life as an example of how to do anything, other then market.

Understood.  I brought it up mostly because they are able to seemingly shuffle in and out what must be a large amount of textures and models, albeit kinda slowly. 
12  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-17 02:59:14
'fraid i don't know a great deal about second life beyond how they organized their servers.

Some other folks around here might.

But is there actually any physics in second life?  Ive only played with it a little but from what I could see there were effectively two modes of motion-- ground rooted walking and free camera type flying. neither of which requires any real physics simulation.

I haven't used it very much either, but I remember kicking a ball down some steps or something like that.  I have not used it a great deal.
13  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-17 00:01:27
Now to take the Zone idea a step farther....

All you may need is to break things up by Zones, but its possible depending on zone size and density you may need sub-zones.

This starts to get tricky,


It seems like the sub-zone idea is critical for really allowing processing to be distributed evenly, and maybe the zone itself is important for things like keeping the terrain from becoming super-huge.   Without sub-zones you either have situations like a "zone rush" like people would do back in EQ where they would bring down a city zone by invading, or you have to place artificial caps on the number of players because of the fixed amount of processing available.  I guess the nasty part is when players find that one spot where they can move back and forth between sub-zones and exploit various issues on the boundaries.

OTOH, it is my understanding that going completely zoneless makes it harder to provide a lot of variety in things like available terrains and models.  I suppose to some extent you can handle this by loading and unloading things as needed.  Second Life seems to spend like 50% of the time loading and unloading textures and such while you are walking around, and even they appear to have hard zones at points, because occasionally when you port far enough you experience "Loading".

Do you know how SL handles physics?  I am curious how much of that happens server side.






14  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 23:48:35
In BHO I don't have to worry about it because each board is a sepreate 4 person game (think Bomberman.)

However you can certainly see a typical MUD room as a "Zone" (thats really where they came from.  MUD room + geometry == Zone.)  Each Zone can tick itself separately as  long as you don't have Zone interactions.  In point of fact, as an optimization a Zone doesn't have to tick at all if nothing active  is in it.

Typically your MMOs that use Zones break them up with zone-transfers.  This is also when they load the zone specific data on the client.


I agree.  Most of the Diku and derived muds used a Zone to define a collection of rooms, which could usually be brought up and down independently of each other.  You are either in Zone A or Zone B and you can't interact across the border.  I don't think I have ever played an MMO that I would consider truly zoneless.

There are surely a lot of advantages to zoning, and I think a lot of the reasons might be related to content, and managing the amount of textures and models one can have going at one time.





15  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 23:10:09
  Basically, the game processing happens on a per-board tick.  The boards thus don't interfere with each other and can be spread about the back-end.   The tricky part was dsiging the Hunter class which is my SessionListener.  I had to write it in such a way that updating the incoming player actions didnt conflitc with the game board processing "turns".  I went through 3 iterations til I found one that both performed well o the client and didn't create contention on the server.

I think that sounds roughly like the idea presented above to break the scene down into smaller pieces (or boards) and handle them separately.  Do you make any attempt to synchronize the tick between boards, or does each board proceed with it's own timer and assume that the other boards will do their own thing?  I would guess the tricky part is handing control from one board to another without creating interesting bugs.
16  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 23:02:00
As a general goal for a non strictly-newtonian game, think about sending full data on channels btw clients that can see each other, but send data on a lower resolution to the server.  There are a few ways to do this.  The simplest is just to send 1 out of every N  move packets to the server.  What we did in the ill fated BattleTrolls was to send movement packets when one of 2 conditions occurred:

(1) State change of movement (stop, start, turn)
(2) Every N units of rectilinear motion

If this is starting to sound a bit newtonian in language, well, were dealing with motion so its related.

We also angle limited the turn to only send the a turn every N degrees or when you stopped/started turning.

This gave us enough information to build motion line segments on the server to check for cheating v. our collision geometry.

That is interesting.  I had not considered the idea that using physics might actually simplify the simulation.  I was operating under the assumption that doing physics on the server side would gobble up all the CPU.




17  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 22:38:15
Don't.

No.

Don't

JME will have every node out of the data store at all times, that means you will end up with 1 server processing everything, which defeats the purpose of SGS. Having said that, my collision detection currently does the same thing, but I'm planning on spliting it so that one game area is multuple smaller sections.

Once you do that, you have to handle mutiple scene graphs, or do it all yourself. Multiple scene graphs would cause issues on boundry cases where the object origin is in one small area, but the whole object is not contained in that area, think quad tree division of an area.

HTH

Endolf

Hehe, yeah, I realize this is generally a bad idea but I'm mostly just trying to get something (even something that is very non-scalable) going as a starter.  Personally I was thinking along the lines of splitting up the simulation into smaller scenes and dealing with the boundary issues, which of course is a nasty bit.
18  Game Development / Networking & Multiplayer / Re: n00b Qs: Startup, shutdown, debugging, etc. on: 2007-04-16 22:29:41
Yep, that makes sense.  I looked back at the docs and it appears that I didn't read carefully enough the section where it said that the order the names were returned was based on the name encoding.  I think I assumed they were returned in some arbitrary order, or the order they were entered into the datamanager. 
19  Game Development / Networking & Multiplayer / Re: n00b Qs: Startup, shutdown, debugging, etc. on: 2007-04-16 20:55:50
I thought we had a way to start the lexigraphic search at a known name.

Let me look again...

It is entirely possible I completely missed it.  It would not be the first time Smiley
20  Game Development / Networking & Multiplayer / Re: n00b Qs: Startup, shutdown, debugging, etc. on: 2007-04-16 20:35:56
I was thinking it might be nice to add true namespace support to the DataManager API, so that it would be easier to search over the repository for a specific class of object.  What I mean is that now, I can define arbitrary namespaces as strings ( player.*, item.*), but my only mechanism to search a namespace is to iterate over the entire list of all bound managed objects with DataManager.nextBoundName(), and do string comparisons on the results.   For example, in my little chat simulation, I want to look for all the connected players for a "who" command.  Right now I iterate over all the bound managed objects looking for names that start with "player.", where it would be nicer to just iterate over a namespace that I already knew was just players.

Perhaps the addition of

DataManager.setBinding(Namespace namespace, String name, ManagedObject object)
DataManager.getBinding(Namespace namespace, String name, Class<T> type)
Datamanager.nextBoundName(Namespace name)

DataManager.getBinding(String name, Class<T> type)  could just default to the root namespace.


 I guess I was expecting something a little more like JNDI, except maybe not as complex as JNDI.  Did I just contradict myself? Smiley
21  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 20:24:42
Okay,

Sounds like a "click to move" type system which is definitely easier on the server but arguably a bit less "immersive" then driving controls.

Next question:  What kind of obstacles do you expect to have?  In other words, what blocks movement?

Just the static geometry of the environment? Moveable objects?  Other characters?

Relating to that, is character position going to be tile based or free-positioned?

Lastly, do you expect to try to do any physics modeling or is the only physicality of the world in its movement and
action blocking?

JK


I didn't intend to convey it was a click to move system.  It is just your standard First/3rd person/MMO style movement. The environment would consist of both static (terrain, things fixed to terrain) and dyamic (other players) objects.  Positioning would be free, not tile based.  Physics would be neat, but that is probably a bit too ambitious for my first round.

I am using jMonkey right now for the 3d portion, so my (completely theoretical untested) plan is to use the scenegraph from jME to render all the geometry information on the Darkstar side.

RE: Movement.  I kind of made the assumption that the only way to drive movement in this situation is with a movement state machine, where the client requests movement to begin movement with a specific vector, and the server tracks the state.  The client would then have to predict movement and accept position updates from the server.

22  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 19:30:22
Jeff,

The current code is essentially a MUD, but I am basically dumping the MUD-esque portion to convert it to 3d.  I was originally just going to convert it from room based to roomless, but I felt the various control options I came up with were rather, um, crappy Smiley 

I would say that in my case, the server is absolutely the final word regarding state, including spatial information.  Currently, clients can essentially request a state, which is tracked on the server. The options are MovementState or CommandState.  In the case of MovementState, clients can basically request to move in a direction or stop.    The client would only really be performing simulation by proxy.  They could request a movement state (move forward) and go ahead and start rolling, but periodic updates from the server would reposition them.

I would be worried about cheating, so the same story applies there.  Clients can request whatever they want (Give box to Jeff) but the server is the arbiter of the transaction (Is Jeff close enough to take the box, etc)


23  Game Development / Networking & Multiplayer / Re: Shardless... related on: 2007-04-16 18:37:36

Jeff,

Maybe if you had a little time you could throw in some thoughts you might have regarding distributing the simulation.  Personally I am still having a little trouble getting my head around the idea that the simulation can be driven by something other than what is essentially a "tick" (Yes I know the evil performance destroying tick!).

This weekend I started working on version 2 of my chat application, which is the 3D version.  So far what I have done is essentially convert the thread driven graphical simulation into a headless simulation that can be driven by an external event, like a tick.  The headless version keeps track of how much time has passed between updates and should update the simulation accordingly when it is time for something to happen. 

The most obvious thing to do at this point (at least for me) is to drive the simulation off a PeriodicTask that executes at a specific frequency.  For example lets say something like 500ms.   

So with this scenario I would have something like:

tick -> <update simulation geometry> -> <chew thru event queue> -> done.


With this approach it seems like (for example) that any time an object requests its position in the world the operation is relatively cheap because at any given time this value is calculated and known. By adding something like event queueing, I can allow the simulation to regulate the rate at which it consumes events generated by clients to make sure that all the processing can be handled inside of one tick.  By doing that, I can guarantee that the events for a given object are processed in order, but it seems that it would become more difficult to assure that globally events are processed in the order the arrive.  I wonder if that is important.........Hmmmmmm...... Smiley   

I guess an alternative is a more "quantum" approach where the simulation is only updated when something looks at it.

Perhaps something like:

Observer.lookAtSomething() -> <update simulation geometry> -> <chew thru event queue> -> done.

 The downside of this seems to be that basically any operation could be expensive because any given operation would require that the entire state of the simulation be re-calculated.  To combat that, I could somehow add a limiter which would only perform a re-calc if the previous calculation is more than X age, but in practice that seems like it would end up being no different than just updating the whole thing every X seconds.










24  Game Development / Networking & Multiplayer / Re: Chat updated to Flash/Ajax client on: 2007-04-06 17:41:33
Based on the suggestion of some of the users, I changed the command parsing to be a bit more intuitive. All commands are now prefixed with a ‘/’. To look around the room you would type /look. If you do not prefix your command with ‘/’, then whatever you type will be sent to your default command, which is /say. Of course, you can override this with the /defaultcommand command. The '#' prefix is still valid as the groovy interpreter binding.

The short version, typing will now default to chatting unless you do something special Smiley

25  Game Development / Networking & Multiplayer / Re: Chat updated to Flash/Ajax client on: 2007-04-05 21:27:55
Very interesting. I connected one time but just stayed blank on few other attempts I made.

when it doesn't work it fails with this (firefox, win2k)

Error: __flash__argumentsToXML is not defined
Source File: http://www.darkstarusers.com/client/lib/AFLAX/aflax.js
Line: 42

Why are two connections from the same computer not allowed? Is this technical limitation or a design decision?

I believe I fixed the timeout / not logging people out bug.  The multiple logins message is now more clear.  It allows as many connections as you want, you just have to select a username that isn't in use. 


26  Game Development / Networking & Multiplayer / Re: Chat updated to Flash/Ajax client on: 2007-04-05 18:28:19
Heh okay

I *would* like to see a real FLASH client someday.  Wuuld be a good community project *hint hint*

JK

I'll add it to the list Smiley
27  Game Development / Networking & Multiplayer / Re: Chat updated to Flash/Ajax client on: 2007-04-05 16:54:31
Out of curiosity... how are you doing the FLASH client since we haven't released a FLASH client API?

MuahahahahahahahahahahahahahahahahahhahaHAHhahahHahh!

Actually, I'm just using a socket from flash to basically tunnel over to a slightly tweaked version of the telnet client.

This is the general layout:

Telnet / Flash Client  -> Apache Mina on 4000/4001 -> SGS

Mina serves up a "shell" based on what port you connect on and the shell is what actually interacts with the real SGS Client. 

28  Game Development / Networking & Multiplayer / Re: Chat updated to Flash/Ajax client on: 2007-04-05 16:46:01
Very interesting. I connected one time but just stayed blank on few other attempts I made.

when it doesn't work it fails with this (firefox, win2k)

Error: __flash__argumentsToXML is not defined
Source File: http://www.darkstarusers.com/client/lib/AFLAX/aflax.js
Line: 42

Why are two connections from the same computer not allowed? Is this technical limitation or a design decision?


Not sure about the errors. Perhaps the message I gave is a bit ambiguous.  All the client is saying is that someone with that name is already logged in.  The second attempt actually boots the person out and then you can reconnect.  So, it isn't multiple connections that are the problem, just  multiple users with the same name.

It does appear that the new client might not be timing people out  and removing them after a reasonable period of time, so I might throw in a little fix for that.

29  Game Development / Networking & Multiplayer / Chat updated to Flash/Ajax client on: 2007-04-05 06:31:10
it seems that some people had problems with the Applet, so I updated it to use a Flash/Ajax based client for web use.  I used a  library called AFLAX to do the client, as it can handle persistent connections with flash.  Please stop by and check it out, especially if you had problems with the Applet version!


30  Game Development / Networking & Multiplayer / Re: Scripting example and demo on: 2007-04-03 21:40:36
I just thought I would throw out a little issue I "discovered" when trying to use the javax.scripting API.   By "discovered" I mean read the documentation Smiley  It does not appear possible to use Java security with the javax.scripting implementation, specifically when dealing with a script that is interpreted without being loaded from a particular location.

For example, with the native Groovy interface, you can do something like this:
1  
2  
3  
  String script="println('Hello World');";
  GroovyCodeSource src =  new GroovyCodeSource(script,"someScript", "/sandbox");
  new GroovyShell().parse(src);


Where "/sandbox" is a codebase you can configure via a java.security.policy like
1  
2  
3  
grant codeBase "file:/sandbox" {
  //don't grant anything!
};


With the javax.scripting API, there is no way to specify a codebase in which you would like a random script to executed.  This may or may not be a problem depending on who you want to have access to scripting of course.
Pages: [1] 2
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

theagentd (6 views)
2014-04-24 23:00:44

xsi3rr4x (83 views)
2014-04-15 18:08:23

BurntPizza (75 views)
2014-04-15 03:46:01

UprightPath (86 views)
2014-04-14 17:39:50

UprightPath (69 views)
2014-04-14 17:35:47

Porlus (86 views)
2014-04-14 15:48:38

tom_mai78101 (109 views)
2014-04-10 04:04:31

BurntPizza (169 views)
2014-04-08 23:06:04

tom_mai78101 (265 views)
2014-04-05 13:34:39

trollwarrior1 (216 views)
2014-04-04 12:06:45
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!