Java-Gaming.org Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (524)
Games in Android Showcase (127)
games submitted by our members
Games in WIP (592)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1] 2
  ignore  |  Print  
  Java in consideration for MMORPG  (Read 8725 times)
0 Members and 1 Guest are viewing this topic.
Offline devikta

Innocent Bystander




Java games rock!


« Posted 2005-03-19 02:00:10 »

There is a group of us that have been sitting on a concept for the last couple of years that we're finally starting to flesh and design.  Of course, we all feel that what we're proposing to create will re-shape MMORPG gameplay as we know it today.  

We're wanting to develop a system that would compete with the biggest MMORPGs on the market today: Dark Age of Camelot, EverQuest II, City of Heroes.  

The question is: could we use, and rely on,  java technologies to write such a graphical and bandwith intensive game?   I've been reading through the other posts and what I've gathered is that this new gaming architecture supplied by Sun is mostly being used for mid-scaled games (1st person shooters, single player, and classic models).

I would love to be able to Java, but I'm worried about performance issues.

All of you input is greatly appreciated.
Offline princec

« JGO Spiffy Duke »


Medals: 422
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #1 - Posted 2005-03-19 07:27:18 »

There are no performance issues if you know what you're doing. You should be reasonably confident of being able to write Halflife 2 or Doom 3 in Java these days.

Cas Smiley

Offline Vorax

Senior Devvie


Projects: 1


System shutting down in 5..4..3...


« Reply #2 - Posted 2005-03-19 13:57:23 »

I agree with Cas that the biggest bottle neck in Java is not Java, but the use of it.  That pretty much goes for any language.

For high-end graphics, like C/C++ most of it is done on the graphics card anyways.

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

Senior Newbie




Java games rock!


« Reply #3 - Posted 2005-04-04 19:26:11 »

I am pretty new to Java but I think I can offer some advice.

Yes it is possible, but keep in mind that writing something like EverQuest II in java will be a huge jump from what currently exists.

From my understanding (I have never played DAoC but I was over at a friends house and watched him play for what seemed like 3 hours) DAoC has graphics similar to EQ1?

