Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (690)
Games in Android Showcase (201)
games submitted by our members
Games in WIP (764)
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 ... 36
1  Game Development / Newbie & Debugging Questions / Re: Point changing for some reason on: 2016-09-27 12:33:59
Heh, no problem. I like a simpler example anyway:

public class ReferenceTest{
   public static void main(String... args){
      Integer i = 1;

   public static void change(Integer i){
      i = 2;
2  Game Development / Newbie & Debugging Questions / Re: Point changing for some reason on: 2016-09-27 12:07:21
@Phased: You never actually called the test() function. I think you meant something more like this:

public static void main(String[] args) {
   MyObject ref = new MyObject();
   ref.a = "nope, not pass by reference";
   System.out.println(ref.a); //if pass by reference, this should print out "yep, pass by reference"

public static void test(MyObject ref) {
   ref = new MyObject();
   ref.a = "yep, pass by reference";

Note that the test() function also has to be made static to be called from the main() method.
3  Game Development / Newbie & Debugging Questions / Re: Advice request - Player Movement on: 2016-09-26 14:42:06
Are you using a framework like libGDX? Have you considered using a physics engine?
4  Game Development / Game Play & Game Design / Re: Need more challenges on: 2016-09-26 12:43:46
You haven't really told us about the games you're already doing, so it's a bit hard to tell you what the next step should be.

More generally, it's a little hard to tell you what to do at all: it's a little bit like an artist telling us that they're bored of painting and asking what they should do next. Or a chef asking what they should make for dinner. We can tell you what we would do, but chances are that's not really going to help you. Then again, I know that part of the fun of this forum is just chatting about programming, so I digress.

I'll say this: think outside games. Instead of focusing on games, maybe spruce up the website your games are on (you have one of those, right?). Or look into data visualization, or something more artistic like creative coding. Or make an application, or a video or photo editor, or... the possibilities are endless.

You might also think about trying out different frameworks. If you're an expert in Java2D, try libGDX. Or Processing. Or something else entirely.
5  Game Development / Newbie & Debugging Questions / Re: Object Oriented Game Programming on: 2016-09-23 14:13:29
So, I guess my question is, how exactly do I make 'proper' games,

Practice. Keep programming. The only way to learn how to code is by coding. Start small, and give yourself goals to work towards more complicated topics.

Instead of working on entire games, work on smaller "proof of concept" games (which might not even feel like games). For example, if you want to learn about artificial intelligence, start with something very small: The Game of Nim and Mastermind are good examples of where to start. Then work your way up to Tic-Tac-Toe, then Battleship, then checkers, etc. Start smaller than you think is interesting, and take small steps. This process is going to take a long time (think months or years, not days or weeks), so enjoy the process of learning without worrying too much about making it big or being like Notch (he programmed a ton of small games for years before releasing Minecraft).

what are the mandatory rules and restrictions for programming,

There aren't any mandatory rules, other than what the compiler complains at you about. The most important thing you can do right now is get something working. Then get something else working. Repeat that process over and over again. Anything you write now will look like garbage to you in six months, and that's completely normal. It means you're improving. But it also means that you shouldn't waste too much time worrying about getting everything right. Just get it working, then move on to the next step.

and what is the theory behind it all? By this I mean, what is the process of level systems, artificial intelligence, how to implement sfx, proper cut-scenes and animations -

This is a complicated question. There isn't one theory behind everything. In fact, one of the things that makes programming so fun (and frustrating) is that there are usually a million ways to do any single thing. What's right for one programmer probably won't be right for you. You have to try stuff out and see what fits into your brain the best, then go with that. You're going to end up writing about a million Hello World applications to test out different languages, frameworks, algorithms, approaches, etc. Get comfortable with that. The answer to "which way is better, X or Y" is to try both X and Y and see which you like best.

all the things that one would be expected to know before diving right in and making games?

You don't have to know anything, as long as you start small. Think Pong instead of Mario. This might seem smaller than you think is interesting, but you aren't going to get anywhere if you try to dive in an be at Notch's level right away (again, this process will take months or years, not days or weeks). You learn most of this stuff by experience, and the only way to get that experience is by working on smaller projects until you're more comfortable with larger ones.

We're all on this exact same journey. Good luck.
6  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Starting game development, need guidance? on: 2016-09-15 13:44:43
The only way to find out which library you should use is to try out a few different libraries and see what you like best.

LibGDX is great, but you have to be pretty comfortable with programming, OOP, IDE setup, and looking up documentation and tutorials.

I also really like Processing, especially if you're just starting out.

Just try a few things out and see what you like. Put together a little Hello World application, and feel free to ask specific questions if you get stuck. Good luck.
7  Discussions / Miscellaneous Topics / Re: Back to JGO =D on: 2016-09-14 16:44:44
If you had waited two weeks it would have been exactly a year.

(I just looked at your post history, I am not a creeper!)
8  Game Development / Networking & Multiplayer / Re: Why Threads for the Client on the Server? on: 2016-09-13 12:50:22
When I am checking some Online Game Sources I nearly always see that the Server is listening for CLients and for each(sic!) one it makes an own Thread.... Why

Let's say you and I are both users. I've taken an action that takes a long time (maybe I'm uploading a video). You want to do something that doesn't take a long time (like refresh the homepage). Should you really have to wait for my video to finish uploading to see the homepage refreshed?

What would you now suggest how to implement it on the Serverside? Assuming <100 Clients.
Just one Thread per Client or something else? Better use a CachedThreadpool for that?

There isn't one single answer. It's going to depend on exactly your context and requirements.

But most frameworks handle threading themselves, so the smartest thing to do is probably just let somebody else do the work for you.
9  Game Development / Newbie & Debugging Questions / Re: Dark and lighter areas on: 2016-09-06 16:54:33
Would you use a lightmap texture and put this into a framebuffer and use some form of shader on the light map?

What happened when you put together a little example program to test that out?

Simplest way: just create an image with a circle that starts out as transparent and fades to fully opaque. Overlay that wherever you have a light, that way stuff further away from the light is darker.

Less simple: Implement a (or better yet, use an existing) light system. Google something like "2d game light system" for a ton of results. I personally like Box2DLights.
10  Game Development / Newbie & Debugging Questions / Re: Level Design And "Level Data" file formats on: 2016-09-06 14:17:03
This is going to depend on so many things, and it's going to be more up to what fits into your brain instead of what other people think you should do.

Some common approaches are:

Use a grid. Think of Pac-Man (where the level and the player are both on a grid) , or Mario (where the level is on a grid and the player is "on top" of the grid). This also works for top-down games like Pokemon.

Use level objects. Think of how 2D physics-based games work, where the level is composed of different shapes put together. The player itself is just another shape that interacts with those other shapes. This is pretty easy if you're using a physics engine.

Use pixel-perfect terrain. Think of how a game like Worms works, where you can blow holes into the terrain. A lot of novices go this route because it seems simple: you "just" make a grid where each cell is a pixel, and then you "just" use boolean values to represent whether that pixel has terrain there or not. This might sound simple, but it's very processor-intensive and is overkill for a lot of games.

Use vectors. If you can translate your game into a series of lines, then you just need to do collision against those lines. You could go simpler and just use the height of a single line at a time. A lot of infinite runners go this route.

These are just off the top of my head, and there are probably a ton of other options. There isn't a single best approach, especially for something as broad as translating physical art into game data. I suppose you could write a program that takes a scan of the art and outputs a data file, but again, that's going to depend on so many things: What does the art look like? Is it black and white, or colored? What do those colors mean? What type of level design are you going for (grid, pixel-perfect, something else)? How are you rendering all of this? (You don't actually have to answer any of these questions, but they are what you should be asking yourself.)
11  Game Development / Newbie & Debugging Questions / Re: libgdx - UI scrollPane issue on: 2016-09-01 18:11:41
Can you post some example code that we can run, preferably as an MCVE?

Otherwise it's going to be pretty hard to help you debug code we can't run ourselves.
12  Discussions / General Discussions / Re: Bug - Search pages not working on: 2016-09-01 17:03:08
Yep, I just noticed the same thing!
13  Discussions / General Discussions / Re: JGO App on: 2016-08-31 15:15:26
This comes up pretty often, so you might want to use the search to find similar topics.

I can't seem to navigate to page 2 of the search (re: @Riven), so here are two just from the first page:
14  Discussions / General Discussions / Re: Power law and game sales on: 2016-08-31 14:49:57
I have been looking into selling my games on steam but the idea of selling 100 copies would be a bit depressing.

If you sell 100 copies, you're in the most successful 1%.

As you alluded to in your post, this is not specific to game development or software. The "bottom" 99% of artists never make a dime. The bottom 99% of musicians never sell a single song. Most business go out of business, and most actors never get a single role. This is true of everything.

Whether you let the discourage you or not is completely up to you. I will say that if you're only in it to make money, you're setting yourself up for disappointment.

See also:
15  Game Development / Newbie & Debugging Questions / Re: Fluidity Of The Simple Pong game on: 2016-02-13 23:57:09
Can you post your code, preferably as an MCVE?
16  Game Development / Newbie & Debugging Questions / Re: Box2dlights on: 2016-02-12 14:18:10
I don't think you need box2d bodies to use box2dlights. Why don't you just try something out and see what happens?
17  Discussions / General Discussions / Re: Oracle kills webstart on: 2016-01-30 00:05:52
Yes, the reply by your overlord.

Haha fair enough.

I just wanted to make sure, because killing applets isn't really a big deal, since existing applications can pretty easily just move to Web Start. If Web Start is being killed, that's a whole different story.

Just wanted to know how much of a panic I should incite at my day job on Monday morning...
18  Discussions / General Discussions / Re: Oracle kills webstart on: 2016-01-29 20:51:22
I don't understand how this is "Oracle kills webstart" at all. From the "article":

With modern browser vendors working to restrict and reduce plugin support in their products, developers of applications that rely on the Java browser plugin need to consider alternative options such as migrating from Java Applets (which rely on a browser plugin) to the plugin-free Java Web Start technology.

It sounds like Oracle is simply saying that people should migrate from Applets to Web Start, which isn't news to anybody. The news is that applets will be deprecated in Java 9.

Am I missing something?
19  Game Development / Game Play & Game Design / Re: Is a Binaural Sound Engine in Java possible? on: 2015-12-26 20:01:37
Is a Binaural Sound Engine in Java possible?

Short answer: Yup, and google is your friend. Have you looked into any Java sound libraries at all yet?

I know that the minim sound library supports this. I'm pretty sure libGDX does as well.
20  Discussions / Miscellaneous Topics / Re: Looking for a old wipeout-like game on: 2015-12-25 05:13:38
Reminds me of F-Zero X?

<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>
21  Game Development / Newbie & Debugging Questions / Re: String processor? on: 2015-11-30 19:50:47
"String processing" is indeed very wide- are we talking about parsing xml? Taking commands from a user? Setting up properties? Natural language processing? Generating in-game dialogue? Something else?

Even "use regular expressions" is pretty wide.

We need to know more information from OP: what kinds of Strings are you trying to "process"? Exactly what do you want to happen? What have you tried so far?
22  Discussions / Miscellaneous Topics / Re: How to disable the DOTA game on my LAN? on: 2015-11-30 13:21:55
How old are you?

Back when I was in college (I'm American, so I guess I mean "back when I was at university"), I had a group of friends who played dota and WoW ALL THE TIME. It's all they talked about. The only friends they seemed to make were from the game. They would play instead of studying or doing homework. Your brother sounds a lot like them.

But here's the thing: most of those people now have successful careers, wives, houses, kids, etc. They're doing fine.

So I maybe wouldn't worry too much about it. If you're really that worried about it, try to invite him to some of your social activities.

But it sounds more like you're annoyed with the noise he makes while he's playing- maybe get a nice pair of earphones for yourself? Or a nerf gun you can shoot him with when he's being too loud?

If you really want to try blocking dota, just go to the settings page for your router...
23  Discussions / General Discussions / Re: SMF is falling apart. on: 2015-11-17 13:22:34
But I like the medals system, and the outdated feel to the forum is charming Cry
Also, if you upgrade the forum, you'll probably loose allot of the classic posts (Minecraft, WIDT, Game Jams being some of them...)

I don't have a horse in this race, and I'm not really arguing for anything in particular. Just pointing out the option.

But Discourse already has a built-in medal system (which would replace our social rankings), for which you can add custom queries (so we wouldn't lose our social rankings). You can also like posts, which is pretty much what our medal system is (so we wouldn't lose the medals). (And some simple css could probably change the heart to a medal if people really hate the "like" system.)

And those classic posts would be saved if the forum was imported into Discourse.

Like I said, I don't really have a horse in this race. And maybe this thread isn't really the place to talk about Discourse (chit chat monster, here we come!). Just mentioning an option.
24  Discussions / General Discussions / Re: SMF is falling apart. on: 2015-11-17 13:02:31
Another option is to switch over to Discourse. It's an open-source forum software developed ("for the next 10 years of the internet") by some of the same people who created Stack Overflow. I really like it, and it's very actively developed.

They include methods for importing existing forums into a Discourse site. That would probably be a lot of work up front, but then you could sit back and enjoy new features as they roll them out.

I would guess that Riven won't feel like going this route, but it's an option.
25  Discussions / General Discussions / Re: libGDX Jam on: 2015-11-04 15:15:31
I don't have an account- is there a way for me to participate without creating one? Can I host my game elsewhere?

I assume that all of the code should be written during the jam- is there any way to enforce that?

When you say 3rd party assets, does that include art and music created before the jam?

Anyway, this sounds fun! I'm in!
26  Discussions / General Discussions / Re: JGO IDE Survey on: 2015-10-30 12:42:49
This has already been discussed at great length here.

IDEs are like tools. You use different tools for different jobs. Asking which IDE is best is like asking whether a hammer or a saw is best. It depends on the job.

Novices, imho, should start out with something simple like JEdit and the command prompt. Then move on to something like JCreator. Advanced users can probably use eclipse or netbeans or intellij or Android studio just fine, just like an advanced carpenter can probably use both a hammer and a saw just fine. That doesn't mean any one of those is better or worse than the others- just that they're different tools for different jobs. The rest comes down to personal preference.

Also, you forgot "no IDE" and JCreator as options.
27  Game Development / Performance Tuning / Re: Storing entity state in Map<String,Object> on: 2015-10-30 12:34:54
No need to guess. Why don't you just look at the source for String.hashCode()?

    public int hashCode() {
        int h = hash;
        if (h == 0 && value.length > 0) {
            char val[] = value;

            for (int i = 0; i < value.length; i++) {
                h = 31 * h + val[i];
            hash = h;
        return h;

So yes, it does appear that String stores its hash after the first time it's calculated.

But the best way to answer this question is by doing some benchmarking with your actual use case. What are the exact Strings? How many are there? What are the Objects? What's the load factor of your HashMap? How many entries does it have?

I would guess that this is a non-issue and you're suffering from premature optimization. Don't sweat the small stuff.
28  Discussions / Miscellaneous Topics / Re: pack multiple files into one in java on: 2015-10-29 20:40:23
...why don't you just recreate the zip file then?

Here is code that does it for you. It was the first result for googling "java add file to zip".
29  Game Development / Newbie & Debugging Questions / Re: Superclass to subclass (I think) on: 2015-10-29 12:56:08
Why are the different player types subclasses of Player?

I would just make that an attribute of the Player class. Something like this:

public class Player{
   enum PlayerClass{

   PlayerClass myClass;

   public void setPlayerClass(PlayerClass pc){
      myClass = pc;
      //maybe set other attributes that depend on class?

In other words, favor composition over inheritance.
30  Games Center / Showcase / Re: Random Big Rich Man on: 2015-10-23 22:10:34
you might not want to publicly post toy projects like this one

I absolutely disagree with this. I think people should post as much as they feel like. We should encourage that, not tell people not to post.

movep: Good work man, this looks good. I'd be curious to see more screenshots of the game being played. Now you just have to make the pieces into avatars that people can buy hats for, and you'll be a millionaire! :p
Pages: [1] 2 3 ... 36
xTheGamerPlayz (78 views)
2016-09-26 21:26:27

Wave Propagation (277 views)
2016-09-20 13:29:55

steveyg90 (390 views)
2016-09-15 20:41:23

steveyg90 (390 views)
2016-09-15 20:13:52

steveyg90 (430 views)
2016-09-14 14:44:42

steveyg90 (454 views)
2016-09-14 14:42:13

theagentd (465 views)
2016-09-12 16:57:14

theagentd (397 views)
2016-09-12 14:18:31

theagentd (302 views)
2016-09-12 14:14:46

Nihilhis (734 views)
2016-09-01 13:36:54
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!