Hi !
Featured games (85)
games approved by the League of Dukes
Games in Showcase (636)
Games in Android Showcase (178)
games submitted by our members
Games in WIP (687)
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 ... 39
1  Game Development / Game Mechanics / Re: How to properly avoid ConcurrentModificationException when running two threads on: 2015-09-29 19:22:55
Literally just stop using threads.
2  Game Development / Newbie & Debugging Questions / Re: LibGDX Gradle Slow on: 2015-09-29 14:48:19
So I went to sleep, woke up and now it seems to be ok.

However, I require help because I just can't get anything to work that involves gradle first time and it's really putting me off even remotely doing anything.

So firstly:

- Any Gradle project I try to import can't find android SDK
Any project I try to import can not find the android SDK, despite it being set as a home variable. The only way I can get around it is my editing the file of any project before importing it. Is there some syntax I need to add to the home variable? Never had this problem before.

- Never, ever, have I managed to import or get the Facebook SDK working
I just can't ever get it working, error after error, hour after hour of working through one to another. I can't simply download it and import it has Gradle project, then link it as library to my given project.

I actually need the Facebook SDK as require some sort of social extension, a simple chat does not count. Rather than having to code a server, a friend system and a chat system it should:p be easier to use Facebook.

So right now, the Facebook import process is throwing me this error:

My limited knowledge tells me that the file is trying to compile something that simply does not exist? But I can't find anything related to it.

P.S How badly do I need to learn Gradle in order to just do basic project setup and integration?

- Every project I make demands latest android API
No idea why it is doing this, but when I manually imported Facebook without Gradle (which never worked btw, tons of errors beyond my fixing ability), it refused to use any version of Java below 7 and only allowed me to use API 23. Or it would throw an error about not being able to find required android classes.

LibGDX projects are doing the same, can't change it from API 23, even if I specify the target to 15, with a min of 14 and a max of 22. Freaks out and refuses to launch, only gives me an error saying Java 7 needs at least kitkat 4.4 to run, if I change to Java 6 it starts spaffing about not being compatible with any android api lol.

Lost and confused, worried and feel utterly stupid.
3  Game Development / Newbie & Debugging Questions / Re: LibGDX Gradle Slow on: 2015-09-28 19:59:08
Maybe it's an issue on their end? That's really slow and shouldn't be happening, never takes that long for me and I use Gradle frequently.

I sure hope so, 2 hours later and I still haven't even touched a line of code and I am almost at the point of putting my first through the
4  Game Development / Newbie & Debugging Questions / LibGDX Gradle Slow on: 2015-09-28 19:03:17
Hi all,

Long time no see :p.

Anyway, I am using Java + LibGDX for my graded project this year at college and having a very bad time getting gradle setup.

I managed to eventually get the android SDK's to install properly on a different drive from Eclipse (due to SSD space), I finally managed to get the setup from libgdx work with Java 7, it was freaking out before. Now I am trying to import the damn project and it keeps hanging on the build model process while it downloads dependencies, it has been stuck on for almost 20 minutes now with no signs of the bar moving.

Any idea what I can do to resolve this issues? Can I pre-download the dependency before hand and point the import to it? If it is basically timing out when trying to download, is there a way I can just skip the whole gradle integration?

UPDATE: Using 4G on phone, still not downloading. So not a network issue
5  Discussions / Miscellaneous Topics / I have not programmed in 3 weeks. on: 2015-06-24 11:55:08
And counting. I recently got a new job and it is working 0830 to 1900 7 days a week, I have literally no spare time and any spare time I do get, I spend it with my partner.

I am getting put onto 6 days a week soon, with a day of my choice off at the start of every week. How on earth do you guys juggle stuff around work hours? It's slowly killing me but I need the cash, I can't even look for programming work because I am don't have time when I get home.

I feel shit for not coding, I really want to code but just don't have the time. Does this happen to many of you? How do you handle it?
6  Games Center / WIP games, tools & toy projects / Re: Space Grunts - turn-based/action roguelike on: 2015-06-01 18:31:08
Very nice indeed, you are very skilled and I love your art style Cheesy.

Are you planning on adding lighting effects to spruce it up?
7  Discussions / Miscellaneous Topics / Re: What is your opinion about ... on: 2015-06-01 18:07:58
I also use system print quite a lot, but mine is tucked away in a Logger class so I can disable messages without having to look through them all and comment them out. I use a hashmap that has name as key and boolean as value, I then print using the respected debugging type and can disable whatever ones I don't want.

