Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (494)
Games in Android Showcase (114)
games submitted by our members
Games in WIP (563)
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 ... 17
1  Game Development / Newbie & Debugging Questions / Re: LibGDX Problems Loading Skins on: 2014-09-15 17:12:21
Which IDE are you using? (And what IDE? Because that makes a difference for the loading in Desktop but not Android.) It's likely an issue of you only editing the file-system and the IDE not knowing that there was a change (Eclipse is terrible at this.)

As for the other errors? It's because you've download the HTML version of the documents which the .json parser and the .pack parser can't read. It's basically getting an HTML document and going "What is this!?" Anyway, you can solve THAT problem by cloning the repo and copy/pasting directly from it, or viewing the files in their raw form and making sure that they're saving as the right type of document.

Edited because I had a thought two seconds later. xD
2  Game Development / Newbie & Debugging Questions / Re: LibGDX Problems Loading Skins on: 2014-09-15 01:38:53
Some actual code would be useful (Or even the actual error output). If you'd like a working example I can point you towards one of my projects that has one in there.
3  Game Development / Game Mechanics / Re: LIBGDX - Xbox360 Controller joystick conversion on: 2014-09-14 18:36:06
By 'Need only recognize one direction at a time' do you mean that it literally needs just one, so there are no diagonals? If so, then you can use the code that follows (Or something like it). Basically, you have to keep track of both axis that you're worried about and then make decisions off of both of them. In this case, the code ensures a 0 value when it's less than the deadzone to make computations easier. Also, when the joystick's at a perfect 45 it'll always favor the X axis.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
public class SomethingController {
   private Vector2 lastPosition = new Vector2();
   
   // Other garbage
 
   public boolean axisMoved(Controller controllerN, int axisCode, float value) {
      if(axisCode == X_AXIS_CODE) {
         lastPosition.x = Math.abs(value) > joystickDeadZone ? value : 0;
      } else if (axisCode == Y_AXIS_CODE) {
         lastPosition.y = Math.abs(value) > joystickDeadZone ? value : 0;
      }
      if(lastPosition.x == 0 && lastPosition.y == 0) {
         // Handle the 'returned to neutral position'.
     } else if(Math.abs(lastPosition.x) > Math.abs(lastPosition.y)) {
         if(x > 0) {
            // Handle the 'direction left'.
        } else {
            // Handle the 'direction right'.
        }
      } else {
         if(y > 0) {
            // Handle the 'direction up'.
        } else {
            // Handle the 'direction up'.
        }
      }
   }
}
4  Game Development / Newbie & Debugging Questions / Re: Generate map[][] (xTiles&yTiles) vs hard-coding map[][] on: 2014-09-09 01:49:03
Nested loop: for i, for j create cell (i, j, ...)

Do look up looping thingers.
5  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX] Memory leaks are killing me...... on: 2014-09-08 19:07:20
It's dispose() that LibGDX uses. That releases the texture contexts and everything.
6  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-08-31 21:27:31
About 180-225.
7  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-08-30 17:38:44
Mine were about 116 to 130.

As for my system:
Processor: Intel(R) Core(TM) i7-3537U CPU @ 2.00GHz
GFX: AMD Radeon (TM) HD 8500M/8700M (2.1 GB)
Ram: 8.1 GB
8  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-08-29 22:12:51
I went from 56-60 to 60-61. It might just be that I have a fresh install on my computer though. Stupid thing. :\
9  Discussions / General Discussions / Re: Performance Test for the Voxel Thing on: 2014-08-28 14:46:01
I had 58-60 FPS most of the time. However, I also had this happen. I walked 'up' once then 'left' a step at a time until I was close to the building: https://www.dropbox.com/s/88to2rimksmc3jb/rox.png?dl=0

Spec will come up after-- Oh, my AMD video driver crashed. Fantastic. xD
10  Discussions / General Discussions / Re: Errors When Setting Up libGDX Project on: 2014-08-26 23:19:39
If you're using an AV try to add your 'C:\Users\_Valkryst\.gradle' file to its exclusion list.

