• 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.

StratMan

[java] "Java faster than C in the average"

12 posts in this topic

Reference: Java Performance Report, http://www.javalobby.org/features/jpr/ The new section (Part III, Dated Sep 2, 2000), states in part: "IBM holds the best Java scores. Their performance is 60% as fast as Intel C/C++ in Integer code, and 72% as fast in FP code. Compared to Microsoft Visual C++ 6.0, IBM makes Java faster than C in the average, and this is a low-level benchmark that''s heavy on numerical and array code, so this is no mean feat." Amazing! The bottom line is: Java is almost as fast as C now for many things, and if you do game development in Java you will only need to break out into c++/JNI for mundane low level tasks such as talking to 3d cards and asynchronous i/o!
0

Share this post


Link to post
Share on other sites
Java compilers one day will almost reach the speed of C++ compilers but never beat compiled C++ code because C++ dosn''t have slow down problem thanks to the garbage collection and data managment restrictions made, unfortunatly will never out perform games which are generally written in a C++/ASM combination.

Don''t get me wrong Java is a good language but it has its practicle uses as being the ideal platform for Application Service Providers thanks to platform independence and will take it place in the games world thanks to Set top box''s but don''t expect to see Java written Quake 3 for a while yet!

I program therefore can''t spell!
0

Share this post


Link to post
Share on other sites
pcstiby,

I think there is some things you don''t understand about Java. One of them is that garbage collection is not slower than normal manual clean up. Actually it has been shown to be faster in a lot of cases.

I think you should read this (a link from the forum FAQ)
http://www.rolemaker.dk/articles/WhyJavaCanBeUsedForGames/index.htm
before saying the things you do.

Jacob Marner

0

Share this post


Link to post
Share on other sites
Interesting benchmarks, but they have RTTI and Exception Handling turned on in the project settings... could affect performance.

However, it looks like they did their homework and showed that using the right VM, Java can seriously kick ass.


Give me one more medicated peaceful moment.
~ (V)^|) |<é!t|-| ~
ERROR: Your beta-version of Life1.0 has expired. Please upgrade to the full version. All important social functions will be disabled from now on.
0

Share this post


Link to post
Share on other sites
This guy forgot to mention GCJ. That is the gnu gcc compiler front end for java. Using that you can natively compile or even cross-compile java byte code (and source) into asm for almost any platform. The only catch is that GCJ still needs libs to run the compiled code against and there isn''t any AWT/Swing/GUI support yet. But if you use another GFX lib (like Qt, or libsdl) you can cross compile those into almost any platform. Also, you can compile java into asm code for systems that do not have a JVM and probably never will, like console systems.

This brings me to a thought I had a while ago and i''m wondering if anyone wants to help. Using java and GCJ to make a dreamcast demo or gameboy advance demo. I say demo because I''m being realistic about the limitations of GCJ and my own experience with these other platforms. If you are intereseted contact me and I will give you the docket of preliminary activities to setting up such a dev environment.
0

Share this post


Link to post
Share on other sites
Jim,

It could be way cool if somebody would do such a demo. Go for it.

But, as far as I know GCJ only support Java 1.0 which puts a limitations of what is possible. For instance if you need to access the Dreamcast hardware you need some kind of native interface and as far as I know GCJ doesn''t even support the old NMI interface (the one that existed before JNI). Correct me if I am wrong.

And with no user interface support or native support how would you go around doing anything useful on a console?

Jacob Marner

0

Share this post


Link to post
Share on other sites
Going back to the original topic for a sec, i found this post last year, my brother emailed it to me

http://www.aceshardware.com/Spades/read.php?article_id=153

Now, back to gcj. Here is the faq
http://sources.redhat.com/java/faq.html
And here is a quote from it

quote:
2.8 What features of the Java language are/aren't supported.
GCJ supports all Java language constructs as per the Java language Specification v1.0. Recent GCJ snapshots have added support for most JDK1.1 language features, including inner classes.


The only thing it really has a problem with is inner classes. Most of what it cannot handle is restricted to source code, if you can precompile into javabyte code, I think there is very little it cannot handle. It does support JNI now, but it has always had a better alternative CNI. It is like JNI but since the java byte code is going to be natively compiled the CNI knows this and takes advantage of it, leading to less overhead.

I have done my homework on this subject and it does seem feasible.

Edited by - Jim_Ross on September 7, 2000 11:31:44 AM
0

Share this post


Link to post
Share on other sites
Ok, sounds like some cool features has been added since I last looked at JGC.

