Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (476)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
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  Discussions / General Discussions / Re: If you sell your entire identity to an anonymous buyer for a high price... on: 2014-06-16 07: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.
2  Game Development / Game Play & Game Design / Re: Game control interface for Android phone/tablet games on: 2014-06-01 06:58:48
In libGDX there is also a UI Widget called a TouchPad. It acts like a Joystick.
3  Game Development / Newbie & Debugging Questions / Re: [Libgdx] Screen coordinates -> Isometric world coordinates on: 2014-05-31 21: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;
}
4  Game Development / Newbie & Debugging Questions / Re: I can no longer get Eclipse to run anymore. on: 2014-05-19 05:25:33
Have you tried turning your computer off and then on?
5  Discussions / Community & Volunteer Projects / Re: game idea: "space wars" on Klein bottle surface? on: 2014-05-18 08: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.
6  Discussions / Community & Volunteer Projects / Re: game idea: "space wars" on Klein bottle surface? on: 2014-05-18 04: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.
7  Game Development / Newbie & Debugging Questions / Re: Encouraged model file format on: 2014-05-14 22: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.
8  Discussions / General Discussions / Re: Does this look like an okay start to a 3D mobile game? on: 2014-05-12 08: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.
9  Discussions / General Discussions / Re: Programmer jokes on: 2014-05-12 04: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:
"..."
10  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-12 03:42:28
Edit: Eep, misread the displayed code!
11  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-12 02:12:02
Try moving the break into the if statement.
12  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-11 22: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]
13  Game Development / Newbie & Debugging Questions / Re: Problem when using break on: 2014-05-11 21: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.
14  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 00: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.
15  Discussions / Miscellaneous Topics / Re: What's that old TV shows with the boy spies? on: 2014-05-11 00:47:48
Might it have been: http://en.wikipedia.org/wiki/The_Amazing_Spiez!
16  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 00:39:12
Er, remove the "new File" part. That was my mistake!

1  
TextureLoader.getTexture("PNG", ThisClass.class.getResourceAsStream("res/Baddy.png"));
17  Game Development / Game Mechanics / Re: Organizing classes on: 2014-05-11 00:16:31
Loading by level is probably a better idea. If only because you won't typically need ALL models ALL the time. So if you know for a fact that a given model won't be used in a level for whatever reason you probably shouldn't load it.

In many cases this won't matter as much, unless you have a HIGH number of models and/or a high degree of memory intensive operations happening outside of rendering (Think fancy path-finding and the like).
18  Game Development / Newbie & Debugging Questions / Re: [LWJGL] How to properly load images and use them in a JAR on: 2014-05-11 00:12:41
Remember, if it's in a Jar it's not typically accessible through the strema. You have to do somethin' extra to get it. Try (And replace THISCLASS with the class making use of that command):