On a side note, its calling the creation method with --no-daemon and it's the daemon that's crashing. It might be some issue there. Which version of the creation app are you using?
11  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-25 19:03:04
You linked the screen shot, not the game itself! And with a name like 'Dragon' how do you expect us to find you!? We want to play!
12  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-25 18:49:41
Oh, yes! I participated:
http://www.ludumdare.com/compo/ludum-dare-30/?action=preview&uid=10562
13  Games Center / Contests / Re: Ludum Dare 30 (Connected Worlds) on: 2014-08-24 06:56:53
I'm doing pretty well. Honestly, this time I feel considerably better about the state of what I have than any of the previous competitions.
14  Game Development / Game Mechanics / Re: [LibGDX] Edges on 3D models on: 2014-08-18 08:17:08
This is done through a custom shader. LibGDX allows you to specify these. If you look for cel shading online you can find a lot about it.
15  Discussions / Miscellaneous Topics / Re: Abusing the use of letter salutations. on: 2014-08-08 22:20:28
It depends on who the recipient is to you/your organization and the tone of the letter.

If it's a general "I'm sending this out as information to several different people" then the "To whom it may concern" is certainly fine.

If it's a more guided/specific thing like "I'm sending this to inform you about something" then the 'Dear X' or just 'X' would probably be better.

If it's somewhat informal then 'Hi' or 'Hello' would probably work as well.
16  Discussions / General Discussions / Re: If you sell your entire identity to an anonymous buyer for a high price... on: 2014-06-16 05:44:39
So, in my mind this can go two ways:

1) Your name is suddenly in use in a way you weren't expecting it. What follows is you running and attempting to figure out what the person who now legally uses your name is doing. Sort of like an odd, confused identity thing going on.

2) Perhaps something like attempting to track down the person-- after some years-- in an attempt to get your name back? I mean, it depends on what the setting would be, I s'pose.
17  Game Development / Game Play & Game Design / Re: Game control interface for Android phone/tablet games on: 2014-06-01 04:58:48
In libGDX there is also a UI Widget called a TouchPad. It acts like a Joystick.
18  Game Development / Newbie & Debugging Questions / Re: [Libgdx] Screen coordinates -> Isometric world coordinates on: 2014-05-31 19:36:08
Also, if you just need to know which of the tiles, and perhaps which of the objects, has been touched you can do something like give each tile a bounding box and check which the screen ray passes through first. You can also give your entities their own bounding boxes for this. There are many optimizations, such as if you know which tiles are being shown (Such as if you track which of your tiles are being culled during projection).

What you get? If you rotate your screen you use the same method of checking. If you make it a 2.5d game where there is a Z component for objects (Such as hills) you will get the 'higher' tiles if you click on them rather than the tiles behind them.

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
public Tile getTileTouched(float screenX, float screenY) {
   Ray pickRay = camera.getPickRay(screenX, screenY);
   
   Vector3 intersection = new Vector3();
   Tile closestTile = null;
   boolean distance = Float.MAX_NUMBER;
   for(int i = 0; i < tiles.size; i++) {
      if(Intersector.intersectRayBounds(pickRay, tile.get(i).boundingBox, intersection)) {
         if(intersection.dst2(ray.origin) < distance) {
            distance = intersection.dst2(ray.origin);
            closestTile = tile.get(i);
         }
      }
   }
   return closestTile;
}
19  Game Development / Newbie & Debugging Questions / Re: I can no longer get Eclipse to run anymore. on: 2014-05-19 03:25:33
Have you tried turning your computer off and then on?
20  Discussions / Community & Volunteer Projects / Re: game idea: "space wars" on Klein bottle surface? on: 2014-05-18 06:23:06
Okay, let's say you define the world to have two axises. You have the Y axis which is basically the length of the Klein bottle; The part that goes from the inner surface to the outer surface. This axis is basically infinite in that it has no edges. However, it has some length Y0 such that if you travel along for Y0 distance you arrive back at the same spot you started.

Knowing this, then for some object traveling this axis there is some point on the horizon, both in front and behind, where an object on the same axis will appear to be on the surface below the object.

Now, we look at the X axis which is basically the circumference of a cylinder. When two objects are at similar Ys they will have similar Xs (Two objects at the same Y will be able to move on the same X). Objects that are 1/2 Y0 away from each other will be on opposite sides of the surface and inhabit the same X, save being on opposite sides of the Surface.
21  Discussions / Community & Volunteer Projects / Re: game idea: "space wars" on Klein bottle surface? on: 2014-05-18 02:45:53
Aren't old-school game maps (Of the wrapping over head sort) basically these? I'm just saying that you can probably model it by doing positions based off of one of these maps but with some sort of mapping that states that if you're more than 1/4th a map length away on the height/length of the bottle (arbitrary Y axis) then you're on opposite 'sides' of the surface?

Further, the circumfrence surface (Arbitrary X axis) could be controlled by some sort of mapping that adjusts the relative radius of the infinite cylinder.

