Hi !
Featured games (83)
games approved by the League of Dukes
Games in Showcase (592)
Games in Android Showcase (168)
games submitted by our members
Games in WIP (645)
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] 2 3 ... 31
1  Discussions / General Discussions / Re: Oracle are winning in the 'copyright an api' legal fight on: 2015-06-30 14:34:06
Well, now let's imagine that you spent 50 years developing a rich and complex library of code, say, in C++, and you make your living after all your hard work by licensing people to use your binaries, and in a gesture of goodwill you release the source to those binaries to allow people to see how it all works and some smartass just goes "yoink" and copies all 208 header files and starts redistributing them without so much as a by-your-leave and then goes on to make billions of dollars from it. Would you be happy about that?

It's not that simple though.

A lot of people seem to think that Android "stole" some open-source Java code. But that's not what the debate is.

The debate is whether or not an API (in other words, the JavaDoc) can be copyrighted.

Android took the Java API (the list of its classes and methods, which any developer can access) and reimplemented those classes and methods in "Android Java".

Oracle claims that the API itself is copyrighted. They aren't claiming that Android developers stole Java's implementation of those APIs- in other words, nobody is claiming that Android stole code. They're claiming that coming up with your own implementation of an API is copyright infringement.

If Oracle wins this, that means that Joe Programmer can no longer implement a class called ArrayList that uses the same method names as the existing ArrayList class, without infringing on Oracle's copyright. Whether or not Oracle will enforce this is debatable, but larger-scale open-source projects that reimplement part of the API might be pretty worried about this. And that's the part that trickles down to us measly programmers.
2  Discussions / Miscellaneous Topics / Re: I have not programmed in 3 weeks. on: 2015-06-24 13:21:34
Yeah, exactly. I would find myself coming home from work and just not really doing much of anything because I wasn't focused on one thing. If instead I forced myself to code for an hour, then practice guitar for an hour, then go to the gym for an hour, those things became pretty regular things that I didn't have to "make time" for anymore.
3  Discussions / Miscellaneous Topics / Re: I have not programmed in 3 weeks. on: 2015-06-24 13:16:56
For the past 4 years, I've been working full time, going to grad school at night, and trying to fit in "fun" programming whenever I can.

The sad truth is that sometimes that meant going months without doing something fun for myself. So you might just have to wait until you've got more free time on your hands.

Another thing that kept me sane was being pretty strict about my schedule- maybe spend exactly 30 minutes on coding as soon as you get home from work, before you do anything else. Make that an absolute that always happens, and you'll find yourself "wasting" less time.
4  Discussions / Business and Project Management Discussions / Re: Caldera Games is looking for a 2D ANIMATOR on: 2015-06-24 13:10:27
Well, either way- I wish you the best of luck!

If you're on twitter, you might consider sending McFunkypants (the guy behind one game a month) a tweet telling him you're looking for an artist. He might retweet it to his people, many of whom are artists and aspiring gamedevs. I recently hired an artist this way, and I was pretty happy with the results.
5  Discussions / Business and Project Management Discussions / Re: Caldera Games is looking for a 2D ANIMATOR on: 2015-06-23 15:50:08
This team has more promise than any I've seen here. If I was any good at pixel art I would totally help out.

I don't disagree with you. This is why the team might have better luck if they seek out some of the people who have already expressed an interest in joining a team, which is why I'm pointing out the search feature.

Plus @KevinWorkman I'm sure you don't mean to be discouraging, but it's a bit mean that you post that on every post like this.

I don't mean to be mean. You and I might see every post like this, but most people who post these kinds of "come work for free" posts don't. I'm simply trying to point out how often we see these posts, as well as the search feature which might help them find other people looking for a team.

If this comes off as mean, I guess I'll stop, but I figured it was better than letting them go ignored and/or criticized.
6  Discussions / Business and Project Management Discussions / Re: Caldera Games is looking for a 2D ANIMATOR on: 2015-06-23 13:04:11
KevinWorkman: I don't think your template post works here. They do have a project posted on this very forum, which he links to in his post. And he also has a team organized that he has shown on this very forum.

My only point was that we see these kinds of posts all the time, and they hardly ever go anywhere. I've been trying to link between these posts to encourage people seeking collaborators to contact each other directly, since I think they'll have better luck than waiting for people to come to them.

People with the kinds of skills these posts are generally looking for will either have their own personal projects that they're working on, or they'll be getting paid to work on somebody else's project.