If I am right, then I think you should first try to develop somthing like DAoC or EQ (graphics wise, you don't have to copy the gameplay obviously) that can play on can play on a system with low requirements. EQ in its intial release ran perfectly on my 256 mb computer with a 32mb graphics cards. I think writing a graphics engine that has EQ (or a similar game) like graphics in Java that can run on a computer with 256 mb and a 32mb graphics card should be your first step.

Right now there are Java games out there with graphics like that, but they require more powerful systems to run on than would the same game if programmed in C/C++. Before you go about developing graphics like those in EQII, first try to make EQ1 graphics that can run on the recomended requirements for EQ1 in its initial release.

Sun is working on making Java better for game programming, and communities like these certainly give them an incentive. I think eventually Java will catch up to C/C++ but it will surpass it because Java is much easier to use and quicker to write with.
Offline kevglass

« JGO Spiffy Duke »


Medals: 208
Projects: 24
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #4 - Posted 2005-04-04 21:10:25 »

Games like EQ2 use DirectX/OpenGL, and as such most of the work is done by offloading it to the specific card.. the extra overhead from using Java to interface to this native layer is pretty minimal..

Thats not to say your not right, Java does need more powerful hardward to perform in the same way but thats not really to do with graphics.

Kev

PS. Incidently, DAoC is under constant develpment including new graphics engines as new hardware emerges.

Offline aNt

Senior Devvie




AFK


« Reply #5 - Posted 2005-04-07 10:05:58 »

yes it can be done.. think about your networking and
sound... the 3d is pritty much in the bag...

networking; its more of a case of what direction
you want to go in.. theres a few people here that can
help with options. java is v.good a networking..

sound; give me a second- just need to make the
website- we have gone with the same engine as
World of Warcraft (FMOD). and have made a very nice
java like api of FMOD coming soon as i get a second.

3d: xith3d or jme- they both have there pros and cons.
but its all rocking. if u want to do your own graph then
theres jogl and lwjgl.
Offline Jeff

JGO Coder




Got any cats?


« Reply #6 - Posted 2005-04-17 05:27:05 »

If you knwio what youa re doing, then modern J2SE VMs can deliver the same performance over-all as C/C++

There are techniques that are faster in C then in Java, and techniques that are faster in Java then C.  It jus t a questio nof knowing the strengths of your coding environment and coding to them.

Garbage colelction used to be something yo uhad to eb careful of but, frankly, I am not seeing it as a problem in any code Ive written since late JDK1.4/JDK1.5.  With justa slight repidation Im going to sugegst that that nut has finally been cracked  by the VM teams.

Java does tend to require a bit more memory still, but in these days of games that require 1 gig (Matrix Online) its getting to pretty much be noise level.

The really amazing thing about Java is the time it saves you in Q&A and the srength of the prosduct released.  We colelcetd so mstistics from develoerps a few years abck and crunched them and found that the average Java game team spent less then 5% of their total productio time in Q&A.  COmapre that with C code...

Secondarily, with a small bit of tuning/debugging work, its more or less portable to the mac and Linux which is a nice little plus.  OTOH it is nto yet portal to the game concsoles, which IS an issue for some game developers that  those of us in the Game Technolgoies Grou pat Su nare (painfully) aware of.

Now the formula changes when you go down to J2ME and cell phones.  If you want the state of that space, let me knwoa s its a whoel other discussion.

Java is also a good language for server development.  The GTG's Sun Game Server project is more or less pure Java.  However again there are tricks to getting the best server performance our of Java.  Big oens are that you want to use NIO's sockets, for which there is soem learnign curve, and NIO Buffers to implement a copy-free stack.



Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Jannick

Senior Newbie




Java games rock!


« Reply #7 - Posted 2005-05-26 13:43:20 »

Any chance you can explain what you mean by a copy-free stack? Am I correct in guessing that it means that you dont parse game commands/packets out of the buffers and create object of them, but instead let your logic work directly on the buffer?

Thanks
Offline Jeff

JGO Coder




Got any cats?


« Reply #8 - Posted 2005-06-02 20:11:27 »

Any chance you can explain what you mean by a copy-free stack? Am I correct in guessing that it means that you dont parse game commands/packets out of the buffers and create object of them, but instead let your logic work directly on the buffer?

Thanks

Yes but it goes a bit further.

Any sufficiently compelx and well archietcetd server system is going to have multiple wrapped protocol layers in the game packets.   The trick is to do all you un-wrapping and parsing so that you never have to copy the data.  The same is true for data you send.  NIO Buffers have the facilities to let you do this.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline aNt

Senior Devvie




AFK


« Reply #9 - Posted 2005-06-16 07:36:46 »

how do u do that then Jeff? Smiley
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Jeff

JGO Coder




Got any cats?


« Reply #10 - Posted 2005-06-27 00:05:19 »

There are two key things buffers do that help you here:

The first is the slice() method.  The slice() method makes a new buffer that is a subset of the old buffer and shares its data.  So when you are parsing nested protocols you can read the ehader of the outermost layer, slice to get a new buffer that starts at the next-in header, and pass that to the next layer of code.

If your headers are fixed though you cna actually use something called "scatter loading" which allows you to take onebit stream and read it into a set of buffers  in one op.  This can automatically sep4rate thinsg for you.

Similarly, and important to the exampel I gave above, there is a "scatter send." So rather then having to wrap the exisiting data in a new buffer in order to add a heaer at the front, you cna just inster that header  in the front of a list of packets and then ask NIO to send the entire list as one packet.

Look at the NIO docs for Buffers and SocketChannel for more info.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #11 - Posted 2005-06-27 14:49:52 »

There are two key things buffers do that help you here:

Sometimes it feels like I'm the only person on the planet who actually uses scattering, so a warning:

Quote
If your headers are fixed though you cna actually use something called "scatter loading" which allows you to take onebit stream and read it into a set of buffers  in one op.  This can automatically sep4rate thinsg for you.

Doesn't really work on Sun's JVM's. Haven't retested on java 5 yet, but java 1.4.x scattering/gathering is the slowest op you can do - you can go via the CPU with a manual scatter/gather faster in all cases (and exponentially faster in increasing number of scatter/gather targets) with your own software implementation.

So, the message is: never trust Sun's NIO implementation Tongue. Always be careful to benchmark, because repeatedly these things that "should be" faster aren't, and 99.9% of people on the net talking about them have never used them (have a look at the docs and what they say about indefinite blocking, then look at what Sun's own code does!). No, really - I've caught several people out who like to teach others about them but don't publically admit they've never tried them themselves. Gah.

Quote
Similarly, and important to the exampel I gave above, there is a "scatter send." So rather then having to wrap the exisiting data in a new buffer in order to add a heaer at the front, you cna just inster that header  in the front of a list of packets and then ask NIO to send the entire list as one packet.

Somewhere in the networking forums here from around a year ago is a thread with source for a test program to demonstrate how slow Sun's impl is - although there may well be a bug or two in that copy.

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

JGO Coder




Got any cats?


« Reply #12 - Posted 2005-06-28 03:58:50 »

**shrug**

Ive used them a bit and they've worked fine for me.
As for speed ive neve really run into the need to tune that part of the code so I really can't say one way or the other.

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #13 - Posted 2005-06-28 08:05:16 »

Ive used them a bit and they've worked fine for me.

Yeah, I'm sure you have - but there are others I *know* have/had not.

Quote
As for speed ive neve really run into the need to tune that part of the code so I really can't say one way or the other.

A factor of 10,000 times slower than a manual software implementation ought to give you pause for thought Smiley

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

JGO Coder




Got any cats?


« Reply #14 - Posted 2005-06-29 06:15:15 »

Ive used them a bit and they've worked fine for me.

Yeah, I'm sure you have - but there are others I *know* have/had not.

Quote
As for speed ive neve really run into the need to tune that part of the code so I really can't say one way or the other.

A factor of 10,000 times slower than a manual software implementation ought to give you pause for thought Smiley

If its not a problem, then its not a problem.  Tune what matters. The rest is a waste of your time.

Still Id love to see your numbers and test backing this up as it makes very little sense to me and, if true, sounds like a major bug that shoudl be reported....

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #15 - Posted 2005-06-29 08:52:29 »

Still Id love to see your numbers and test backing this up as it makes very little sense to me and, if true, sounds like a major bug that shoudl be reported....

I already told you where you could find sample code and examples of test runs.

And yes, I did report this as a bug with Sun circa 12-18 months ago - but IIRC no-one @ sun picked it up (apologies if this is wrong, and they fixed it and told me it had been fixed Wink - I log quite a lot of java bugs, and the (currently) often very slow response times (didn't used to be like this Sad) mean these days I often lose track of which bugs have been responded to and which have been ignored)

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

JGO Coder




Got any cats?


« Reply #16 - Posted 2005-06-30 07:05:12 »

"Somewhere in the networking forums here from around a year ago is a thread with source for a test program to demonstrate how slow Sun's impl is.."

Is not an answer.  I am not going to searching through a year's worth of forums to find the proof of your assertion for you.

If you want it taken seriously you need to provide the test case.  if you bug reported it, a BR number will suffice.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #17 - Posted 2005-06-30 08:03:00 »

Is not an answer.

Um, Dude, I really don't care if you read it or not! Smiley It was an FYI - you said you didn't believe it, I pointed you in a direction you could check for yourself. I've warned the OP about the problem (and any other readers), and that's all I wanted to do.

Quote
If you want it taken seriously you need to provide the test case.

Well, if you want to be taken seriously maybe you should use search/google more often? Tongue

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

« JGO Spiffy Duke »


Medals: 422
Projects: 3
Exp: 16 years


Eh? Who? What? ... Me?


« Reply #18 - Posted 2005-06-30 09:07:00 »

Nuff flames and bait please. Whinging should be banned on this forum. If there's a problem and it's being whinged about but no-one's submitted an RFE and BR for it, go do that instead of moaning.

Cas Smiley

Offline Mark Thornton

Senior Devvie





« Reply #19 - Posted 2005-06-30 15:36:29 »

There are two key things buffers do that help you here:

The first is the slice() method.  The slice() method makes a new buffer that is a subset of the old buffer and shares its data.  So when you are parsing nested protocols you can read the ehader of the outermost layer, slice to get a new buffer that starts at the next-in header, and pass that to the next layer of code.

I guess you always use big endian byte ordering, as otherwise bugs like 4715166 are intensely irritating.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715166
Offline Jeff

JGO Coder




Got any cats?


« Reply #20 - Posted 2005-07-13 06:36:51 »

There are two key things buffers do that help you here:

The first is the slice() method.  The slice() method makes a new buffer that is a subset of the old buffer and shares its data.  So when you are parsing nested protocols you can read the ehader of the outermost layer, slice to get a new buffer that starts at the next-in header, and pass that to the next layer of code.

I guess you always use big endian byte ordering, as otherwise bugs like 4715166 are intensely irritating.

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4715166

Nope.

I just do an endianess set on the slice after slicing.

No big deal. It WAS annoying the first time I ran into it but once I knew that thebehavior was there it was childs play to fix.

Here's a workaround that always works:

1  
2  
ByteBuffer buff2 = buff1.slice(....);
buff2.order(buff1.order());

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline Mark Thornton

Senior Devvie





« Reply #21 - Posted 2005-07-13 08:17:45 »

Here's a workaround that always works:

1  
2  
ByteBuffer buff2 = buff1.slice(....);
buff2.order(buff1.order());

Except, of course, when you forget. It makes the use of little endian byte ordering horribly bug prone.
Offline Jeff

JGO Coder




Got any cats?


« Reply #22 - Posted 2005-07-14 05:07:16 »

Here's a workaround that always works:

1  
2  
ByteBuffer buff2 = buff1.slice(....);
buff2.order(buff1.order());

Except, of course, when you forget. It makes the use of little endian byte ordering horribly bug prone.

Hey, Im not defending the bug.  You shoulda seen the riot act I read a few folks at Sun when I stumbled into it.

But least, ocne you know it exists, its manageable and in a way that is garuanteed not to hurt you when the bug does get fixed Smiley

Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline OverKill

Junior Devvie




Java games rock!


« Reply #23 - Posted 2005-08-05 14:15:07 »

There is a Lineage 2 freeshard server software written in java out there.

Since I am not sure about the legal implications I will not provide a link unless blah says it is ok.
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #24 - Posted 2005-08-05 18:32:58 »

Since I am not sure about the legal implications I will not provide a link unless blah says it is ok.

Should be fine, so long as it isn't distributing other peoples copyright (e.g. so long as it doesnt have the entire lineage client + graphics + sound files available for download!). We can always remove it later if it turns out to be a problem.

Some MMOG's legal depts try to threaten people who run shards, but I'm not convinced of any illegality invovled; the only law they're really breaking is that of trademark, if they "pass off" themselves as the official servers. Short of that, its nearly always legal, despite what Sony et al would like you to believe. Sigh. Fscking lawyers Angry

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

JGO Coder




Got any cats?


« Reply #25 - Posted 2005-08-06 00:10:16 »

Since I am not sure about the legal implications I will not provide a link unless blah says it is ok.

Should be fine, so long as it isn't distributing other peoples copyright (e.g. so long as it doesnt have the entire lineage client + graphics + sound files available for download!). We can always remove it later if it turns out to be a problem.

Some MMOG's legal depts try to threaten people who run shards, but I'm not convinced of any illegality invovled; the only law they're really breaking is that of trademark, if they "pass off" themselves as the official servers. Short of that, its nearly always legal, despite what Sony et al would like you to believe. Sigh. Fscking lawyers Angry

Speaking of which you better make it clear that you are NOT a lawyer or speaking as one.  At least in the US it is distinctly illegal for non-lawyers to give legal advice.  Never mind the moral implications of someone following non-expert opinion.

A legal theory that has been advanced here in the US is that the organization of a packet constitutes an "organization of information" protectable under copyright.  So you MAY violate copyright just by copying the packets.

But again I am not a lawyer and this does not consitute legal advice.  If you need legal advice in the US I suggest you call your local bar association and get a referral to a qualified attorney.


Got a question about Java and game programming?  Just new to the Java Game Development Community?  Try my FAQ.  Its likely you'll learn something!

http://wiki.java.net/bin/view/Games/JeffFAQ
Offline anarchotron

Junior Devvie




...precious bodily fluids.


« Reply #26 - Posted 2005-08-06 02:15:37 »

Overkill, speaking legally, there is also a piece of law which supercedes all other law in the U.S., which states:

"Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the government for a redress of grievances. "

Which guarantees that it cannot be illegal for you to link to, or describe, the Lineage 2 freeshard server software that you mentioned.

I am not a lawyer and I am not giving legal advice, but if you can read the plain English above then you don't need a lawyer Smiley

BTW. illegal 'laws' are frequently enforced in the US so your mileage may vary. Wink  *Cough* DMCA *Cough*
Offline blahblahblahh

JGO Coder


Medals: 1


http://t-machine.org


« Reply #27 - Posted 2005-08-06 13:15:21 »

Speaking of which you better make it clear that you are NOT a lawyer or speaking as one.  At least in the US it is distinctly illegal for non-lawyers to give legal advice.  Never mind the moral implications of someone following non-expert opinion.

Shrug. Thanks for the warning but I'm confident it's irrelevant here. They have a hard enough time in the US taking people to court for deliberate uncontested attempts to manipulate stock prices by giving out fake legal advice whilst passing-off as a legal firm; sueing for voicing an opinion in an anonymous online forum with people you don't even know exist let alone have ever met? I doubt it. The law enshrines and assumes various things, including to an extent the opportunity to take corrective action when in error.

Moral implications? Given that in each case someone's lawyer has to lose - i.e. statistically speaking your lawyer only has a 50% probability of knowing what they're talking about, despite the piece of paper on the wall? Ha.

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

Junior Devvie




Java games rock!


« Reply #28 - Posted 2005-08-08 06:31:22 »

here is the project home:


and here is a description on how to get the code:


**ALL, sinice I don't know the legality of this code, I have removed the links.  I know you can find these if you really want to but please, if there is any question as to the legality of what you are posting, err on the side of caution and don't. Smiley

Thanks

-ChrisM
Offline OverKill

Junior Devvie




Java games rock!


« Reply #29 - Posted 2005-08-10 07:11:08 »

@all:
Has anyone looked at the source?
If so what grade would you give it for 'source code quality'?
(i.e. good oop, comments, structure)
Since I like to learn from examples it would really help to know.
thanks!
Pages: [1] 2
  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.

toopeicgaming1999 (57 views)
2014-11-26 15:22:04

toopeicgaming1999 (51 views)
2014-11-26 15:20:36

toopeicgaming1999 (10 views)
2014-11-26 15:20:08

SHC (24 views)
2014-11-25 12:00:59

SHC (24 views)
2014-11-25 11:53:45

Norakomi (27 views)
2014-11-25 11:26:43

Gibbo3771 (24 views)
2014-11-24 19:59:16

trollwarrior1 (37 views)
2014-11-22 12:13:56

xFryIx (75 views)
2014-11-13 12:34:49

digdugdiggy (52 views)
2014-11-12 21:11:50
Understanding relations between setOrigin, setScale and setPosition in libGdx
by mbabuskov
2014-10-09 22:35:00

Definite guide to supporting multiple device resolutions on Android (2014)
by mbabuskov
2014-10-02 22:36:02

List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06
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!