Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1]
1  Java Game APIs & Engines / Java 2D / Re: Marshalling Java image bytes to C++ BITMAP in JNI technology on: 2011-10-31 12:21:40
You could try using a  java.nio.ByteBuffer, which should give you shared memory between Java and Native, and use the JNI methods for native access to the shared memory area.
2  Game Development / Newbie & Debugging Questions / Re: Java game project organization on: 2011-10-29 17:37:43
As for organizing sources, I'm a fan of using the maven layout, even if I'm not actually using maven.


Version control is just plain mandatory.  Not using version control is like never saving your documents.  You should get in the habit of thinking of your filesystem as just a local cache, where you're really saving your files to VC.  As preferred version control goes, I would recommend something decentralized like git or mercurial, but even subversion is better than nothing.

I agree with sproingie. Use version control. Even if you just learn the basic code&commit cycle, it will make you less afraid to try new things, and give you the possibility to revert any bad changes. Not to mention that if you use a free service like, then you get offsite backup for free.

I would fret too much over package layout. Start with the basic layout that sproingie suggested, and put stuff where it seems sensible at the time. If you are using any modern IDE, then you will have built in refactoring tools that will make moving classes to different packages very easy.

Good luck  Cool
3  Game Development / Newbie & Debugging Questions / Re: to jump on: 2011-10-28 12:42:45

Not sure what you asking since you are not showing all the relevant code. The y position should be a function of the length of the jump in ms.
4  Discussions / Business and Project Management Discussions / Re: AllBinary Platform Diagram Preview on: 2011-10-27 19:48:36
It is an impressive feat to have a 1 million line project, even though it has taken you a while.

What I think you should have done before you came here and presented your project is: Make the web-presence of you project look attractive. Right now your ohloh page is pretty empty, the page is very ugly, and documentation is severely lacking.

Presentation does half the job of selling something like this. If the sites that present this project look like you don't care about making something good, then no one is going to sit down and read your code to find out if the code is awesome. They will just assume the project is as sloppy as the site it sits on.

Anyway, good luck with the project. Get someone to help you with a proper web-presence, make a great game, and maybe you'll get it off the ground.  Cool

5  Game Development / Performance Tuning / Re: using variables vs straight up numbahs... on: 2011-10-26 13:53:08
The quote is totally wrong.  It should read: "Premature coding is the root of many disasters".

Premature optimization is an doesn't exist.

The quote is from Donald Knuth and goes like this: "We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil" (source: Wikipedia)

I wouldn't call it an oxymoron. You can have code written that should not be optimized until you know if it needs optimization or not. Sometimes you might think think it is in need of optimization and later on find out that it is ok. I don't see an oxymoron there. Smiley
6  Game Development / Performance Tuning / Re: using variables vs straight up numbahs... on: 2011-10-26 11:56:07
Just write the code in the cleanest way possible and worry about performance later on. For 95% of your codebase maintenance is more important than performance.

If you want to care about performance, you should be caring about what algorithms you are using. This is where the "premature optimization is the root of all evil" quoters sometimes it wrong. Performance should be considered early on in the sense of "how should things be done / what algorithms should we use", and not in the sense of "how do I optimize this loop".

TLDR; Use variables/constants for your magic numbers. :-)

7  Discussions / General Discussions / Re: Finishing is hard. on: 2011-10-11 12:01:39
After that, I made I copy of my main collision detection class, backed up the old one, and then stripped shit down.

This is a bit unrelated to the thread topic, but here goes:

Sounds like you might not be using version control software. If you are not, I really recommend using some kind of version control. It makes experimenting and messing around with stuff a lot less worrying. If something doesn't work out, you can always revert to a former version that works. Smiley
8  Java Game APIs & Engines / Tools Discussion / Re: TrackIR for Java on: 2007-11-06 00:02:20
Cool. I have one of those lying around at work. It was fun to play with for a little while, but I never really found a use for it. I found that it was harder than I thought it would be to move my head in a precise enough way to control anything properly with it.
I'll check out the Netbeans plugin though and see if I can get my head to move more predictably  Wink
9  Discussions / General Discussions / Re: Alternative Java-based languages on: 2007-11-05 23:49:31

If you are feeling adventurous, you could try out JRuby ( ). Netbeans6 beta has support for it, and it is Java-based Ruby implementation that lets you interact with Java pretty easily.  Cool
10  Game Development / Performance Tuning / Re: Fully utilising Multi cores/Multi cpus? on: 2007-11-05 23:12:48

The garbage collector needs to stop all the threads across cpus/cores to do it's work. Even if you use a parallell collection GC, it needs to stop everything for some tasks. Generating and discarding a lot of objects is never a good idea, but you probably have to be even more careful as the number of parallell threads running on seperate cores increases.

It would seem that because of the jvm having a stop-the-world point in garbage collection, it is pretty important to ensure that the gc doesn't run too often on multiple cores.

Just a thought. :-)
11  Games Center / Showcase / Re: SpiderTrap on: 2007-07-16 00:36:25

That is a pretty cool game. I had some fun playing it.

A little more polish would make it even better. Simple things would help, like having an option to turn off the tutorial-text, and having the game remember the options next time you start the game. Smiley

12  Discussions / Miscellaneous Topics / Re: Feeling Stuck on: 2007-07-15 18:08:37

This post is a bit late, but just in case you still have the coders block:

If I get stuck in front of eclipse without any motivation, I find that listening to old Commodore64 and Commodore Amiga tunes gets me going again. I used to program on those computers in the 80's and early 90's, and listening to the game- and demo-tunes from that era gets me right back in the mood. This probably will only work if you have some kind of nostalgic relation to that music though  Wink

Slay Radio ( ) plays some good tunes from that period if you want to have a listen.
13  Discussions / General Discussions / Re: Still no presence in mainstream desktop game development on: 2007-07-15 00:36:08
We use Java in an mmo ( we are developing. The rendering engine, physics and networking are done natively in C++, but most of everything else is handled in Java, including game logic and worldbuilding tools. Back when we started development pure Java wasn't an option, and we were a bit worried about the performance of the Java/Native interfacing, but as the development tools and Java language have evolved over the last few years the decision to use Java has turned out to be a good one.

I think Java's biggest problem is its image. The old "Java is slow" adage is still hanging around and the older guys who program games in C++ rarely advise anyone to make a game in Java if they ask what language to use. It reminds me of the situation for newbie Linux programmers in the 90's, where people would be told to use C instead of C++, because C++ was so much slower than C. This has started to change in the Linux developer community, and hopefully it will change for Java too. I guess someone needs to break the mould and show that it can be done.

Pages: [1]
EgonOlsen (74 views)
2018-06-10 19:43:48

EgonOlsen (55 views)
2018-06-10 19:43:44

EgonOlsen (74 views)
2018-06-10 19:43:20

DesertCoockie (254 views)
2018-05-13 18:23:11

nelsongames (154 views)
2018-04-24 18:15:36

nelsongames (154 views)
2018-04-24 18:14:32

ivj94 (895 views)
2018-03-24 14:47:39

ivj94 (156 views)
2018-03-24 14:46:31

ivj94 (808 views)
2018-03-24 14:43:53

Solater (172 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!