Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (756)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (842)
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]
1  Game Development / Networking & Multiplayer / Re: Multithreaded or SelectNow? on: 2006-06-06 07:55:34
I think it works if all threads read/write commands queues in a synchronized environment, as you suggest.
If I understood your approach basically you have a server thread that pool all active clients queue, process each command, and send a response throw client connection.
The only thing to take care in such solution is to synchronize queues (both clients and server), well... it not soo difficult, but debugging can be a nightmare if something do not work as expected (there are something wrong in client threads? in server thread? in queues synchronization?).
When I developed a mud server I choose to do it in a different way.
Each player is an object that "speak" with the clinet throw a connection (so one player one thread as in your solution, but only for I/O), a player receive a command string and pass the command to a command manager with a reference to itself. No queue in the "client side", only a command queue in the "server side" (server thread).
When the command manager receive this instruction process it and, if there are some feedback for player, use the payer reference to perform back comunications.
It's a quite similar approach, but I have only one command queue and I don't have a thread that "pool" each active connection; my server thread waits command from players and process it in a First In First Out way.
I don't know if this is the "best way to do this"(TM), just an idea.
I think develop a mud environment is an interesting exercise, there are a lot of possibilities to do the same things  Grin

Have a good job  Wink
2  Game Development / Networking & Multiplayer / Re: networking libraries on: 2006-01-20 12:24:48
MINA is cool! It uses NIO as underlaying protocol. Seems pretty fast, though I didn't
do a speed test.

I also use MINA in some little project.
It's an interesting library if you would like to build a custom protocol layer over TCP/IP.
Actually I can say it have some limits due to the fact that isn't so stable; documentations isn't clear (sometimes is simply too old) and there isn't a "state framework" that help to build a statefull client/server interaction (not a problem if you don't need it... and nothing soo difficult to write).
Do not seems to have speed issue (of course, I use it only in little environments).
I think is a good idea to take a look about it.
3  Game Development / Newbie & Debugging Questions / Re: how to expand a .jar file on: 2006-01-19 08:23:08
Try  with jar -xvf some_file.jar
4  Game Development / Newbie & Debugging Questions / Re: KeyListener probs, noo not another one on: 2005-10-25 09:23:37
Maybe you have to call  getVel() in your keyPressed method.

In your code when you press a key  (e.g. up key) you set  upkey to true, but nobody know that happend; on release you set it to false, and again nobody "see" this change.  Wink
5  Game Development / Networking & Multiplayer / Re: Forcing J2EE Servlets to be single-threaded? on: 2005-08-01 07:59:14
I don't know what exactly you want to do in your servlet; I think you use it like a door for some kind of service call.
So, if this is your environment, maybe you can use a service locator.
You may use Spring like service locator in your web app (service class is singleton by default in Spring).
Your servlets get the service instance from Spring, and it serve to you a shared instance.
It is not important that your servlet is a singleton instance, isn't his nature; move logic in external class, outside the J2EE behavior, and maybe you get the point.
Pages: [1]
DesertCoockie (54 views)
2018-05-13 18:23:11

nelsongames (86 views)
2018-04-24 18:15:36

nelsongames (76 views)
2018-04-24 18:14:32

ivj94 (761 views)
2018-03-24 14:47:39

ivj94 (93 views)
2018-03-24 14:46:31

ivj94 (645 views)
2018-03-24 14:43:53

Solater (106 views)
2018-03-17 05:04:08

nelsongames (187 views)
2018-03-05 17:56:34

Gornova (428 views)
2018-03-02 22:15:33

buddyBro (1088 views)
2018-02-28 16:59:18
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!