Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (777)
Games in Android Showcase (231)
games submitted by our members
Games in WIP (856)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
    Home     Help   Search   Login   Register   
Pages: 1 [2] 3 4 ... 10
 on: 2018-12-08 09:32:20 
Started by fenaryh - Last post by VaTTeRGeR
Gradle calls it packaging is what i was playing at:

 on: 2018-12-08 03:17:40 
Started by fenaryh - Last post by fenaryh
So, just going back, because i found the real problem; it was in the Gdx.input.setProcessor();

Each time I change a state, I must call this method again to the new Stage;

My game is now much more advanced and I`m actually using the Multiplex, but that`s the same idea.

 on: 2018-12-08 03:08:01 
Started by fenaryh - Last post by fenaryh
Thank you, man!

But the word that I was searching is actually "deploy" lol

For record: need the gradlew to work. The gradle only was not working!

Thanks again!

 on: 2018-12-07 22:23:39 
Started by Spasi - Last post by ciruman
Maybe if you are still interested about it:

 on: 2018-12-07 22:13:20 
Started by fenaryh - Last post by VaTTeRGeR

Literally the first and second link are the solution (the libgdx wiki entry)
Your special key word of the day is packaging Cheesy

 on: 2018-12-07 21:19:15 
Started by GustavXIII - Last post by fenaryh
Hi, GustavXIII!

The way I usually do is for every object I've created in the map, it will hold his position AND size, like (x, y, width, height). And all of them will be added to a List (Array, LinkedList, etc)

So, any time you will try to create an object, you check before, using simple rectangle collision between the new one and all of the array, like so:

class ObjectCreator(){
   public static void createObject(){

      MyObject newObject = new MyObject(random_x, random_y, type_of_object_width, type_of_object_height);

      boolean collide = false;
      for(MyObject myobj : arrayOfMyObjects){
         if(collides(myobj, newObject)){
            //OBJECTS ARE COLLIDING, SO YOU DON'T ADD            
            collide = true;
            return; //just one collide is enough, don't need to continue walkin the array

   public boolean collides(MyObject A, MyObject B){

      Rectangle rA = new Rectangle(A.x, A.y, A.width, A.height);
      Rectangle rB = new Rectangle(B.x, B.y, B.width, B.height);

      return rA.intersects(rB);

This way you can have multiple objects with different sizes.

Hope it can help!

 on: 2018-12-07 20:56:11 
Started by Sean84 - Last post by fenaryh
Hey, Sean!

If you're hard coding (and not using a framework), the best way is to create a class for your 2D animations. The main variables should be:

- The spritesheet itself

It can be a simple array of images. And just it. You can use one spritesheet to each animation or a game spritesheet. For individual files is actually easy to work, but not much efficient.
A huge spritesheet that will hold all of the game images is the usual approach. You just need to have a logic to point to each animation. In that case, you can have some variable like "INICIAL_FRAME".

- The number of frames

If you're using the big spritesheet, so you will need the number of frames. Could be the array size, for exemple.

- The animation's speed

That's an important one. Some times you want to change some of the animation speed, so could be useful.

- The kind of animation

I don't know if "kind" is the right word, but I mean how the frames go. If you have, for example, 4 frames (1, 2, 3 and 4), the usual animation will play in that order:

1, 2, 3, 4 - repeat. This is "LOOP" kind

But you can have some other cool types, like "PING_PONG", like this:

1, 2, 3, 4, 4, 3, 2, 1 - repeat

You can also use "REVERSED_LOOP",like:

4, 3, 2, 1 - repeat

If you are creating your own class, keep this in mind. All of this will be useful in the future.

Here is an example of the LIBGDX class Animation; you can take some ideas from it;

Hope this could help!

 on: 2018-12-07 19:29:35 
Started by fenaryh - Last post by fenaryh
Hi, all,

it's a very simple question, but I really can't finding the answer.

How can I "export" my game to send to other people to play? In other words, create an executable game.

I'm using LIGBDX and Gradle.

ps - the people shall not have Gradle installed.

 on: 2018-12-07 18:50:34 
Started by Mad Hatter - Last post by Mad Hatter
Hi, after long time I back:
<a href=";hl=en_US&amp;start=" target="_blank">;hl=en_US&amp;start=</a>

 on: 2018-12-07 08:16:19 
Started by Rickodesea - Last post by 65K
Use OpenJDK

Pages: 1 [2] 3 4 ... 10
hadezbladez (290 views)
2018-11-16 13:46:03

hadezbladez (159 views)
2018-11-16 13:41:33

hadezbladez (291 views)
2018-11-16 13:35:35

hadezbladez (72 views)
2018-11-16 13:32:03

EgonOlsen (2151 views)
2018-06-10 19:43:48

EgonOlsen (2177 views)
2018-06-10 19:43:44

EgonOlsen (1366 views)
2018-06-10 19:43:20

DesertCoockie (1984 views)
2018-05-13 18:23:11

nelsongames (1626 views)
2018-04-24 18:15:36

nelsongames (2273 views)
2018-04-24 18:14:32
Deployment and Packaging
by mudlee
2018-08-22 18:09:50

Java Gaming Resources
by gouessej
2018-08-22 08:19:41

Deployment and Packaging
by gouessej
2018-08-22 08:04:08

Deployment and Packaging
by gouessej
2018-08-22 08:03:45

Deployment and Packaging
by philfrei
2018-08-20 02:33:38

Deployment and Packaging
by philfrei
2018-08-20 02:29:55

Deployment and Packaging
by philfrei
2018-08-19 23:56:20

Deployment and Packaging
by philfrei
2018-08-19 23:54:46 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!