Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  Jenn - Java Easy Nio Network  (Read 1679 times)
0 Members and 1 Guest are viewing this topic.
Offline Chman

Junior Member




Nothing more that... Java games are cool !


« Posted 2004-11-15 23:13:23 »

Ok, I'm posting this topic in this category because it seems that we can't post into the Project Proposal without sending an email to the admin...

So here it is.

I've started to make a little project named Jenn (Java Easy Nio Network). Its aim is to make network development easier for people who don't want to bother with java networking classes. I know that some similar projects already exists but none of them are really easy to use. There will be two main classes. Here is a little sheme of those classes (no details, only main methods, I've hidden other methods) :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
public abstract class SBServer
{
     /* Init the server (declinned in three methods). */
     public boolean init();

     /* Start the server. */
     public void start();

     /* What to do on new client connection accepted ? */
     public abstract void onAccept();

     /* What to do when a message is received from a client ? */
     public abstract void onReceive();

     /* Send a message to a client. */
     public void send();
}

So this was an overview of the server architecture. As you can see, users will only have to extend onAccept() and onReceive() methods and everything is done for the server ! Note : I've remove the parameters in all methods...

Now, the client :

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
public abstract class SBClient
{
     /* Connect to a server. */
     public boolean connect();

     /* What to do when a message is received from the server ? */
     public abstract void onReceive();

     /* Send a message to the server. */
     public void send();
}

Et voilĂ ...
The thing will make extensive use of Nio to maximize performances and to make the server non-blocking. Data tranfert will be made in byte, I intend to add compression when the whole lib will be fonctionnal,  MySQL support (once again, designed to be very easy to use for the user), and network security.

If you've got some time, tell me if this project interest you or if you think it's a good idea or not (if not, please explain why Smiley).

Comments are welcome !

Chman
Offline princec

JGO Kernel


Medals: 339
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2004-11-16 09:34:29 »

All I want is the Quake3 UDP networking code, ported to Java, using NIO Smiley

Cas Smiley

Offline Chman

Junior Member




Nothing more that... Java games are cool !


« Reply #2 - Posted 2004-11-16 11:22:00 »

For the moment I'm only using TCP/IP, but I think I could make an UDP version... The init() method from the server would be separate into two methods called initTPC() and initUDP(), and the client connect() could be connectTCP() and connectUDP()...

Why do you want UDP ? From what I've seen, UDP can lose data during the transfert, so TCP is a better way to design network (well, it's what I think)... Tell me if I'm wrong, but I don't see any advantages in using UDP :-/...

Chman
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #3 - Posted 2004-11-16 11:36:23 »

Quote

Why do you want UDP ? From what I've seen, UDP can lose data during the transfert, so TCP is a better way to design network (well, it's what I think)... Tell me if I'm wrong, but I don't see any advantages in using UDP :-/...

Chman


/me boggles...

If you're going to propose a project on this forum to do with networking, why don't you visit the networking topic?

If you're there, why don't you read the massive great big thread on "UDP vs TCP"? (hint: it's FIRST ON THE PAGE!)

One would think this was required reading, ESPECIALLY if you don't see the point of it (yet)...

malloc will be first against the wall when the revolution comes...
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #4 - Posted 2004-11-16 11:39:13 »

Quote
All I want is the Quake3 UDP networking code, ported to Java, using NIO Smiley

Cas Smiley


Tentatively (no promises) I'll be doing something similar whilst writing my book, and releasing it as an open-source java gaming network library when the book is released.

Its almost certain that I'll release a usable java-NIO RDP clone, but the rest (including making an actual SF.net project, and going as far as adding Q3 delta-compression) depends upon time.

And you're not likely to see anything for 6 months Sad.

malloc will be first against the wall when the revolution comes...
Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

pw (12 views)
2014-07-24 01:59:36

Riven (10 views)
2014-07-23 21:16:32

Riven (11 views)
2014-07-23 21:07:15

Riven (12 views)
2014-07-23 20:56:16

ctomni231 (43 views)
2014-07-18 06:55:21

Zero Volt (38 views)
2014-07-17 23:47:54

danieldean (32 views)
2014-07-17 23:41:23

MustardPeter (34 views)
2014-07-16 23:30:00

Cero (50 views)
2014-07-16 00:42:17

Riven (50 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!