[quote] - …how close without the memmaping (stream it instead) and without the structs (using the various hand-written simulations that several of us have done, which only differ in not being specially treated by the jvm)?
[/quote]
Provided the format is ‘convenient’ to parse, and you set the heap parameters so that the minimum size is large enough for all the data to be loaded, then the operation is not far short of I/O bound.
At the moment I am parsing NavTech SIF+ files (geographic data) at a rate of about 60MB/s. This is the rate measured against the uncompressed file size. The data is actually held in a ZIP file and decompressed on the fly (using the usual java.util.zip classes). My machine is an AMD 2500+. I am creating objects for every record in the file (usually quite a few objects per record).
So, on PC architectures, your experience is it doesn’t matter? That was what I thought. No-one was adamant it was a problem on PC, although it seemed an assumption no-one ever bothered querying (“we have to do this on consoles all the time anyway, so we just do it on PC too because…why bother not doign it?”) which makes sense given it’s not hard to do.
Still wondering about consoles…could be pretty nasty to get a JVM on consoles and then find it sucked so badly that it just gave java a useless rep all over again :).
The AI engine I’m working on is still in the design and analysis stage. All I have is a first draft of an UML design and some test code written in C++. I’m a little
[/quote]
From when is UML used outside of universities?
Adapt recognize?
Weren’t the pilots trained before? Or they don’t teach on naval academy don’t fly into that stone when there is 1000^3 km free space.
Actually that US pilots in Italy flew too near an object as well. When they were at US trial US gov didn’t claim they wanna show thamselves to other pilot, they claimed they had bad maps.
[quote]To make this post somewhat appropriate to this thread, I wonder if I could develop such a sophisticated design using Java. I like the language very much and have been asking questions (in another forum) about Java and 3D. There are games perfect for Java. But games that require lots of mathematically calculations done by the CPU as well as the GPU … I wonder?
I appreciate your inquiry. Wish me luck!
[/quote]
It reminds me of my game 3 million + stars planets round them and that fleets…
I designed it to be interesting even after 15 years so I have time.
It is 90% used outside universities. In fact, probably more than that - universites account for almost none of hte UML usage. It’s a mainstream tool for planning software development; certain industries (like games industry) don’t use it very much, more because of ignorance or fear or laziness or simple lack of competent management than because they don’t need it. This is slowly changing, with increasing numbers of games dev jobs requiring UML expertise.
If you want to know more about UML usage, there’s some threads in the Tools Discussion forum here.
[quote]Ok this is my first post.
I’m old salt. Once my friends called me Bjarny because of my in-depth knowledge of C/C++. But I pretty much do everything in Java these days. And the everything is high performance computing - in java.
My .02 on the performance argument. For pure number crunching, a native compiled language will always win. It doesn’t matter how good the optimizer is, because the best optimizer is the developer, and if you hand code optimized stuff in C/C++, it will always out perform Java. And you can code directly to your hardware too…
[/quote]
Have you tried assembly? Properly complied assembly could outperform C++ easily. (When C++ doesn’t produce the same code, often it don’t.)
Sometimes optimalizations from C++ are harmfull to Java. Remember the Iverse Square root optimalization? Now try it in Java.
[quote]Implementing this as a class in C++ you can take advantage of operator overloading as opposed to chaining methods to add/multiply.
[/quote]
Java do have authomatic method inline. So add(sub( is, or should be inlined after first 10000 calls, or so. ~_^
Wasn’t FFT better than n^2 algorithm?
[quote]write a gaussian blur in java and the same thing in C/C++. Do it on a 1024/768 32 bit image as many times as you can over 1000 iterations.
[/quote]
I migth to that aside that C++ part. Just how big distance should be blurred? The problem is: as many times as I can? It would turn into random data. Or should I done 1000 iterations? I had nastier problem. My ultraslow function and 3000 x 3000 map. Of course at least 30000 iterations just to made look it nice. One of biggest slow downs was that drawing on the screen after each iteration - 3 different pictures, or 3 different version of picture. I speeded it considerably when I decided to paint only each 50 picture or so.
If someone is interested in maping algorithms in early stage. Look at http://volny.cz/sscom
ROT 13 a short story about I know…
Guvf erzvaqf zr bs zl grzcbeny erghea gb fpubby nsgre 5 lrnef qrynl. Grnpuref bs culfvp qrpvqrq V xabj abguvat naq xvpxrq zr bhg jvgu S. V unq whfg 7 lrne rkcrevrapr nf nfgebabzre nzngrhe jvgu xabjyrqtr nobhg ynfgrfg geraqf va nfgebabzl, gung zrag abguvat sbe fhpu rqhpngrq crefbaf yvxr jrer gung grnpuref. Bar bs gung grfgf jnf Xrccyre ynjf… Zl zbgure jnf grnpure bire 30 lrnef naq V urycrq ure jvgu grnpuvat naq bgure fghss. Vg jnf gbb ybat ntb, V sbetbg fbzrguvat nobhg grnpuref, fbzrguvat nobhg fgnovat vagb gur onpx. Ybgf bs crbcyr yvxr gurz ner va gur jbeyq…
So back of topic.
Be carefull with optimiztions, and benchmarks some of them could be very missleading. And you should know one thing. Jeff HA~~T~~ES benchmarks.
Actually I do. Do you remmember times when tape was used for programming? (Paper tape, and of course that paper card how was english name for that. Europe used one system, US second.) Those were the times when computers were able to continue in work even after one day of electricity shortage.
Precalculated values for Taylor aproximations are sometimes even now used in the scene.
BTW when I looked at the JNI overhead in the server VM, it was something like 50 CPU cycles. Lookup into the main memory varies is 150 - 286 cycles.
How big is the problem for the level of games done at javagaming??
JNI overheads. Who cares, most work are done in the native class OpenGl,ODE, OpenAL etc.
What I think is interesting about this discussion, is that we have to look at the type of C++ based games out there. If we look at the newest high profile titles, take a look at their specs. Min 1 GHZ machines, Gforce 3 and up, 512 MB ram. Well where did the highperformance go?
My thesis, wich is it impossible to verify is that the optimizations is lost due to the complexity of a large game. So steps must be taken to reduce complexity, this is where Java comes in.
I agree that’s a good starting point to open any dialogue on this subject with C++ developers. It is slowly (very slowly; too many grumpy old doubters in the industry) making an impact on the industry generally, with people using something along the same lines as reasoning for why it’s worth employing standard planning and project management techniques. IME it’s reached a stage of acceptance where it’s making people consider thinking about reading about java a little. i.e. they don’t for a moment believe or accept the truth about java (far too sceptical yet) but something in the back of their mind is starting to doubt the many set-in-stone attitudes of their peers, and qustion “is there a better way? C++ may be the most powerful language, but our biggest problems are all budget, overworked staff (80+ hour weeks) and overly complex under-tested projects. Perhaps there’s a way forward that sacrifices expressive power but makes everyone on the team less stressed, and gets the game completed quicker?”.
Unless we have concrete, simple, verifiable information - and lots of it - then when each C++ dev asks themself that question and glances at java, they’ll quickly find one thing (e.g. generics in java 5) that rightly terrifies them and makes them not bother to evaluate it any further.
This is the job, really, of Sun’s marketing dept, but IMHO they’re incompetence (or, at least, failures) outside the “selling to large corporates” niche is quite legendary, and as java users we have both a vested personal interest and also a moral inclination to help make lives easier for other poor souls who still labour under the yoke of C++ ;D.
There was a VERY long thread (actually several) a month or two back on the newsgroups about Lisp vs C/C++ for games programming.
The Lisp guys basically saying that Lisp is better faster to use because it is more flexible, has GC so its easier to develop with (less time debugging memory problems)…etc.
Litterally hundreds (actually over a thousand) of posts from the C/C++ game world came in and can be summed up like this:
“If Lisp is so great, where are the top quality games built with it? (except Naughty Dog…the ONLY example)”
“Why would I switch to Lisp for gamming, when so many tools/API’s exist for C++? I have deleted more C++ game code from my drive then you can produce for Lisp”
“99% of existing game companies are not going to consider using Lisp because the top game developers they can hire all use C/C++. Where are the rockstar Lisp game programmers?”
“When you show me ONE fantastic game built for a PC that proves your claims of fast development time, reduced complexity, etc., then I’ll think aobut it until then, i’ll stick with C++”
You can expect the same kinds of arguments against Java.
Prove those claims wrong or have good arguments against them all and at least some people will be convinced. Unfortunetly most of those arguments are “Chicken or the Egg” problems…
[quote]There was a VERY long thread (actually several) a month or two back on the newsgroups about Lisp vs C/C++ for games programming.
[/quote]
That could be a useful reference point (although I fear it would take a very long time to read through :(). Do you have a link? (web)
I’m fairly certain that Lisp is a pretty awful choice for general games development at the moment since the runtime stuff isn’t really good enough. Like Java 1.0, in theory it’s a good option but the practical situation hasn’t attained what the theory allows.
Or, to put it another way, LISP is a one-shot-wonder. It does one thing particularly, and that lets it do lots of other things well. But for it to be more than a niche language it needs to do a lot of things fundamentally brilliantly (look how many java does, and how it’s struggled even so to gain acceptance!). If Java were merely WORA I persoinally would never have started using it - it’s a great feature, but simply not enough to make it adoptable as a base platform.
FWIW, ND have given up on Lisp as being too poor for games development…
A fair point: a language without masses of tool support isn’t tenable for production development of games, sadly.
Bizarrely, this one has hardly come up at all in my discussions with C++ devs, except where I’ve raised it myself. That might be something to be veyr afraid of: are they all assuming that java is as similar as C++ as the basic syntaxes are? Gulp.
Thanks. Good to have some different approaches to the issue.
One thing that I’ve noticed, however, is that people who don’t develop games professionally are fond of the “where’s the amazing game using that language?” argument. If you count the percentage of people asking that in any environment then it’s inversely proportional to the number of pro games devs. In the handful of all-pro-game-devs environments I’m in it practically never comes up - presumably because we’re all aware that 90% of the reasons why a game doesn’t happen are independent of the language. Go to slashdot, and it seems to be all that anyone ever has to say. Places like gamedev.net lie somewhere in between.
A friend of my family showe me an Achorn computer. I had never seen it before. It booted almost instantly, (3-5 sec bootime), was based on a RISC processor and had a nice GUI that looked identical to older versions of OS X.
This PC was RISC based a long time before Apple claimed to have launched the first RISC based computer and had a GUI while MS still was in dos mode.
So why did they fail, they apparently sucked at marketing.
So my point is, what may be best does not have to be what people use. Being right is not enough.
A funny story that comes with the machine is that Apple printed big adds claiming that they had build the first RISC based PC. Achorn not having enough money to sue them, simply printed adds “Joing the club”. Dunno if its true, buts its funny
In a somewhat related, somewhat thread hyjacking way…
On next generation systems, why Java, not C++?
And furthermore, will Java be on these next gen systems? what will it take to get it there?
If a huge hit came out using Java on PCs, would the powers that be be inspired to port/create a solid JVM?
Or will that happen anyway, then current game developers can look at Java as viable on those platforms and switch some projects to Java.
Finally, if the Java support on PS3/XB2/Revolution is slow to materialize, I can’t see how Java can be a true alternative for game development in the short to medium term.
[quote]There was a VERY long thread (actually several) a month or two back on the newsgroups about Lisp vs C/C++ for games programming.
[/quote]
Do you mean that thread that started as a joke on another joke thread in Lisp group?
C++ sucks for games.
Alas some posters didn’t know that previous thread so they thought it was a troll.
It was on usenet, not on web. Of course blah^3 could look at google.groups and look at comp.lang.lisp
,comp.games.development.programming.misc
,comp.lang.c++
I have just 755 posts of it. If compressed it’s 500 kB.
PS3 doesn’t need to be as easily adopted as PS2. First at all some companies lost money when started development to PS2 too soon, the second “problem” would be incompatibility with PSX. Actually this wouldn’t be a problem we have emulators so no need for modchips.
Look at this article. http://www.gamasutra.com/features/20041229/kelly_01.shtml
There were three threads involved originall IIRC. One from a guy at Microsoft started it. He wrote a paper or something (was on a web site) “Why Lisp sucks for games”, this of course pissed off the Lisp community. Then they had a very long thread rebutting his claim C++ was superior for games development. …Then… a real thread was started titled something like “C++ vs Lisp for games development” (spanning comp.lang.lisp, games and c++ groups)… which went on for several hundred posts…then someone (Kenneth Tilton? not sure) started the joke one (based on the name of the original paper from the M$ guy)… “C++ sucks for games”…all of those posts had good arguments for and against both.
Like most people these days I don’t touch usenet with a 10 foot bargepole. Too much hassle, too many ISP’s block it or make it difficult, and forums have displaced it in the mass market.
Exactly. Anyone who’d read the original would be able to find a weblink to it via a quick copy/paste from a posting into google. Since I haven’t read it, I would have to trawl through tonnes of crap to find it. Hence asking for a link.
I can’t find the other one that spawned from the MS guys paper, or the decent one, but I think the “C++ sucks for games” ended up with the most posts anways (1015 posts)…that’'ll keep you busy.