1  
TextureLoader.getTexture("PNG", THISCLASS.getClass().getResourceAsStream(new File("res/Baddy.png"));
19  Game Development / Newbie & Debugging Questions / Re: [libGDX] Calculate seconds based on number of ticks on: 2014-05-08 01:53:47
Please provide the definitions of all of the variables (Types mainly) because it seems like this might be some sort of arithmetic issue involving types.

The issue is a simple arithmetic one: minute = (tick / hour) - 60 will always return something weird. Since hour is a variable that changes based on the number of times tick % 60 == 0 is true (So at hour 1, it will be tick - 60; hour 2, it will be tick / 2 - 60). You probably want something more like: minute = tick % ticksInMinute, hour = tick % ticksInHour.


A somewhat better/easier way to keep track of this is through an accumulator type system instead. Basically, instead of what you have right now you'd do something like:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
private int currentTicks;
private int hour;
private int minute;
private int minuteAccum;
private int ticksPerMinute;

public void tick() {
   currentTick++;
   minuteAccum++;
   while(minuteAccum > ticksPerMinute) {
      minuteAccum -= ticksPerMinute;
      minute++;
      while(minute > 60) {
         hour++;
         minute -= 60;
      }
   }
   
   /*
   * Do stuff based on time here.
   */

}
20  Game Development / Newbie & Debugging Questions / Re: [LibGDX] Basic Pong clone - just a few questions on: 2014-05-03 19:01:38
Pong physics depends on how you want to do it. You can have something like the center being a more elastic than the edges (When you hit in the center, the total delta of the pong ball doesn't go down, or perhaps even increases slightly) and less so at the edges (If you hit at an edge the ball slows down or stays at the same speed.) Or you can do it the other way around! A lot of it is dependent on how you want to do it.


When it comes to debugging the lagging issues having the source code available is more helpful than the .jar.

I noticed that some Java applications haven't been exiting correctly on my system (Which is what the killing the JVM would have to do with). A couple of the LD entries did it to me.
21  Discussions / General Discussions / Re: dealing with partially occupied tiles in path finding on: 2014-04-30 20:44:24
Subdivision is probably the better idea for this. Otherwise you'll need to figure out a bunch of other "fun" things for it. Like what does partial coverage really mean with respect to a tile.

Doing multiple tile movement (Subdivision) might work better. Give an object a variable size and define the pathfinding map based on these sizes.
22  Game Development / Newbie & Debugging Questions / Re: Only show overlapping portion of shape (LibGDX) on: 2014-04-30 04:10:22
You could always do a mask. Basically, you invert the screen-- Locations with triangles become gaps and gaps gain triangles-- then you set up layers such that (From near camera to furtherest): Player/UI (Very top/always visible objects), Mask (As described), the Sonar, the spikes (If you have a reason to draw them at all, I mean.)

This is probably the easiest method. And I use that term lightly. Alternately, you can try something involving polygon clipping (But a circle can be a PITA because it's either not a real polygon or it's a polygon with infinite vertices-- Or just a bunch): http://en.wikipedia.org/wiki/Weiler-Atherton_clipping_algorithm
23  Games Center / Contests / Re: Ludum Dare 29 (Beneath the Surface) on: 2014-04-28 10:08:12
@UprightPath I guess fixing bugs and re-uploading is not allowed (saw your comment)?

Well, I've tried to fix it for a bit now. Recompiling, reuploading... I think it's an issue with the asset manager class. But I don't know for sure.
24  Games Center / Contests / Re: Ludum Dare 29 (Beneath the Surface) on: 2014-04-28 08:45:56
I wanted to put up a web version, but just gave up. I don't think GWT (I used LibGDX) liked my game.
I'm having that issue as well when it comes to loading assets. :\ There might need to be something special in that regard that needs to be done. Heh.
25  Games Center / Contests / Re: Ludum Dare 29 (Beneath the Surface) on: 2014-04-28 04:26:16
I had no idea!

And after dicking around with it a bit I can't seem to provide a method to fix it. Hm.
26  Games Center / Contests / Re: Ludum Dare 29 (Beneath the Surface) on: 2014-04-28 04:08:06
@UprightPath: I tried out the web version of your game but got an error... Cannot copy from the debug textbox though.
You maybe also might want to make the screen size a bit bigger in the web version. We mad that mistake last time. Got many complaints that our web version was way to small Wink

Yeah, I'm aware. There's a note in my submission about that (It was at the bottom, I bumped it to the top xD). I can't figure out why it's not playing nicely there. Maybe it doesn't like using an asset loader or something? Anyway, it's been giving me issues the whole time. The Desktop version should work though. I hope. :\
27  Games Center / Contests / Re: Ludum Dare 29 (Beneath the Surface) on: 2014-04-28 03:57:21
I ended up getting a good twenty hours of sleep during this affair. Or at least twenty hours of down time where I wasn't actively working on game. Perhaps even longer. xD

As it is, it turned out alright. I spent too much time working on making it a grid aligned movement thing as well as in trying to make pushable blocks and other fun. They're in the code still, at least bits and pieces are, but they don't show up in the game because I realized that I didn't have enough time to make levels and do the (Shitty) UI that I had. :\

http://www.ludumdare.com/compo/ludum-dare-29/?action=preview&uid=10562
28  Games Center / Contests / Re: Ludum Dare 29 on: 2014-04-25 19:52:36
Didn't they post a major thing about the MiniLDs being canceled from now on?

They did link a bunch of the other more often hosted compos though.

I might try but... Graduate project. Yay.
29  Game Development / Newbie & Debugging Questions / Re: Problems with generating subclasses on: 2014-04-23 16:23:38
A simple 'clone' style method would work for this. So long as your concrete classes are also final (Otherwise, the return might be iffy).

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
public class Spell {
   ... A lot of stuff.

   public abstract Spell clone();
}

public final class Fireball extends Spell {
   private int damage;
   public Spell clone() {
      Fireball spell = new Fireball();
      spell.damage = this.damage;
      return spell;
   }
}


Then when you cast a spell from your list, you'd call 'clone()' on it and get a copy-- Perhaps even a shallow copy-- that can be used by the Active Spell Handler.
30  Game Development / Game Mechanics / Re: A* path finding on: 2014-04-15 02:03:05
When each node takes only 1 to move between (A flat cost map) then you don't need to do anything. It's when you have maps of different costs (Say, moving from a road to a swamp in a strategy game, or going up stairs or something) then you have to worry about it.

What you can do when it comes to the out of bounds things is use some method call to get the nodes:
1  
2  
3  
4  
5  
6  
7  
8  
private static Node nullNode = new Node(-1, -1);
public Node getNode(Node parent, int x, int y) {
if(x < 0 || x >= boundsX || y < 0 || y >= boundsY) {
return nullNode
} else {
return new Node(parent, x, y);
}
}
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.

pw (22 views)
2014-07-24 01:59:36

Riven (20 views)
2014-07-23 21:16:32

Riven (17 views)
2014-07-23 21:07:15

Riven (20 views)
2014-07-23 20:56:16

ctomni231 (48 views)
2014-07-18 06:55:21

Zero Volt (44 views)
2014-07-17 23:47:54

danieldean (35 views)
2014-07-17 23:41:23

MustardPeter (38 views)
2014-07-16 23:30:00

Cero (53 views)
2014-07-16 00:42:17

Riven (52 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
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!