Hi !
Featured games (88)
games approved by the League of Dukes
Games in Showcase (679)
Games in Android Showcase (194)
games submitted by our members
Games in WIP (734)
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 / Match 3 Gem Movement on: 2016-01-06 12:12:01
So I am in the process of creating a match 3 game for my internship and struggling to find a nice, clean way to get gems to navigate through the grid.

Currently, gems fall vertically perfectly and looks very nice. However as time went on, they wanted "obstacles" such as holes in the grid, to which gems should move around, very much like candy crush.

I can't seem to find a nice method to go about this, my plan is to use a path finding algorithm that simply navigates each gem down the way until they can no longer. We had something like this before but it causes "overlap" if you want to have gems fall async, rather than 1 column at a time (slows down user experience), so I would need to figure out the criteria that needs to be met before a gem that may cause overlap can move.

Then I thought, surely there is a better damn way of doing this? This seems overly complicated and it shouldn't be. Does anyone have any ideas? Sources? Techniques? Would appreciate any insight to this.
2  Java Game APIs & Engines / Java 2D / Re: Libgdx Box2D Movement Issue on: 2015-12-24 18:23:10
Use vectors to determine direction, normalize and multiply by a speed factor.
3  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Looking For Console API/Library on: 2015-12-04 15:51:32
Sounds like SquidLib might be what you're looking for.

An amazing toolset! I spent about an hour just messing around with it and generating some nice rougelike dungeons :p.

I can see how I can build a console off this, I was trying to avoid this work being honest.

Our project is to show uses of OOP and given my lack of artistic talent, I am going with a text based game (as this allows for endless possibilities for design).
4  Java Game APIs & Engines / Engines, Libraries and Tools / Looking For Console API/Library on: 2015-12-03 19:44:47
Hello JGO!

Long time since I last posted here Sad. Been super busy with work and college.

So I am starting my project for college and I require a consoles API/Library, preferably something that works nicely with LibGDX. The only target platform is PC.

Desired Features:

  • Flexible positioning and text clipping
  • Coloured text
  • Input and output history

Does anyone know of anything that exists like this? My Google skills are not bringing anything up :S.
5  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.
6  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.
7  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
8  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
9  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?
10  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?
11  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.
12  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.
13  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.
14  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.
15  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...
16  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
17  Discussions / Miscellaneous Topics / Re: What I did today on: 2015-05-28 10:59:27
Trying to find a girlfriend apparently:

18  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.
19  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.
20  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.
21  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.
22  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.
23  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).
24  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.
25  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.

26  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.
27  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.
28  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.
29  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.
30  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.
Pages: [1] 2 3 ... 39
DarkCart (24 views)
2016-05-29 02:30:33

Hydroque (37 views)
2016-05-26 14:45:46

Mac70 (48 views)
2016-05-24 21:16:33

theagentd (55 views)
2016-05-14 18:38:35

theagentd (88 views)
2016-05-10 22:37:41

theagentd (93 views)
2016-05-10 22:33:46

IanParcs (120 views)
2016-04-18 14:18:53

KaiHH (116 views)
2016-04-18 08:35:41

KaiHH (136 views)
2016-04-15 12:43:58

theagentd (143 views)
2016-04-14 02:16:17
FPS Camera Tutorial
by Hydroque
2016-05-22 05:40:58

Website offering 3D Models specifically for games for free
by vusman
2016-05-18 17:23:09

Website offering 3D Models specifically for games for free
by vusman
2016-05-09 08:50:56

Website offering 3D Models specifically for games for free
by vusman
2016-05-06 11:10:21

Website offering 3D Models specifically for games for free
by vusman
2016-04-29 12:56:17

List of Learning Resources
by SilverTiger
2016-02-05 09:39:47

List of Learning Resources
by SilverTiger
2016-02-05 09:38:38

List of Learning Resources
by SilverTiger
2016-02-05 09:35:50 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!