Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
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 ... 7
1  Discussions / General Discussions / Re: Publishing my game on: 2014-04-19 03:09:42
It's actually 30% cut of the price. Don't forget the initial one time payment to Google to be an application publisher. Even at that, it's still a bargain. For the 30% "loss" per sale you gain a reliable host, a payment processor, an analytics provider, and a trusted and easy way to get your application on a users phone. The other option is to pay a recurring fee for hosting whether the application sells or not, deal with the headache of keeping track of financial laws and transactions, and hoping users are technical enough and trust you enough to "side load" an unknown application on a device that contains a myriad of personal data.
2  Game Development / Newbie & Debugging Questions / Re: Mouse Coords in a tiled world. on: 2014-04-16 01:59:32
Are you doing any sort of scaling when you render that you haven't accounted for when calculating your mouse/world position?
3  Discussions / General Discussions / Re: Rendering a 2.5D game on: 2014-04-14 20:44:23
Ah, hadn't caught that from your post. For standard perspective projections, you're looking at using a "true" 3D calculations. Should still be doable with sprites as opposed to full models, but somebody more experienced with 3D will have to fill in the blanks. My knowledge in that area is quite limited. persecutioncomplex
4  Discussions / General Discussions / Re: Rendering a 2.5D game on: 2014-04-14 18:22:48
The term you're looking for is isometric and there are a few different ways to achieve the effect depending on the look you want to achieve. Try giving this thread a read over for some of the basics. This article also touches on a lot of the concepts and issues with isometric engines. A Google search for "2D isometric rendering" will bring up a nice selection of results to get you started as well. Smiley
5  Game Development / Game Mechanics / Re: Mathematical curves. on: 2014-04-12 18:16:46
Robert Penner seems to be the big cheese when it comes to easing equations. His page has links to both of the pages posted by pjt33 as well as a few others. This one is a rather good presentation (space bar advances the slides). I think it was the biggest help when implementing my easing library in Java. One tip: Easing functions become a lot simpler when you realize that they only need one passed parameter (as illustrated here) to make the easings work, namely percentage complete. Something along the lines of:

