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

ARCHIGAMER

[java] Reasons to make games in java?

21 posts in this topic

why should you make games in java besides it compatible across all operating systems?
0

Share this post


Link to post
Share on other sites
Some programmers like the fact that you don''t have to worry about pointers.

-Mezz
0

Share this post


Link to post
Share on other sites
A quote from our FAQ at http://games.cpbinc.com/faq/

"Q. What role can Java play in Game Development?

Java offers increased developer productivity both in development and debugging over lower level languages such as C and C++. Still, most people would agree that Java will not be the development tool of choice for ‘traditional’ commercial games. In commercial game development projects cutting-edge performance is more important than cost and time savings.

However, Java may play a role in game development in a couple of other areas:

Advertisement and Web Site Enhancements: Discovery Online and Disney''s web sites comes to mind - they frequently make applet based games available as part of their marketing and/or education efforts.

Customization and Mods: I have seen discussions pertaining to the use of some kind of JVM hooks for scripting mods and customizations to games. This has already been done with the Quake engine by third parties.

Two Part Game Engines: Java based game logic executables on top of a core game engine in C or C++. This way you would get the performance benefits of C for the performance sensitive components of the game and the developer productivity benefits of Java for the non-performance critical game logic. With JIT technology this seems very feasible (the game logic gets compiled as the level loads, for example).

Steve Anichini of Jellyvision on C++/Java engines.

Cross platform game development: Now that Linux is gaining in popularity there MAY be an actual use for cross-platform game development. Some game genres, such as turn based strategy games, don''t need cutting edge performance and could be developed in Java (taking advantage of the cross platform aspects).

Amateur Developers: The number one problem for most amateur developers is finding time to actually finish your game. Java can help, and most amateurs don’t need cutting edge graphics and multimedia so Java’s performance will suffice. (Jerry_Lynn)"
0

Share this post


Link to post
Share on other sites
i am talking about applications?..it sounds like you are talking about online web browser based games or is that the only way you can use java?...i am not sure
0

Share this post


Link to post
Share on other sites
Well, networking, at least for me was a cinch to implement. I don''t know how easy it is for WinSock or DirectPlay compared to Java, but there''s a plus for doing a game via a Java application.

Let''s see, what else....hmmm. Nothing much else comes to mind

JoeG
0

Share this post


Link to post
Share on other sites
Actually, just thinking about it, Java has some virtues. Namely, since it''s cross-platform, it''s kind of like a console system. (And any programmer could guess that a console system like a Nintendo 64 would be a whole lot easier to write for than Windows!) There''s one standard and it all comes out the same (unlike java-script.) Darnit, you guys are going to make me go buy a Java compiler or whatever you use.

lntakitopi@aol.com | http://geocities.com/guanajam/
0

Share this post


Link to post
Share on other sites
From my humble experiance with it so far, Doing graphics in Java seems easier then in, say, VC++.

However, I''m not about to write a game in Java just yet. Mainly because it''s still to easy to decompile to code into it''s original source. Variable names and all. This really bothers me.

(Although it''s become a nice source of sample code)

E:cb woof!
0

Share this post


Link to post
Share on other sites
Heh if you think you can escape pointers in Java you are dead wrong =P
There is no pointer math and garbage collection keeps you from shooting yourself in the foot with deletes (sort of). However, almost everything in Java is a pointer - hence the need to instansiate everything and why == usually won''t work =-)
0

Share this post


Link to post
Share on other sites
Java is way much easier than C++ and you don''t have to buy 200$ compieler to get at least good compieler, because Sun proviedes all you need. Also, Java is way much logical and you can write purely in oop

Time comes, time goes and I only am.
0

Share this post


Link to post
Share on other sites
Java is good for web applications, however because it is cross-platform it lacks the speed necessary for a real time or even 3d game. I have taken 3 semesters of college dealing only with Java and when you compare the ability to have predesigned classes with slow speed to the fast, low-level programming of C or C++ but having to write most of the code yourself, C and C++ beat Java way out. Java3D isn''t all its cracked up to be simply because of the independence it has over C or C++, Java3D in its current state can only run about 1 frame per 15 sec on a simple block on a pentium 100 with 16 meg of ram. granted it has no 3D accelerator but i enjoy some of the old top dowm games that still run on my old boxes.

So if you ask me, I feel, weighing all the pros and cons, C or C++ works better than the current Java version. Now thats not to say it won''t get better but for the time being Java just doesn''t cut the speed needed for descent games.
0

Share this post


Link to post
Share on other sites
In my own opinion, nothing beats C++ if you want to create "state of the art" games. I used JAVA for a whole year and all these pre-implemented classes where very useful but in fact, writing such classes ("list" or "hashtable" for example) don''t take you so much time, compared to a 2-3 years project. Moreover, you''ll just have to write once if you code it well.

If I had to make a "little" game with network support, i would use JAVA, because you can make little apps very quickly. But if i had to create a huge game, JAVA wouldn''t be so useful.

Even with new librairies, JAVA is REALLY REALLY SLOW!

So, what could you do with JAVA ? For now, i''d say "little game" (not professional) or games which needn''t great power (turn based strategy).



Prosper / LOADED corporation
0

Share this post


Link to post
Share on other sites
Java is slow on graphics, other than that it''s almost as/equally fast as C++. I''ve heard some people say that some of their apps have been faster in Java (due to aggressive inlining at runtime etc.) but I haven''t seen any examples of that.