I think a lot of novices can get really excited about the idea of managing a team, but the reality is that *good* teams rarely come together to work on your personal project for free, and in fact adding team members probably won't make your life any easier- especially since the types of people who work for free probably don't have a ton of skills to start with, and the types of people who ask you to work for free probably haven't ever managed a real team.

I'm not saying this to be discouraging, but to hopefully help people understand the difficulties in these types of hopeful posts. And maybe by linking between them they'll have better luck finding like-minded individuals.

See also:
7  Discussions / Business and Project Management Discussions / Re: Caldera Games is looking for a 2D ANIMATOR on: 2015-06-22 13:18:32
Here is a list of similar posts I found just by using the word "team" in the forum search box. I'm sure you could find more if you tried. These might be a good place to start looking for collaborators:

You also might have better luck if you post *your* qualifications. What teams have you organized and led in the past? Do you have a portfolio of completed projects we can check out?

Also, try to understand that we see this kind of post pretty often- people asking us to work for free on their personal projects. Keep in mind that most people who have the kinds of skills you're looking for probably either have their own personal projects to work on, or are getting paid for their services. That's not to discourage you, but to suggest that you might have better luck if you set yourself apart: ask yourself "why would somebody want to work for me for free?", because that's what any potential "employees" will be asking themselves when they see your "offer".
8  Discussions / General Discussions / Re: Need to get TAB key bind to Word Completion and have it insert TAB character. on: 2015-06-20 15:06:59
I don't know if this is the default key or I have customized, Ctrl + Space.

It's the default.

Ctrl+space autocompletes. Ctrl+I autoformats.

I habitually Ctrl+A, Ctrl+I, Ctrl+S pretty much every time I write a line of code.
9  Discussions / General Discussions / Re: Need to get TAB key bind to Word Completion and have it insert TAB character. on: 2015-06-19 15:28:39
I'm confused- what does your tab key do now?

In my eclipse, tab inserts a tab character when you're typing, and when an autocomplete window pops up, tab switches the that window, then hitting it again expands the javadoc of whatever suggestion is highlighted, and then scrolls down in that javadoc.

What do you want it to do instead?
10  Game Development / Game Mechanics / Re: Best way to debug? on: 2015-06-19 12:16:08
Ooooo. So a shallow copy is where we actually do copy the object and don't just reference it? A deep copy is where we change the fields as a unique copy and an alias just points to the object?

Say you have a class like this:

class Thing{
   private String thing;