If that makes sense lol. Allows me to say, disable debugging for asset loading but enable it for character generation, without changing any lines.
8  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-31 07:08:28
Hmm, it's a Google AdSense ad, so I cannot report it to ProjectWonderful, as is. Emo

The previously reported (by you) ads have been reported (by me) to ProjectWonderful and those advertisers have been banned/punished/murdered in quick succession, as per my request.

I probably missed a part of the conversation. but what exactly is the problem with those ads? it looks legit. The only not legit  thing about it maybe is the girl's butt. And maybe some people here do want to get a girlfriend ... so it's a well targeted ad.

Mostly to do with this being a family friendly website, face it, click that ad and see it's just a website for swingers . You don't see these ads on other forms.
9  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-31 07:05:19
You are free to implement that class into your project, don't worry about how it works, hell I'm still learning matrices lol.

Oh, okay Grin

For this to work, I need to create some sort of 'joint' for the hand, correct? As I need to tell the weapon where to connect to. This would still mean having to move the joint manually for each frame of the animation and then this math would move the weapon for me

Depends how you are doing it, how I would be to have the character know where is hand is (via joint, Mount or something). Then have the weapon know where it should be held using a similar system. If your animation moves these points visually then yes, you will need to have some sort of system that moves the joints each frame and also reassigns the transform position.

Alternatively, you could also give the joint a transform, parent that to the character, then parent the item to the joint. Structured correctly, the joint can easily be updated to match the characters state and animation, and the weapon will move accordingly.
10  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-30 07:09:49
Thank you, Gibbo Grin

I don't think I know enough about matrices/this type of math at the moment so i'm going to go the cheating route for this game (The built in assets method). I know how to add/multiple matrices but i've never dealt with them in LibGDX/games so it's a bit overwhelming.

You are free to implement that class into your project, don't worry about how it works, hell I'm still learning matrices lol.
11  Discussions / General Discussions / Re: How many projects do you go through? on: 2015-05-29 09:01:01
I have a folder called Graveyard that has around 100 sub folders...
12  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-29 06:55:37
Didn't want to just hand out a solution until you had multiple input, but here is pretty much what I use.

A member of JumpButton Studios helped me understand this, I now use it for everything, I even wrote it in C# and C++ it was that damn useful.

You can use it if you wish, this is the basic version that just parents everything, written in Java :

import com.badlogic.gdx.math.Affine2;
import com.badlogic.gdx.math.Matrix4;
import com.badlogic.gdx.math.Quaternion;
import com.badlogic.gdx.math.Vector2;
import com.badlogic.gdx.math.Vector3;

 * Represents the data for the position, scale, angle and origin
 * @author Stephen Gibson

public class Transform {

   public static Quaternion ZERO_ROTATION = new Quaternion();
   public static Matrix4 ZERO_TRANSFORM = new Matrix4();
   public static Vector3 VECTOR_ZERO = new Vector3();
   public static Vector3 VECTOR_ONE = new Vector3(1, 1, 1);

   // The transform that is parented to this transform, for relative position,
   // scale and rotation
   protected Transform parent;
   public Vector3 position = new Vector3();
   public Vector3 scale = new Vector3(1, 1, 1);
   public Quaternion rotation = new Quaternion();
   // Scale and rotation matrix
   public Matrix4 model = new Matrix4();
   public Matrix4 transform = new Matrix4();

    * Sets the parent of this transform, this transform won't be updated until the next step
    * @param parent