The great thing about Java for me is that it reduces the development time. Sure, you can write small apps in C++ that speed up the graphics in Java etc. but I think it would
be painful to write a whole big app in C++. I used to do C/Asm programming and some C++ but for the last 4 years I''ve been doing Java exclusively and I really don''t feel like ''going back'' to the earlier languages. The project I''m working on right now is really big and it would have taken A LOT longer in C++.

Java3D does seem slow but Sun also says that it wasn''t designed for gaming and recommends using other lower-level API''s for that purpose. Anyone tried the packages that adds OpenGL bindings to Java? They are supposed to be a lot faster.

About decompiling Java. Just run your program through an obfuscator and no one will have fun trying to decompile your code. Many optimizers will also replace your variable strings with numbers or shorter strings that take up less space, that will make reading decompiled code harder.

Henry
0

Share this post


Link to post
Share on other sites
Yeah, I''ve seen Java that was run through one of those "obfuscators". I still could figure out the code with a little work. The one I saw used the same name over and over ("p" normally) and relied on overloading to keep the functions appart (some classes had "void p()", "double p()", "double p(double p, double d)", etc.)

The code I was looking at was the only sample of IK I could find. After a couple days of renaming variables and functions, I had the entire thing figured out.

E:cb woof!
0

Share this post


Link to post
Share on other sites
"Heh if you think you can escape pointers in Java you are dead wrong"

- A pointer is NOT the same thing as a reference. The practical implication is that you cannot cause subtle and hard-to-find bugs through improper memory allocations and deallocations with a reference.

"Java is good for web applications, however because it is cross-platform it lacks the speed necessary for a real time or even 3d game"

- If you are referring to writing a 3D engine in Java then I would have to agree. But if you write a game in C++ you’re probably going to use some graphics API like DirectX or OpenGL. If you were writing a game in Java you would do the same thing. With DirectX or OpenGL handling your graphics you should be able to easily muster enough performance for a real-time game. 3D games like FPS''s might still be out of reach simply because of the amount of calculations required for collision detection and the like. I am just starting my OpenGL based game in Java, so I don''t have a lot of results on performance yet.

I wrote a Java 3D game and even with simple scenes the memory requirements were horrible. I also could not resolve the periodic ''freezing'' that I think was being caused by garbage collection. Of course, I am fairly new to Java 3D, so it may have just been my lack of experience with it. At this point I am writing Java 3D off as a solution until a few more revisions have come out.
0

Share this post


Link to post
Share on other sites
Bah, I beg to differ a on the pointer vs reference.
It IS a pointer. You can say String x = new String("FOO");
and String y = x;
y is now a pointer to x essentially and x is a pointer to
a memory location containing sting object FOO.
You cannot get the actual memory location it is pointing to directly, but that is what it is =)
0

Share this post


Link to post
Share on other sites
Ugh i mean x and y both point to memory location holding string "FOO" =P
0

Share this post


Link to post
Share on other sites
Eventually, Java(or something else, whatever) will replace C/C++. (probably VB on Windows though, thanks to its new OO structure) because of the gradual evolution (ASM,Cobal,Fortran,C/Pascal,C++,VB/java) many said that C would never replace Assembly(at least according to books ive read) because of its speed at the time. Eventuall, genuine full fledged applications will probably be programmed in some derived language (such as HTML), with lower level languages such as C/C++ replacing the ASM optimizations currently used when programming C or C++.
Whatever,
Etnu

What is a man without goals? A dead man.
0

Share this post


Link to post
Share on other sites
The reference in Java IS NOT a POINTER. It is a reference. The difference is that with pointers you have pointer arithmetics and are thus dealing with raw memory. This of course has it''s ups (you can do some speedy and cool tricks with it) and downs (in a huge application one cool trick going bad will crash the whole thing and it''ll be hard to trace without proper [=expensive] tools). In Java the references don''t deal with raw memory locations as such, you can''t e.g. use the pointer to a String to go through the letters in the String. You have to use the class that the reference points to in order to achieve that. It is a bit slower and a lot safer way.
0

Share this post


Link to post
Share on other sites
Hehe depends on implementation...
as taken from the Java faq
"No, no, a thousand times no. Java does not have pointers, no way, no how, the daily email I get from people who think differently not withstanding.
Java does have references. A reference is an abstract identifier for an object. It is not a pointer. A reference tags a particular object with a name in the Java virtual machine so that the programmer may refer to it. How exactly the virtual machine implements references at the level of machine code is VM-dependent and completely hidden from the programmer in any case. Most VMs including Sun''s use handles, not pointers. A handle is a pointer to a pointer. At the level of machine code in the CPU a reference is an address in memory where the address of the object is stored. This way the objects can be moved around in memory and only the master pointer needs to be updated rather than all references to the object. This is completely hidden from the Java programmer, though. Only the implementer of the virtual machine needs to worry about it. Indeed, this is not the only way references can be implemented. Microsoft''s VM actually does use pointers rather than handles. Other schemes are possible. "

In my original post I stated that Java has pointers with no pointer math. I stand by that because other than pointer math there is NO difference. Guess it is just my way of thinking about it but
A pointer to a pointer is still a pointer no? And MS Java flat out uses pointers which is at least 80% of vms out there =)

0

Share this post


Link to post
Share on other sites