Of course, this doesn't help if you want to include the wonkiness of the handle if you honestly want the world to be shaped like a klein bottle.
22  Game Development / Newbie & Debugging Questions / Re: Encouraged model file format on: 2014-05-14 20:22:36
What library are you using?

I ask this because libGDX has full support for obj and for FBX (I think on the latter, I know it's one of their primaries) so a bit more information as to what you're doing/using would be helpful.
23  Discussions / General Discussions / Re: Does this look like an okay start to a 3D mobile game? on: 2014-05-12 06:42:46
My only comment is that it's somewhat awkward looking to control since you're using buttons instead of a an analog for 3D motion. Sure you can control that way, but you typically need something to control strafing and the like as well. ^^; Unless you want to make it a 3D tile based movement or something.
24  Discussions / General Discussions / Re: Programmer jokes on: 2014-05-12 02:14:47
Guy 2:
"Oh, you're talking to me?"

Guy 2:
"Oh, you'r e takling to me?"

Guy 1:
"..."

Guy 2:
"Oh, you're talking to me?"

Guy 1:
"Oh, yea h I wa s."

Guy 2:
"..."
25  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-12 01:42:28
Edit: Eep, misread the displayed code!
26  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-12 00:12:02
Try moving the break into the if statement.
27  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-11 20:07:02
To understand what break and continue are doing you have to under the idea of iterations. A loop is a series of iterations which typically do the same thing. In this case, it performs the body of the for, or while, loop until the exit condition is met. Sometimes you want to be able to interrupt the normal execution of a loop so you can use a break, which completely exits the loop, or a continue which starts the next iteration immediately. Let's say you want to do something silly like "Take an int array of length ten and subtract one from each."

You can do:
1  
2  
3  
4  
5  
int[] array = new int[]{10, 1, 0, 1, 2, 5, 7, 2, 3, 4};
for(int i = 0; i < array.length; i++) {
   array[i]  -= 1;
}
System.out.println(array);

This would print out something like: [9, 0, -1, 0, 1, 4, 6, 1, 2, 3]

Let's say you decide what you really want to do is subtract one until you get to a value that's already one, you'd do:
1  
2  
3  
4  
5  
6  
7  
8  
int[] array = new int[]{10, 1, 0, 1, 2, 5, 7, 2, 3, 4};
for(int i = 0; i < array.length; i++) {
   if(array[i] == 0) {
      break;
   }
   array[i]  -= 1;
}
System.out.println(array);

This chunk of code would break at i = 2 and print out something like: [9, 0, 0, 1, 2, 5, 7, 2, 3, 4].

Let's say instead you want to do the subtraction but you don't want any value reduced to a negative number. You'd do:
1  
2  
3  
4  
5  
6  
7  
8  
int[] array = new int[]{10, 1, 0, 1, 2, 5, 7, 2, 3, 4};
for(int i = 0; i < array.length; i++) {
   if(array[i] == 0) {
      continue;
   }
   array[i]  -= 1;
}
System.out.println(array);

This chunk would skip the array -= 1; for i = 2 only (Basically halt the rest of that iteration) but continue the loop and output something like: [9, 0, 0, 0, 1, 4, 6, 1, 2, 3]
28  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-11 19:16:38
Try using continue instead of break:

break- ends the loop it was called within.
continue- continues at the start of the next iteration.
29  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-10 22:54:03
Only other thing I can think of is that the file isn't being loaded correctly some way.

Try: The getResouceAsStream and then print out its type. It might be that you're not getting anything because the file isn't showing up in the .jar.
30  Discussions / Miscellaneous Topics / Re: What's that old TV shows with the boy spies? on: 2014-05-10 22:47:48
Might it have been: http://en.wikipedia.org/wiki/The_Amazing_Spiez!
Pages: [1] 2 3 ... 17
 

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

The first screenshot will be displayed as a thumbnail.

Dwinin (19 views)
2014-09-12 09:08:26

Norakomi (54 views)
2014-09-10 13:57:51

TehJavaDev (63 views)
2014-09-10 06:39:09

Tekkerue (31 views)
2014-09-09 02:24:56

mitcheeb (53 views)
2014-09-08 06:06:29

BurntPizza (37 views)
2014-09-07 01:13:42

Longarmx (23 views)
2014-09-07 01:12:14

Longarmx (27 views)
2014-09-07 01:11:22

Longarmx (26 views)
2014-09-07 01:10:19

mitcheeb (34 views)
2014-09-04 23:08:59
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
java-gaming.org 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‑gaming.org
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!