• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.

Archived

This topic is now archived and is closed to further replies.

kill

[java] Java game server

10 posts in this topic

Hi. I''m developing an online game. I am still in the process of making the decision which language the server will be written on. I like java for a number of reasons, however, I am concerned with speed. Here''s my question: If Quake III Arena server was written on java, would it still be realistic to play quake? Is it realistic to write a fast paced action game server on Java? If possible, please back up your replies by some data (any links, or recalls of what u''ve read will be very usefull). Thanx
0

Share this post


Link to post
Share on other sites
Hi Kill,

Good luck on your venture.

I think you''ll find that networking speed will be the least of your troubles (use DatagramSockets and some prediction algorithms). The question should really be "Are the Java graphics classes fast enough?" . The answer would then be NO by a long shot for Quake style or any 3D game. This has always been a niggling problem with the language as far as gamedev''s are
concerned. There is no support for decent hardware acceleration unless you would want to go proprietory (with COM) and utilise DirectX with Microsoft''s implementation of Java. If you are really serious about developing multi-player FPS games you should use Visual C++ instead and code using either the many 3D APIs available. It won''t be easy since I''m already struggling with DirectDraw alone. You could try the OpenGL support in Java but I doubt you''d get any speed on the average PC since I don''t think its accelerated.

This is all just a pity really since the Java language is so well designed and would cut down development time. I suppose you can''t have everything in life. If you want the big bucks you gotta work for it =)

At the moment I''m putting the finishing touches to a real-time multi-player graphical RPG (2D) and will be posting a link to it soonish. The java.net and ODBC classes have been a joy to work with. The only problem is that I have to work a little bit harder to solve various issues with graphics.

- iTCHY
0

Share this post


Link to post
Share on other sites
iTCHY, he''s not talking about the graphics, he''s talking about the networking server, like the dedicated server in Quake. It doesn''t need to do any kind of graphics ( aside from perhaps some management/monitoring ).

I think you could get away with doing it in java, as long as you don''t need too much performance. Java isn''t too fast, but if done right not too slow either.


#pragma DWIM // Do What I Mean!
~ Mad Keith ~
**I use Software Mode**
0

Share this post


Link to post
Share on other sites
Actually Java is faster(in some parts) than C++ in things without graphics... If you count in all ready made networking functions I would really recommed it. You can correct me if I''m too wrong, but I have gotten view from somewhere that Java is really partly faster than C++ when you don''t have ANYTHING to do with graphical viewing, just those console thingies.

Time comes, time goes and I only am.
0

Share this post


Link to post
Share on other sites
Guess it depends on what you''re doing. I find in general java straight from the jdk performs worse off in all areas than c or c++ does.

For comparison, a bunch of calculations and a tiny bit of console output I just wrote took 2.63 sec in c, and 3.04 sec in java (average values of 3 trials).

I wouldn''t say it was faster...but its not much slower. Java (i''ve found) just tends to be a pain because there''s about a .3 second wait from when the program starts, to when it actually does the first part of the program.

That''s most of the time diff; once its running it compares pretty well to c or C++ (only tried on linux & win 95 tho).
0

Share this post


Link to post
Share on other sites
If you''re really concerned about speed, then compile the server into native byte code. The clients'' speed will depend on their connection and h/w setup.
0

Share this post


Link to post
Share on other sites
One thing which camed to my mind from Jim_Ross''s post is that there are many other factors that just the speed of your programming language so you can easily just tend to look after their pros&cons. Look, clients speed, lag which comes from moving packages from place to other speed. Packet size, clients connection, server speed, overloading, game''s multiplayer compatibility so how it handles the packets so that it can move smoothly.

Time comes, time goes and I only am.
0

Share this post


Link to post
Share on other sites
Al least on server-side, non-graphical execution Java performance can be equal to that of C++ code. Because many of you probably won’t take my word for it…

http://www.ibm.com/java/education/javahipr.html

Some of the ways to increase Java performance on the server include alternative VM’s such as Oracle’s VM, IBM’s Jalapeno and Sun’s Hotspot.

IBM’s Jalapeno: http://www.research.ibm.com/journal/sj/391/alpern.html
Sun’s Hotspot: http://www.javasoft.com/products/hotspot/index.html

Java’s server side execution is only getting faster. I have even read articles that predict that Java server-side execution will exceed C++ in the future as new features such as dynamic memory optimization are implemented into next generation virtual machines.

I have run across a case study from IBM where Java was being used as the back end for a multiplayer game from Redstorm (who brought you such hits as Rainbow 6):

http://www-4.ibm.com/software/developer/casestudies/story-redstorm.html

Of course, if you are an amateur game developer, then speed is probably not your biggest concern – ease of development is. I think that there are enough references available to show that Java is sufficiently fast enough to be used in the development of a game server. You may not be able to support 2000 active players, but if you are an amateur that is probably an unreasonable goal any way.

On the subject of graphics, it is possible to develop 3D based games in Java, just don''t expect Unreal Tournament. If you are looking for accelerated OpenGL for Java check out the list of OpenGL extensions on the FAQ page. I have even had some limited positive results building my own game in Java 3D, though it’s a little too early to declare the effort a success.

http://games.cpbinc.com/faq/

0

Share this post


Link to post
Share on other sites
I just made a plain-jane socket server in Java to test something out. First I used J++ (ick) and then whatever random Java is on the Sun (can''t figure it out).

Both servers leak memory.

0

Share this post


Link to post
Share on other sites
Java is not as fast as C/C++ because is must be interpreted, even when it is compiled by a vm it still will not be as fast. Still, java is capable of impressive 3d graphics and like some of the other guys said, there are opengl/direct3d/glide api''s to java to use hw acceleration. I have been developing a 3d engine in java for some time now that runs at about 25 frames persecond at 400 by 300 on a pII 450 in a full quake like world purly in software. As the average processer speed continues to increase I think there will be more and more smaller yet impressive games being developed in java because of the flow of the language and instant portability.

-Kris
0

Share this post


Link to post
Share on other sites
I tested gcj yesterday and it rocks. 100,000 multiplications+calls between C++ and Java lasted 138 ms on my system while compiling Linux kernel (which occupies 82% of my CPU)

In other words, Java can bring an easy programming while keeping a good speed.

Be reading you
0

Share this post


Link to post
Share on other sites