public float myEaseOut(float percentcomplete) {
    return (1.0f - (percentcomplete * percentcomplete));

public float myEaseIn(float percentcomplete) {
    return percentcomplete * percentcomplete;

It takes a bit of deduction at times, but pretty much any easing formula can be made to fit the same basic method signature. From there it's fairly straightforward to construct a modular easing library.
6  Game Development / Newbie & Debugging Questions / Re: Reading/Writing JSON Constantly on: 2014-04-11 15:49:32
...but shouldnt I really use JSON? Will thrre be performance issues later on using this over XML or CSV or something?

There's an old saying about premature optimization. If JSON is working for you, then stick with it. If you've structured your code correctly, then all access to the JSON functionality should be abstracted through your SaveSystem class. If JSON stops being a good fit for your game down the road, you're free to change the internal implementation of SaveSystem to another technology with minimal (if any) impact on the other classes in your game. Pointing
7  Discussions / General Discussions / Re: The Big Linux Distro Thread on: 2014-04-05 03:08:23
Don't try to rush it. There are instructions on the site that tell you how to get back to the chroot environment after a shutdown. Pretty much just resetting a couple environment variables, some remounting of partitions, then the chroot itself. I did my first build over the course of a few days using VirtualBox and never had problems getting back to where I was in the build process.
8  Discussions / General Discussions / Re: The Big Linux Distro Thread on: 2014-04-04 15:59:30
... Arch sounds like an interesting concept, though I have my beady eye on an exercise in self-flagellation called "Linux From Scratch".

I compiled/ran a LFS system on three separate occasions. It was definitely a learning experience. Things tend to go fairly smoothly so long as you stick to the exact versions of the libraries and applications listed on the site. It can get frustrating when you hit a compilation/configuration error, but a little persistence with Google will usually get you past most roadblocks. Proceeding from LFS to BLFS is where the true frustration begins with partial instructions and dependency hell becoming more frequent. Tongue

I would say Arch is probably the closest to the LFS philosophy of "install only what you want to" without making you compile everything yourself. Reading through the Arch wiki pages also feels a lot like reading through the LFS site. Both provide fairly good descriptions of packages and detailed instructions on how to get things configured.
9  Game Development / Newbie & Debugging Questions / Re: Why a NaN variable is not equal to Double.NaN? on: 2014-04-02 18:25:30
The reason that Cas dragged SQL into the discussion, is that in SQL, NULL pretty much behaves like NaN in Java.

Indeed, and the point is valid. I was just discussing the reasoning behind the Java devs choice to implement Nan as they did. When it comes to SQL implementation, that's something directed by a body external to Oracle so there isn't really a real choice of implementation in that instance.

I guess the best way I can describe my thinking on it is this: Null completely defines what something is whereas Nan partially defines what something isn't. It's an interesting discussion either way; I can't say I've ever given much thought to the reasoning behind the implementation until now. It reminds me of this video discussing the foibles in various language implementations. Smiley
10  Game Development / Newbie & Debugging Questions / Re: Why a NaN variable is not equal to Double.NaN? on: 2014-04-02 16:47:59
You know that a == b, but what is your guarantee that a and b are usable values for a mathematical operation if NAN == NAN without the extra check mentioned earlier (!isNAN(a))? I think that's the point Roquen is trying to make.

Also consider that Null is indicative of a single state, so Null == Null makes sense. Without this becoming a discussion of Jean-Paul Sartre, nothing should always equal nothing. Nan indicates that there is a value being pointed to, but it's not the type of value that we can work with. If I have a box of items that are not apples, does that mean that everything in that box is the same item, or could I have varying items in the box whose only similarity is that they're not apples? Wink

Damn, philosophy and code before caffeine is going to make my head hurt. LOL
11  Game Development / Newbie & Debugging Questions / Re: Why a NaN variable is not equal to Double.NaN? on: 2014-04-02 15:55:51
I must be being dense but I still don't follow that.

Cas Smiley

While I lean towards your viewpoint Princec, I do understand Roquen's example after thinking about it for a moment.

If a == NAN, b == NAN, and NAN == NAN, then you would need the extra check in the example given. While a would equal b, neither a nor b would be guaranteed to be valid numbers within the scope of the if statement, thus the extra check for !isNAN.

I would think a more "Java-centric" approach would have been a "NAN exception", but I imagine the extra overhead of the implementation would have a larger impact on performance than one might initially think.

Just my $0.02. Huh
12  Discussions / General Discussions / Re: full screen with changed resolution on: 2014-01-28 18:54:51
Have you tried using another resolution such as 800x600 with the DirectDraw pipeline enabled? What happens if you use the following command line:
java -jar -Dsun.java2d.noddraw=true -Dsun.java2d.opengl=True AlienSwarm.jar FULLSCREEN

Are there any useful error messages dumped to the output console when the application is run from the command line? Oracle has a few other suggestions you can try to see what the issue may be.

It could be that your video drivers or monitor don't support that low of a resolution as well. Windows versions since XP have only officially supported resolutions of 800x600 on up.
13  Discussions / General Discussions / Re: Keyboard spill! :D on: 2014-01-13 16:25:21
My ex father-in-law used to rehabilitate old donated computers for a local charity organization. He used to use good old Isopropyl rubbing alcohol. It was strong enough to clean out a majority of the gunk without being so strong as to damage the coatings on the internal circuit boards and such. As a bonus, dry times should be at most a day (or two if you want to be on the safe side).

Since you've already submerged yours in water, you may want to try using a hair dryer on a low heat setting to help speed the drying process up and help get the moisture out of the nooks and crannies.
14  Game Development / Newbie & Debugging Questions / Re: getX() inaccurate for mouselistener? on: 2014-01-07 20:10:56
So I'm using a pretty standard JPanel design for my game. I'm trying to test out using mouselisteners, but the getX() and getY() methods both seem to return inaccurate coordinates. When I draw a test string out on the screen at say, (100,100), and then click the on the area around the string, the getX and getY is returning values almost 100 pixels larger than what it should be. Does anyone know what I'm doing wrong exactly? I'll post some code.

Are you sure it's not due to your scaling? Have you tried applying the scaling factor to the mouse coordinates obtained by the mouseClicked() event or conversely have you tried removing the scaling in the drawToScreen() method as a test to see if the co-ordinates line up?
15  Game Development / Newbie & Debugging Questions / Re: Different stats on the same Array? on: 2014-01-03 18:31:37
What Riven said. In this case, each time you add your SWORD item to the array, you're not creating a new instance, you're just pointing the array element at the single instance of SWORD that you've already created. You could approach this from a few different angles. For example you could just make a new ID for each sword type that you need:
public static final Items SWORD = new ToolsSword(10, 12);
public static final Items SWIFTSWORD = new ToolsSword(8, 24);

You could use the factory pattern to create instances of ToolsSword objects that have the desired characteristics, or similarly (though less desirably) you could just create new instances of ToolsSword and assign it directly to your array:
Items[x] = new ToolsSword(10,12);
Items[x+1] = new ToolsSword(20, 6);

There are other approaches as well. The choice of which one to implement will depend on how you plan to access/use the Items[] array within your game.
16  Game Development / Newbie & Debugging Questions / Re: Launch another instance of the running application on: 2014-01-03 14:59:07
What about Runtime.getRuntime().exec(...)?
17  Game Development / Newbie & Debugging Questions / Re: blurry image - java slick2d on: 2013-12-23 05:58:07
There seems to be multiple ways to tackle Slick's lack of MipMaps. A couple are discussed here and here.

Only four commits this year, and still lots of outstanding bugs. Compared to LibGDX, which has had 26 commits in the last week. Wink

With that said, it's a nice library. Hats off to kev for all his hard work.

Well if LibGDX wasn't so buggy...Wink OK, I'm just kidding and you do make a valid point about the rate of commits, but I haven't seen any announcement that development on it has been halted. I'll also second your tip of the hat to Kevin for his work on making a truly "slick" 2D library. (I need to lay off the bad jokes and get some sleep. Tongue)
18  Game Development / Newbie & Debugging Questions / Re: blurry image - java slick2d on: 2013-12-22 18:39:37
You probably shouldn't expect a great deal of support for Slick since it isn't actively maintained anymore.

I keep hearing this; however, Slick was updated in June. It just isn't maintained by Kevin anymore. Now it's handled by NinjaCave.
19  Game Development / Newbie & Debugging Questions / Re: blurry image - java slick2d on: 2013-12-22 18:36:56
Here's a slightly modified version of the function from Kevin's old codebase:
public static boolean isGenerateMipmapSupported() {
   return GLContext.getCapabilities().OpenGL14;
20  Game Development / Networking & Multiplayer / Re: Login through a website on: 2013-12-22 16:57:20
Did you try that? I did Smiley

Indeed I have.Smiley

I know this is exaggerated, because you probably don't have 10 users online all day and you might get away with only fetching new messages every 5 / 10 seconds.
If you can live with this, go with it Smiley

That was my point; due to the human interaction that happens in a chat scenario, you can get away with significantly longer delays than you can when dealing with input to the rest of the game engine. When I issue a command to a game, I expect immediate feedback, when I send a message to John or Jane Doe somewhere else in the world, I have an expectation of receiving feedback somewhere between when they get around to it to potentially never. Consider also that most home connections in technological countries can move gigabytes in a matter of a few minutes. Assuming your central server is hosted by a regular provider with a bigger pipe, 216mb a day isn't a significant amount of traffic by any means.

could you show me some source on how i could do that?

Have you mentioned what framework you're developing your game under? Vanilla Java, LWJGL, other? Depending on what you're using, there may already be "drop in" solutions you can use.
21  Game Development / Networking & Multiplayer / Re: Login through a website on: 2013-12-22 15:34:35
You cant with an website, i think you want an response time within seconds from the chat, when you have lets say 10 players, your webpage will be bombed with 10 requests a second. People who visit your site might not even be able to load your page then.

Given the minuscule amount of data involved with text based message, I'm fairly sure even the least optimized web server out there can handle well over 10 requests per second without breaking a sweat, much less grinding to a halt.

You would need an server application on an server keeping sockets open and sending events when needed.

Or you could have a lower priority thread that runs on the client and polls the server via a GET request for new chat messages at a set interval. Web based Ajax chat widgets have been doing this for quite a while and implementing the same in Java is fairly trivial if you already have enough knowledge to develop the client server protocol for your game. In the case of chat, you get a bit of cushion room in the timing department since a small delay in sending or receiving doesn't have a real impact on the game itself.
22  Game Development / Newbie & Debugging Questions / Re: blurry image - java slick2d on: 2013-12-21 18:16:35
Have you considered using Slicks shape and gradient drawing functions to generate the image in question at run time instead of loading it from a preexisting image? It's a little work, but in this particular scenario it could give you the smooth look you want.
23  Game Development / Newbie & Debugging Questions / Re: blurry image - java slick2d on: 2013-12-21 13:12:16
Odd question, but what is the original size of the image? OpenGL (and in turn Slick 2D) can sometimes do odd things behind the scenes with non power of two sized images to get them to work properly with the GPU. If your image isn't a "pot" image, then try padding it with transparent pixels until it is and see if that makes a difference.
24  Game Development / Game Mechanics / Re: Bit of Syntax Confusion on: 2013-12-20 03:57:58
Generics Wildcard type. Was looking into this the other night for a project.
25  Game Development / Game Play & Game Design / Re: Just something to think about while you go about your lives. on: 2013-12-19 19:38:31
For example, let´s say the protagonist is schizofrenic (the real schizofrenic with wierd halucinations and not a split personality) and the levels are episodes from his sickness. He ventures into really cool looking, grand worlds with wierd monsters and outerworldly architecture but during the game you get flashes from the real world.

Although I don't remember the main character wasn't acting out sick fantasies in the real world, the premise you describe sounds a lot like the game Sanitarium. As I recall the fight was more about fighting inner demons to figure out the "truth" behind how you got to where you are and the events leading up to it. While I think that particular game had a "happier" ending, you could very well leverage the same sort of mechanic of discovering the truth to make players reluctant to complete a game, especially if you drop hints that the truth may reveal a horrific revelation about the protagonist. This of course relies on your audience developing a deep empathy with, and attachment to the character before hints about the darker truth start to fall into place.

Another similar take on the idea can be found in the movie Memento. Though it lacks the hallucination aspect, nothing is as it appears to the main character and there is definitely manipulation by a third party going on.
26  Game Development / Newbie & Debugging Questions / Re: Making A Slider Component Problem on: 2013-12-19 17:53:01
That was one of those moments when I smacked myself in the head after I figured out the mistake. Glad to know it worked for you. Have a great one, my friend. Cool
27  Game Development / Newbie & Debugging Questions / Re: Making A Slider Component Problem on: 2013-12-19 17:41:12
Sorry I took a little bit to get back to you. I was getting ready to head out the door to work when I posted my last reply.

This was the idea.
Now, it works for both cases:
But don't you think it's dirty..? Smiley
I believe, now you can maybe see where's the problem.

Yeah, the problem was an elementary mistake on my end. Roll Eyes Try changing your "setValue(...)" method to the following and let me know if it helps.

public void setValue(float newValue) {
        if (this.value != newValue) {
            float multiplier;        
            this.value = Math.min(Math.max(this.minValue, newValue), this.maxValue);    
            multiplier = (this.value-this.MinValue)/(this.maxValue-this.minValue);
            this.percentage = multiplier * 100.0f;
            this.sliderBoxX = Math.round(this.lineX + (this.lineWidth * multiplier) - (this.sliderBoxWidth/2));
28  Game Development / Newbie & Debugging Questions / Re: Making A Slider Component Problem on: 2013-12-19 14:48:06
Hmm, give me a bit of time to get the test harness set up again, and I will see if I can see what's going on with the positioning. Cheesy
29  Game Development / Newbie & Debugging Questions / Re: Making A Slider Component Problem on: 2013-12-19 14:31:59
It sounds like the line position and width variables might not be set correctly whenthe setValue(...) function is called. Huh Try changing the function to the following"
public void setValue(float newValue) {
   if(this.value != newValue) {
      float multiplier;
      System.out.println("Values before recalculation: sliderBoxWidth=" + this.sliderBoxWidth + ", lineWidth=" + this.lineWidth + ", lineX=" + this.lineX);

      // Make sure that these variables are set to the correct value before computing the handle position.
     this.sliderBoxWidth = Math.round(this.height / 2);
      this.lineWidth = Math.round(this.width - this.sliderBoxWidth);
      this.lineX = Math.round(this.x + (this.sliderBoxWidth / 2));
      System.out.println("Values after recalculation: sliderBoxWidth=" + this.sliderBoxWidth + ", lineWidth=" + this.lineWidth + ", lineX=" + this.lineX);

      this.value = Math.min(Math.max(this.minValue, newValue), this.maxValue);
      multiplier = (this.value/this.maxValue);
      this.percentage = multiplier * 100.0f;
      this.sliderBoxX = Math.round(this.lineX + (this.lineWidth * multiplier) - (this.sliderBoxWidth/2));
      // sets a slider value on the text field

This should dump the values to the console so they can be compared.
30  Game Development / Newbie & Debugging Questions / Re: java2d drawImage confusion on: 2013-12-19 03:05:52
as we can clearly see for a start the image is 32 by 32 (I would expect a 64 by 64 square) and it is definitely not  being drawn from {32,32}  {96,96} can someone shed some light on whats going wrong?

According to your posted code, your source area is only 3px x 3px {11,0}->{13,2}. Are you sure you're grabbing the entire area that you think you are? Other than that, the code seems like it's correct.
Pages: [1] 2 3 ... 7

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (38 views)
2014-04-15 18:08:23

BurntPizza (34 views)
2014-04-15 03:46:01

UprightPath (50 views)
2014-04-14 17:39:50

UprightPath (32 views)
2014-04-14 17:35:47

Porlus (49 views)
2014-04-14 15:48:38

tom_mai78101 (71 views)
2014-04-10 04:04:31

BurntPizza (130 views)
2014-04-08 23:06:04

tom_mai78101 (230 views)
2014-04-05 13:34:39

trollwarrior1 (193 views)
2014-04-04 12:06:45

CJLetsGame (200 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30 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!