PhilippvK / playforia-minigolf

Client & Server for Minigolf Game known from Playforia/Playray/Appeli. Written in Java.
84 stars 31 forks source link

Compiling errors #83

Closed jok3r-git closed 2 weeks ago

jok3r-git commented 3 years ago

Hello, Iam new to the whole world of "java" and "programming", but I read some hours and gave it a try...

Software used: jdk-15.0.1 jre1.8.0_271 apache-maven-3.6.3

After setting up the software, I tried mvn install in the root directory. No way. Iam only able to build Playforia Minigolf successful, the compiling stops when it comes to "shared".

If deactivating the tests via -DskipTests=true, the compilation works - up to the client.

The client compilation still send an error because of "sh.tak.appbundler". So I deleted the lines 111 to 131 in the client .pom file, and now I was able to compile all files, included the client, without errors. I think it worked like it should work (I played 5 minutes and all looked fine), but was the way I did it correct? Why are there so many errors when "testing"? Are there some negative impacts because I deleted the lines in the client .pom?

Hope to get rid of some answers, to send some following issues, but step after step :)

Thanks and regards

PhilippvK commented 3 years ago

Thanks for submitting that issue!

May I quickly ask you which OS you are using to compile?

jok3r-git commented 3 years ago

Hey, thanks for the quick reply. Iam using Windows 10 pro x64, Build 19041

PhilippvK commented 3 years ago

Never build the project on Windows but as far as I now the OSX App can only be generated on Linux and macOS.

I have no idea if there is an issue with the tests as well but I will definitely try it out once I manage to use windows.

jok3r-git commented 3 years ago

I edited my post a bit to late, so I post again here, because I still think it has to do something with my java or something...

I get some weird issue, which is excactly the same like this: #72

Iam not sure, but I think it has to do something with the environment variables or jdk/jre. I got only the normal java installed before, and to close the server I had to kill the Java Runtime process in the task manager. If I run the server now, I have to kill OpenJDK Platform binary as process. I tried even your original files from the old 2.0.1/2.0.0 version, but I cant get my right click work again. Iam 100% sure that it worked before I started with this compiling things?! STRG is working, but its not the same...

edit: STRG does NOT work on the 1st shot, only the 2nd 3rd... is working with 90degrees switches..

PhilippvK commented 3 years ago

In my opinion this is not really a bug. The keyboard can only respond to key presses once the game was focused with a mouse click. Once you have clicked anywhere (preferably without shooting the ball) nearly all keyboard presses result in your expected behavior.

I have no idea if its possible to tell java that the game map should be focussed by default instead of the chat box...

jok3r-git commented 3 years ago

Sorry, but I have to disagree with that. I'm not able to play this game anymore, even with the old version (2.0.1) which definetly worked normally and fine. No right click working at all, I can focus the window or clicking anywhere, I tried all possible combinations. The very first shot on every map cant be switched by 90degrees. AFTER the first shot, Im able to switch the aiming line 90°only ONCE with STRG. The old function allowed me to do it 0-90-180-270-0 and worked on the first shot. I really dont know what happened, but I can't play it anymore...

PhilippvK commented 3 years ago

Sorry, but I didn't want to offend you.

When testing on my device I have to right clock the game canvas once per track to be able to switch between the available aming lines with STRG. Do you have enabled the aimbot?

I think I found the issue responsible for the "focus"-problem:

private void method162(boolean var1) {
        this.addMouseMotionListener(this);
        this.addMouseListener(this);
        this.setCursor(cursorCrosshair);
        this.addKeyListener(this);
        if (var1) {
            //this.requestFocus();//todo this is annoying as fuck
        }

    }

See: https://github.com/PhilippvK/playforia-minigolf/blob/master/client/src/main/java/agolf/game/GameCanvas.java

PhilippvK commented 3 years ago

After commenting the line in I get the following behavior:

How should I solve this? At the moment almost every key is mapped to that feature. Should it only be mapped to CTRL for future releases?

PhilippvK commented 3 years ago

TODO: List the keyboard mapping somewhere

jok3r-git commented 3 years ago

Sorry, but I didn't want to offend you.

When testing on my device I have to right clock the game canvas once per track to be able to switch between the available aming lines with STRG. Do you have enabled the aimbot?

I think I found the issue responsible for the "focus"-problem:

private void method162(boolean var1) {
        this.addMouseMotionListener(this);
        this.addMouseListener(this);
        this.setCursor(cursorCrosshair);
        this.addKeyListener(this);
        if (var1) {
            //this.requestFocus();//todo this is annoying as fuck
        }

    }

See: https://github.com/PhilippvK/playforia-minigolf/blob/master/client/src/main/java/agolf/game/GameCanvas.java

Hello, I compiled some more versions, one with cheats enabled, one with cheats disabled. But if cheats enabled, there are way more bugs (walls not breaking/blocks not moving, like I said in my "discussion"-post). So for now Im only trying with the cheats disabled version.. But it doesnt matter which version I try, the game isnt playable anymore and I have no clue... 2.0.1 worked, then I compiled myself the version 2.1.1.0, and now 2.0.1 isnt working anymore?! Where is the context between? Do you have a possibility to test this on Windows? I wish I hadnt tried this myself, I want to get it back :D

jok3r-git commented 3 years ago

Okay, I got it. Its working like it should work again - uff Iam happy :D

I uninstalled all JRE/JDK/apache, reinstalled only JRE again, and right click is working now :) (with every client, even the self compiled one) So it has to do something with JDK, because the .jar files will be opened with OpenJDK Binary, now it will executed by JRE again, so maybe JRE handles in some other way?!

Thanks and regards

PS: Should I open a new ticket for this "if cheat is enabled walls dont break"-bug or do you want me to leave it in this topic right here?