   public void setParent(Transform parent){
      this.parent = parent;
   public Matrix4 getParentTransform(){
      if(parent != null)
         return parent.getTransform();
      return ZERO_TRANSFORM;
   public Quaternion getParentRotation(){
         if(parent != null)
            return parent.getRotation();
         return ZERO_ROTATION;
   public Vector3 getParentScale(){
      if(parent != null)
         return parent.getScale();
      return VECTOR_ONE;
   public Matrix4 getModelMatrix(){
      return model;
   public Matrix4 getTransform(){
      return transform;
    * Gets the position relative to the parent
    * @return

   public Vector3 getPosition(){
      return position.cpy().mul(getParentTransform());
    * Gets the absolute position
    * @return

   public Vector3 getLocalPosition(){
      return position;
    * Get the scale relative to the parent
    * @return

   public Vector3 getScale(){
      Vector3 scl = parent == null ? VECTOR_ONE : parent.getScale();
      return scale.cpy().scl(scl.x, scl.y, scl.z);
    * Get the rotation relative to the parent
    * @return

   public Quaternion getRotation(){
      return rotation.cpy().mul(getParentRotation());
   public void setPosition(Vector2 position){
      this.position.set(position, 1 );
   public void setScale(Vector2 scale){
      this.scale.set(scale, 1);
   public void setRotation(Quaternion rotation){
      this.rotation = rotation;
   public void setAngleAxis(float x, float y, float z, float degrees){
      rotation.setFromAxis(x, y, z, degrees);

This version here, although not written in Java, allows you to choose what part of the transform to parent. Should be easy to duplicate LINK
13  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-28 10:59:27
Trying to find a girlfriend apparently:

14  Games Center / Showcase / Re: Heroes of Loot's Steam release on: 2015-05-27 12:56:07
Nice looking game, also very reasonable price point as well. Good job.
15  Discussions / General Discussions / Re: Rayvolution's JGO Appreciation Thread (AKA: Free copies of Retro-Pixel Castles!) on: 2015-05-27 10:47:53
I would love to give the game a try.
16  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-26 18:42:39
So take these into account before doing it the cheat way lol.

So is your way the standard way of doing this type of item placement? I mainly plan on only using the assets for the player but it would be cool is something like a skeleton used the same weapons.

Would you not have to redesign the assets for bigger mobs anyway Huh

Parenting transforms is a pretty standard way of positioning things relative to other things, regardless of what it is. If say a skeleton was to pick up a bow on the ground, the skeleton would know where about it should hold that particular item.

You would not have to redesign the assets for a bigger mob. Why should a dagger be bigger for a 10ft orc type mob as opposed to a 6ft hero? A dagger is a dagger, if the orcs have their own weapons then of course, you would have to make more assets, as opposed to redesigning existing ones.

If you are making a game, where anybody can pick up anything, then yes; this is a pretty standard way.
17  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-26 12:17:41
Gibbo's solution does seem neat Smiley

Cheers  Wink.

Jacobs solution is also viable as long as the art is not to be used by things off varying sizes. If you want to allow say a large orc to use the same dagger as the player, and the player happens to be half the size...well, you just doubled your asset count. Say you wanted to use the same sprite for the UI and pickups , it's now triple the amount of assets.

So take these into account before doing it the cheat way lol.
18  Discussions / General Discussions / Re: Teaching Kids to be Independent on: 2015-05-22 05:58:02
It's the harsh reality that kids are "stupid", but what age group are you talking about in particular?

I tried (note tried) to teach basic java to a group of around  15 youths, these particular youths were early school leavers that claimed they wanted to do something computer related, quite a lot of them had an interest in programming, some hardware and the odd one or two that wanted to go to college and do games development.

What a waste of time for me and the organisation. We made a few little games (rock paper scissors, tic tac toe etc), as well as basic programs that simulate bank accounts.

Half of them left because they could not be bothered to show up, the others, whenever they got stuck they would go on Facebook or some random reddit page until I noticed, then asked for help.

Turned out this was pretty common, happened with every group and I was not the first person to try.

However, there was one girl in particular that loved to be creative, she wanted to do games design and possibly programming. I put most of my attention into her, helped her as much as possible.

I gave her a road map that could get her from where she is, and onto a course that is meaningful. Told her what she needed to learn and what to expect.

She is now doing the course I did 2 years ago.

All the other kids wanted to do was go home and play games on the xbox, their parents literally just let then do f**k all with their lives.

Quite the opposite end of the spectrum, on my end the parents did not care and unfortunately, the kids will never excel in anything. In your end, the parents are pushy and controlling, so the kids will succeed but still never excel in anything.

So yeah, tldr kids are shit, just do your best and try to find the ones among the idiots and focus on them. Diamond in the rough and what not.
19  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-20 21:25:51
Yeah this is the exact same, as long as you have your sprite origin set to the middle, it should be fine.

If it is offset in anyway, it will pivot weird.

Position before rotation as well (if you are doing some sort of get order).
20  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-20 20:32:34
That's what I was looking for! Thank you. Do you have any advice for what to do then when I rotate the sprites?

Pretty much the exact same, just replace position with angle/rotation  Wink.
21  Game Development / Newbie & Debugging Questions / Re: LibGDX Draw item in players hand (2D top down view) on: 2015-05-20 11:08:39
Use a parent child setup.

So the position of the character is say, 5x5. And the item should be placed in their right hand. So lets say the sprite is facing directly right (zero degrees).

The item should be positioned 1 unit offset on the y axis. So if you were to write both positions separate, it would be 5x5 for the player and 5x6 for the item.

Now if you were to parent them (or their transforms), then you would have it be 5x5 for player and 0x1 for the item.

Here is some pseudo:

// New character at position 5, 5
Character c = new Character(5, 5);

// Give the character an item, at position 0, 1
Item i = new Item(0, 1);

// Now parent them

// Now the get position method would look something like this
public Vector2 getPosition(){
    return parent == null ? position : position.add(parent.getPosition());

// Draw each of them
// This will draw the item at the position of the parent, then at it's own position
batch.draw(i.sprite, i.getPosition());
// This will just draw the character, if it had a parent it would draw it at its parents position + its own position
batch.draw(c.sprite, i.getPosition());

This would be best split up into transforms of course, as you don't want to tie objects together like this.

22  Games Center / WIP games, tools & toy projects / Re: Flying Cavemen - Inifinite Scroller [LibGDX] on: 2015-05-17 14:55:56
This is by no means a bad game, but the performance is pretty terrible.

It is fun though, attention to detail is striking as well.
23  Discussions / General Discussions / Re: What's your day job? on: 2015-05-11 08:54:55
Just started a new job few weeks ago, in a local bike shop.

Learning a lot, great fun and most important, cheap components! Cheesy.
24  Game Development / Newbie & Debugging Questions / Re: How to order the way in which objects are rendered? on: 2015-05-06 11:31:21
Just to build on what Riven and Cero said.

You sort by layer, which means sorting each frame will take literally no time at all.

You may have a list of layers that contain a list of items, spanning many thousands. The internal array is never sorted, only the layer list is sorted.

So think of a layer as a data structure for render able objects, so to say.
25  Java Game APIs & Engines / Engines, Libraries and Tools / Re: [LibGDX] Where to start? on: 2015-05-06 11:19:57
If you have been working with Slick for 3 years then have no fear, the LibGDX documentation is HERE.

You should have no issue at all getting to know the API.
26  Game Development / Newbie & Debugging Questions / Re: [LibGdx] Best way to handle textures for hundreds of objects? on: 2015-04-28 15:54:00
Use the AssetManager supplied with the LibGDX library. Load textures once, use Sprites with them for multiple draw transforms.

Do not put the textures into a class and declare them all static, this is a bad habit and you will suffer from OpenGL context lost on the Android platform.

Here is the wiki for it.
27  Discussions / Miscellaneous Topics / Re: Can Word Lists be Copyrighted on: 2015-04-22 11:48:53
You can not copyright words or numbers.

Oh, but you can copyright numbers. And people do all the time. Every time a bit of code is copyrighted, they are essentially just copyrighting a very large number, as it's essentily nothing but a string of 0s and 1s. You can also trademark numbers for specific uses, such as Boeing and their 737.

I was meaning that you can't directly copyright a single number or word lol.
28  Game Development / Newbie & Debugging Questions / Re: how to fit a body to a sprite avoiding transparent space? on: 2015-04-18 20:10:45
i destroy the fixture to create a new one every frame with the new size

Don't do that, if your character changes size dynamically, simply attach fixtures to represent the larger sizes and set them as sensors.

Say the player can shrink to half his size, have 2 fixtures. 1 for normal size and 1 for half size that is a sensor but default, whenever the player shrinks, set the full size one to sensor and the half size one to not sensor.

Creating a new fixture every frame is a waste of power, especially if you are doing it for more than 1 entity.
29  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-04-11 21:43:11
Started my new job at a local bike shop called the bike smith, woot.

Good bunch of guys, good laugh, trade prices on stuff :p.
30  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-04-07 18:25:48
Bit the bullet, bought one of these. 8 weeks and the red one will be in stock and in my garage next day Cheesy.


I regret nothing.
Pages: [1] 2 3 ... 39
Dwinin (72 views)
2015-11-07 13:29:08

Rems19 (81 views)
2015-10-31 01:36:56

Rems19 (77 views)
2015-10-31 01:32:37

williamwoles (107 views)
2015-10-23 10:42:59

williamwoles (93 views)
2015-10-23 10:42:45

Jervac_ (110 views)
2015-10-18 23:29:12

DarkCart (135 views)
2015-10-16 00:58:11

KaiHH (117 views)
2015-10-11 14:10:14

KaiHH (156 views)
2015-10-11 13:26:18

BurntPizza (172 views)
2015-10-08 03:11:46
Rendering resources
by Roquen
2015-11-13 14:37:59

Rendering resources
by Roquen
2015-11-13 14:36:58

Math: Resources
by Roquen
2015-10-22 07:46:10

Networking Resources
by Roquen
2015-10-16 07:12:30

Rendering resources
by Roquen
2015-10-15 07:40:48

Math: Inequality properties
by Roquen
2015-10-01 13:30:46

Math: Inequality properties
by Roquen
2015-09-30 16:06:05

HotSpot Options
by Roquen
2015-08-29 11:33:11 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!