   public Thing(String thing){
      this.thing = thing;

   public void setThing(String thing){
      this.thing = thing;
   public String getThing(){
      return thing;

And you then have a List of instances of that class:

List<Thing> things = new ArrayList<>();
things.add(new Thing("zero"));
things.add(new Thing("two"));
things.add(new Thing("three"));

You can make a shallow copy of that List just by copying over those instances into a new List:

List<Thing> moreThings = new ArrayList<>();
moreThings.add(new Thing("four")); //won't affect the first things List

However, since all you've done is copy the references to the existing Things into a new List, your new List is still pointing to the Things in the first List. In other words, changes to Things in the first List will be reflected in the second List:

things.get(0).setThing("uh oh");
System.out.println(moreThings.get(0).getThing());//prints "uh oh"

This will cause weird behavior if your code uses that second List to modify the Thing instances in a way that the first List wasn't expecting. To avoid that, you can make a deep copy by actually making copies of the Thing instances:

List<Thing> deepCopy = new ArrayList<>();
for(Thing thing : things){
   Thing deepCopiedThing = new Thing(thing.getThing());

Now your deepCopy List contains copies of the original Things, so changes to the instances in the deepCopy List will not be reflected in the original List:

System.out.println(things.get(1).getThing()); //prints "one"

This is a simplified example, but those are the basics. Sometimes shallow copies are fine, and perhaps even preferable: it can be very complicated, very expensive memory-wise, or even downright impossible to create deep copies all the time. Which approach you take really depends on what you're trying to do.
11  Discussions / General Discussions / Re: Error handling and reporting on: 2015-06-19 12:00:13
To rephrase the question then, given the above, is simply writing a log file to the user's home directory and showing an alert dialog an acceptable solution? That's what I'm doing currently, and I'm just wondering if it's sufficient, or if a commercial app (even one that's not expected to encounter unrecoverable errors) is generally expected to do something more sophisticated than that.

The golden rule in programming is that it depends on your exact context.

In other words, we can't tell you whether a certain approach is an acceptable solution. That's a conversation you have to have with your customer.

For example, say you have a little program meant to automatically push the "I'm Still Listening" button on Pandora. If that fails, it's probably not a big deal, and you can display a simple error message to the user. On the other hand, if you have a program running the life support machines in a hospital, it's probably a pretty big deal if that fails.

The point is, this depends entirely on the particular program, who your customer is, what their tolerances are, etc. There is no one-size-fits-all solution- some approaches will be overkill in some contexts, whereas they won't be enough in other contexts. It really depends.
12  Discussions / General Discussions / Re: Error handling and reporting on: 2015-06-18 13:31:50
The first question you should ask yourself is: what **actual problem** are you trying to solve?

Do you have an application, particularly a commercial product, that encounters a lot of unrecoverable errors? If so, the obvious solution is to, well, fix those errors. If not, then this seems a bit like solving a problem that isn't actually a problem.

In "the real world", generally you'd do a bunch of testing of any product before you ship it, thereby hopefully eliminating most unrecoverable errors before the customer can encounter them.

Of course, any product is going to have errors, and how you handle them really depends on exactly what those errors are. For example, some of our software requires certain data files to be in place. If those data files aren't in place, we display a simple message to the user telling them to wait until we fix the problem on our end, and we provide a way for the users to email us from the application itself.

So the short answer is: it depends. The medium answer is: you should identify these potential errors ahead of time so they aren't unrecoverable in the first place.

Other than that it's really up to you. You might try to catch the error and show a simple message to the user, maybe with an optional stack trace they can send to you. If your context allows it, you might even automatically email that stack trace to yourself.
13  Java Game APIs & Engines / Android / Re: distributing work-in-progress android projects on: 2015-06-18 01:37:14
I just tried it and it works fine for me. The sounds play, although the one sound doesn't seem to stop when I push the button again.

I do have the "other sources" box checked in my security settings.
14  Java Game APIs & Engines / Android / Re: distributing work-in-progress android projects on: 2015-06-17 17:50:36
As always, the first question is: what happened when you tried?

Signing the APK is not a big deal- in fact eclipse can do it for you. You don't have to pay for a certificate or anything.

Post a link to the APK you're creating and we can try it out.
15  Java Game APIs & Engines / OpenGL Development / Re: Mixing LWJGL and AWT JPanel on: 2015-06-17 13:14:23
All in all JOGL (jogamp) is more fully-featured than LWJGL 3, but somehow feels more heavyweight in use.

Interesting. This is basically the opposite of what I normally hear. The holy wars continue, I suppose...
16  Java Game APIs & Engines / Java 2D / Re: Approaches to active rendering with no libraries on: 2015-06-17 12:48:21
Keep in mind that Java2D/AWT/Swing are now deprecated

Bwah? Do you have an "official" source for this? I know JavaFX is the supposedly preferred UI library, but *deprecated* is a strong word.
17  Java Game APIs & Engines / OpenGL Development / Re: Mixing LWJGL and AWT JPanel on: 2015-06-17 12:44:34
Now im wondering which Library I should use, LWJGL or JOGL.
What are the advantages of using LWJGL rather than JOGL ?

What has your research shown you? Have you tried creating a little example project in both so you can understand the differences?

That might sound flippant, but the advantages and disadvantages are really up to you: what your personal preferences are, what you've coded in before, how "close to the metal" you want to be, etc. We can't tell you which to use, just like we can't tell you what to eat for dinner. (mashed potatoes)

In a broad sense, JOGL is a Java wrapper of OpenGL. It provides a pretty one-to-one mapping from Java functions to the underlying native functions. If you want to program in "pure" OpenGL, then this is as close as you're going to get. LWJGL also contains a Java wrapper of OpenGL, but it also provides a bunch of other features specific for game development. It's a little "higher level" than JOGL.

You might also consider libGDX, which is built on top of LWJGL and contains even more features for game development- including the ability to export as JavaScript or as a mobile app, the usefulness of which cannot be understated.
18  Discussions / Business and Project Management Discussions / Re: Android publishing problem, need a helping hand on: 2015-06-15 18:37:38
I really didn't make the game for the money, I don't really care about it that much, but I do have hundreds of working hours in it, weeks of hard work that I just don't want to see it being thrown out of the window.

If you don't care about money, you might consider just hosting the APK file somewhere.

Shameless self-promotion: I offer free hosting for Android APKs at Static Void Games.

You might also consider using Amazon's Android store instead of the Google Play store.
19  Java Game APIs & Engines / OpenGL Development / Re: Mixing LWJGL and AWT JPanel on: 2015-06-15 13:55:51
You'll have much better luck if you post some example code that demonstrates the problem in the form of an MCVE.
20  Discussions / Business and Project Management Discussions / Re: New Team! T.H.E.Tritonn looking for Members on: 2015-06-15 13:54:35
Here is a list of similar posts I found just by using the word "team" in the forum search box. I'm sure you could find more if you tried. These might be a good place to start looking for collaborators:

You also might have better luck if you post *your* qualifications. What teams have you organized and led in the past? Do you have a portfolio of completed projects we can check out?
21  Discussions / General Discussions / Re: Are algorithms helpful in game programming? on: 2015-06-15 13:35:25
So I just wanted to know how useful these are in game programming, it would be helpful if someone could give an in game example as it will motivate me

This question is pretty broad, since the term "algorithm" is itself pretty broad. An algorithm is just a set of steps to solve a particular problem, which can describe pretty much any computer program. Substitute in the term "approach" instead of "algorithm" and you'll see how huge a question like "are approaches helpful in game programming?"

Of course they are. Game development, and programming in general, is the process of creating your own approach to a problem by combining approaches that have been implemented in the past.

Your book probably goes through some of the more famous algorithms, but what it's really trying to teach you is how to break a problem down into multiple steps and then think about each of those steps in terms of efficiency trade-offs. If you're planning on being a programmer, that's pretty much what you'll be doing for the rest of your life.

Now, you can debate how useful it is to get into the nitty-gritty, like which sorting algorithm is best- after all, you'll probably just use Collections.sort() instead of implementing your own sorting algorithm. But the *process* of thinking about the trade-offs of different approaches *is* useful, and that's what the book is trying to teach you. It's not really trying to teach you those algorithms (although that's part of the process). It's trying to teach you how to think about algorithms in general. And that's the part that's useful.
22  Game Development / Newbie & Debugging Questions / Re: Best way to save game for a Dungeon Crawler? on: 2015-06-10 13:32:34
Interesting choice. Using JSON isn't really any different from using a basic text file. It also requires you to introduce a dependency into your project. Serialization handles loading for you, and it comes out of the box with Java. I don't see a benefit to using json here, unless you want this to work with JavaScript or be human-readable.

I mean I don't really have a preference here, but I'm surprised you chose JSON if your goal was to write the least amount of extra code.

If you do really want to use JSON, try googling "convert JSON to Java bean" for libraries that do the loading for you. Similarly, you could use XML and something like JAXB.

Or you could just use serialization. Here are some decent examples on reading and writing serialized Objects.
23  Game Development / Newbie & Debugging Questions / Re: Best way to save game for a Dungeon Crawler? on: 2015-06-09 13:12:45
This is really up to you and what you define as "best". Every approach has its own pros and cons, so there is no single *best* solution. Do you care a lot about file size? Do you want the saves to be accessible over multiple devices? Do you want the player to be able to "hack" the save states? Or maybe you want to prevent that? Do you need this to work in JavaScript as well?

If you're just going for the simplest in terms of the fewest lines of code you need to write, you might want to google "Java serialization" for a ton of results.
24  Game Development / Newbie & Debugging Questions / Re: Libgdx 3D Optimize?? on: 2015-06-03 13:03:47
You're going to have much better luck if you can boil your problem down to a more specific question and a smaller piece of code- preferably an MCVE.

What profiling have you done? What kind of performance are you expecting? What kind of performance are you getting instead? Not just your FPS, but in specific parts of the code. Is a specific line taking longer than you expect it to?

It's hard to debug your entire project and offer broad statements. It's much easier to look at specific standalone pieces of example code and comment on those instead.
25  Game Development / Performance Tuning / Re: Did the Java designers just not care? on: 2015-06-03 12:53:33
BurntPizza already covered it, but let me expand: how would your "index foreach" work on data structures that have no concept of indexes? How would they work on a Set, for example? What about data structures where get(index) is much less efficient than an iterator, such as linked lists?

The Iterator approach allows us to "foreach" over custom classes just by implementing Iterable. With your approach, we'd have to implement a get(index), which doesn't make sense for every (or even most?) data structures.

Besides that, nothing is forcing you to use the "enhanced for" shortcut. If you really need to iterate over your data structure by index, then you can still do that.

I assure you that the developers of Java have put more thought into this than any of us have. What exactly are you saying is the downside? What profiling have you done? What is the alternative?

To get a better understanding of the considerations that go into these kinds of decisions, I recommend Program Development in Java by Barbara Liskov, or really any of the books she's written on API design, abstraction, and substitutability.
26  Discussions / Miscellaneous Topics / Re: What is your opinion about ... on: 2015-06-01 16:52:01
Frankly, I hoped somebody will try DDJ to run and play... No matter.

Yeah, like I said- it's pretty hard to form an opinion without concrete examples and tutorials.

Also, I wonder why every forum's answer to "what do you think of XYZ for ABC" type questions is to say "here's how I do ABC" instead of talking about XYZ at all, haha....
27  Discussions / General Discussions / Re: Making a wiki about voxel games on: 2015-06-01 13:06:57
Like they said, this is really up to you. I'm not really sure what kind of input you're hoping to get from us.

I will say that writing tutorials is hard work. Maybe try writing a few of the tutorials first, just to see if it's something you want to continue pursuing.

Also, if you're expecting other people to jump on board and do the work for you, don't hold your breath. If it sounds fun to you, then go for it, but know that it's going to be mostly just you doing the work.

You might also check out the various sites that pay you for writing tutorials.
28  Game Development / Newbie & Debugging Questions / Re: Efficient Collision detection on: 2015-06-01 12:59:51
Lol - you say that as if what was suggested was rocket science Cheesy

Bwah? You seem to be attributing an argument to me that I am not putting forth. OP asked about collision detection. I told them to check out quadtrees or existing libraries. That's about it.

The OP asked about finding collisions so I suggested something simple which effectively eliminated the cost of that, of course trading off against extra cost when moving objects around. Other ways are just balancing that trade-off at different points and, i imagine, the "best" in any given situation will depend on more characteristics of the specific application than we know here.

At no point did I say your solution was incorrect or even inefficient. I'm leaving that to other people. :p

To simply state it's a "solved problem" because there's a broadly suitable algorithm with a fancy name and a wikipedia page seems like closing down a potentially useful discussion.

My only point was that other people have come up with solutions that are worth checking out before the OP tries to optimize a nested for loop. I'm not sure what your argument against that is, since all I'm saying is that quadtrees are worth googling.

You seem to be taking my statements as a personal argument against your idea, when in fact I don't have any strong opinions about your idea at all.
29  Game Development / Newbie & Debugging Questions / Re: Efficient Collision detection on: 2015-06-01 01:56:38
Nope, sorry. I refuse to believe the best solution's been found to *any* problem let alone stuff that mankind's only been mulling over 10 or 20 years!

The world always needs new wheel designs Cheesy

I didn't say we found the best solution. I said we've found a solution.

The first step to coming up with a better solution is to understand how existing solutions work.
30  Game Development / Newbie & Debugging Questions / Re: Efficient Collision detection on: 2015-05-31 17:54:53
This is a solved problem. Like BurntPizza mentioned, the go-to solution is to use a quadtree.

The basic idea is that you should only check for collision between objects that you know are close together. No sense checking for collision between an obstacle in China and a player in Brazil.

If a quadtree sounds complicated, then you can use the same idea but in a simpler implementation. A 2D grid system, for example.

Or you can stop reinventing the wheel and use something like JBox2D, which does physics and collision for you. It also comes as a part of libGDX.
Pages: [1] 2 3 ... 31
Za\'Anzabar (17 views)
2015-06-29 05:44:54

TritonDreyja (34 views)
2015-06-24 17:10:40

CopyableCougar4 (29 views)
2015-06-23 00:34:45

BurntPizza (32 views)
2015-06-21 20:36:46

cookiecompiler (77 views)
2015-06-11 15:42:53

cookiecompiler (39 views)
2015-06-11 15:41:14

NegativeZero (66 views)
2015-06-11 09:49:18

Fairy Tailz (89 views)
2015-06-11 01:59:47

chrislo27 (61 views)
2015-06-06 18:12:44

Burnsalan20 (74 views)
2015-06-05 03:00:51
How Do I Expand My Game?
by bashfrog
2015-06-14 11:34:43

List of Learning Resources
by PocketCrafter7
2015-05-31 05:37:30

Intersection Methods
by Roquen
2015-05-29 08:19:33

List of Learning Resources
by SilverTiger
2015-05-05 10:20:32

How to: JGO Wiki
by Mac70
2015-02-17 20:56:16

2D Dynamic Lighting
by ThePixelPony
2015-01-01 20:25:42

How do I start Java Game Development?
by gouessej
2014-12-27 19:41:21

Resources for WIP games
by kpars
2014-12-18 10:26:14 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!