What about portability to the Windows platform - or is it strictly UNIX? I know that Cygnus has made a gcc port for win32, but do you know if it likely that JGC will work with this?
I am concerned about this, as you know Jim, because I see the use of DirectX quite vital.
Using CNI might be a way to speed things up significantly.

Jacob Marner

0

Share this post


Link to post
Share on other sites
In answer to my own question:

JGC is actually distributed in binary form with Cygwin (the win32 GCC port) so it is ready to use when you install Cygwin.
Neat. JGC is turning out great.

The only thing that is a bit annoying though is that by CNI I will not be to use standard Java tools such a debuggers and profilers and of course that you no longer is portable across Java compilers.

Jacob Marner
0

Share this post


Link to post
Share on other sites
Wow i didn't notice that gcj came with gcc for win32, that's cool.

quote:
The only thing that is a bit annoying though is that by CNI I will not be to use standard Java tools such a debuggers and profilers and of course that you no longer is portable across Java compilers.


There are gnu debuggers that will work with CNI enabled java programs. As for the breaking of java code amongst other compilers - who cares?

Seriously, there aren't any other compilers that I know of that will compile Java code into SH4 machine code, so the term "portable across java compilers" makes no sense in that situation. CNI is faster and easier to debug than JNI, you are tying yourself to one platform when you natively compile, so i don't see being tied to one compiler as such a big issue.

Edited by - Jim_Ross on September 7, 2000 2:22:02 PM
0

Share this post


Link to post
Share on other sites
SH4? What does that mean? If you mean really fast then the Visual Cafe 4.0 Expert edition and IBMs Visual Age for Java Enterprise edition compilers produce quite fast code too - in machine code.

The only GNU debugger available is gdb. That is text-based. There is a visual front-end called ddd (I think) but that has as far as I know only been written for X-Windows.

So by tieing myself to one compiler and and prevented from using visual debuggers and other utilities such as profilers, memory leak detectors, IDEs (you may argue that MAKE is better, but lets leave that discussion for another time) and so on.
So I think that being cross compiler portable even on the same platform is an issue worth caring for.

Being cross compiler portable means for instance that I can just throw in Java3D in my Symantec native code compiler, compile it and go. This is the issue with any 3rd party library that uses JNI. I like that.

Anyway, I think it is still a bit risky to use JGC for larger projects because it still seams to be fairly early in development. But much has happened since I looked at it the last time so things are certainly getting better. Maybe in a year or two it may really worth basing major projects in it. When this time has come is somewhat subjective though, so you might disagree. And I am problably quite biased. I already have a quite large code base using JNI and it would require significant work to redo in CNI.

One other thing. It is quite risky to base your development on one compiler. It might be bugged and you would then be unable to change compiler underway. Take for instance the Visual J++ that uses Microsofts RNI. Now that C# has come it is unlikely that J++ will be come in any new versions. If I had a code base written using RNI I would probably have to port it all to JNI (or CNI) now if I wanted to reuse that code.

Jacob Marner
0

Share this post


Link to post
Share on other sites
What I''m saying is that it is the only compiler that will do what I want. There are 0 others that will do what I want. When you say Visual Cafe produces fast machine code you are stuck in the mindset that I am writing Intel based programs. I am not going to write something that will execute on a desktop or server that runs on an x86 CPU. So far GCJ is the only compiler i know that will make non-x86 machine code. If you can find another one then please tell me.

SH4 is the main CPU for the dreamcast (it doesn''t run a pentium anything)

0

Share this post


Link to post
Share on other sites
I am totally aware that you don''t work on Intel based machines. I am not (and was not) stuck in any "mental midset". I just didn''t know what SH4 meant, thats all.

I have had plenty of experience myself with other architectures. For one thing I wrote a book on low-level programming on the Digital Alpha-architecture last year and taught a class (as an assistent teacher) in that same subject. I have programmed MIPS assembler and have used gcc a lot on both HP-UNIX, Linux and Digital UNIX.

And as for "portable" native code you are probably right. JGC is the only way to go. In fact, because use a using the same C++ compiler on all the platforms you will even be able to write somwhat portable libraries using CNI - assuming of course that you stay within the POSIX standard - and that the platform you are running on is UNIX. Of course - if you cross compile to the SH4 then there will be no such services available (I here assume that no UNIX version is available for the Dreamcast; only a gcc backend)

Jacob Marner
0

Share this post


Link to post
Share on other sites