Page 1 of 2

java IDE & gradle

Posted: Sun Apr 19, 2020 7:51 pm
by feder1111
Hello guys, I'm using the Intellij Java IDe to check the code and see if I can learn some Java in the process(I'm a microsoft guy) you know using something productive with all these time in home due the quarentine, but I had some problems running the code, I'm using the java sdk14 however I thinks it has some problems running the gradle, am I right?

Thank you very much!!!

Re: java IDE & gradle

Posted: Mon Apr 20, 2020 1:00 pm
by Massimo32
feder1111 wrote:Hello guys, I'm using the Intellij Java IDe to check the code and see if I can learn some Java in the process(I'm a microsoft guy) you know using something productive with all these time in home due the quarentine, but I had some problems running the code, I'm using the java sdk14 however I thinks it has some problems running the gradle, am I right?

Thank you very much!!!
This page may be of some help:
https://libgdx.badlogicgames.com/docume ... gging.html

Re: java IDE & gradle

Posted: Mon Apr 20, 2020 7:41 pm
by feder1111
Well the correct version of the SDK is de 11 to work with gradle, now im able to run the desktop, however no teams/competition are shown in the screen, when select a friendly match or a cup etc.., no music also

Re: java IDE & gradle

Posted: Mon Apr 20, 2020 8:28 pm
by Massimo32
feder1111 wrote:Well the correct version of the SDK is de 11 to work with gradle, now im able to run the desktop, however no teams/competition are shown in the screen, when select a friendly match or a cup etc.., no music also
This happens when for some reason the resource folder (android/assets) is not available.

Re: java IDE & gradle

Posted: Sat May 23, 2020 10:38 pm
by feder1111
Guys I finally be able to run the code ans works fine, In my process of learning Java, I'm not understanding whats the classes FSM are used, whats their purpose SceneFSM, Match FSM etc..

Re: java IDE & gradle

Posted: Sun May 24, 2020 11:55 am
by Massimo32
feder1111 wrote:Guys I finally be able to run the code ans works fine, In my process of learning Java, I'm not understanding whats the classes FSM are used, whats their purpose SceneFSM, Match FSM etc..
They are Finite State Machines.

https://en.wikipedia.org/wiki/Finite-state_machine

Re: java IDE & gradle

Posted: Sun May 24, 2020 6:14 pm
by feder1111
Interesting, did not know about that concept,

Another question, why the stadium is not one single image instead of several images? is it due some performance issue or because is not possible to manage big textures?

Re: java IDE & gradle

Posted: Sun May 24, 2020 9:50 pm
by Massimo32
feder1111 wrote:Interesting, did not know about that concept,

Another question, why the stadium is not one single image instead of several images? is it due some performance issue or because is not possible to manage big textures?
It's both for performance and because of limits in old computers.

Re: java IDE & gradle

Posted: Sun May 24, 2020 10:22 pm
by feder1111
I tried to join the images in one single image but it gave me some error of pallete

"Palette not found inside image!"

Was because the image has to be saved wit transparency?

Re: java IDE & gradle

Posted: Sun May 24, 2020 10:29 pm
by Massimo32
feder1111 wrote:I tried to join the images in one single image but it gave me some error of pallete

"Palette not found inside image!"

Was because the image has to be saved wit transparency?
You should use a png of the "palette" kind.
That's because the game needs to find the palette and replace the colors.
It's a very easy and fast way to "render" the image, instead of replacing every single pixel.

There're three format of png:
https://docstore.mik.ua/orelly/web2/wdesign/ch21_04.htm

Re: java IDE & gradle

Posted: Mon May 25, 2020 6:54 am
by feder1111
I used paint.net to open the png, when I save it the image looks fine exactly the same colours than the original, however when I run the game the renderization is made with bad colours, do you know why that is happening?

Re: java IDE & gradle

Posted: Mon May 25, 2020 11:05 am
by Massimo32
feder1111 wrote:I used paint.net to open the png, when I save it the image looks fine exactly the same colours than the original, however when I run the game the renderization is made with bad colours, do you know why that is happening?
You should check if paint.net saves the png in the "palette" format.

Re: java IDE & gradle

Posted: Mon May 25, 2020 3:39 pm
by feder1111
What image editor are u using?

Re: java IDE & gradle

Posted: Mon May 25, 2020 8:44 pm
by Massimo32
feder1111 wrote:What image editor are u using?
A very old one, Paint Shop Pro 5

Re: java IDE & gradle

Posted: Wed Jun 03, 2020 12:43 am
by feder1111
What's the concept of subframes?, i mean I understand that a frame is an image in a certain point, but whats a subframe?