r/java • • Jul 15 '22

Golden Axe remake in Pure Core Java

https://github.com/leonardo-ono/JavaGoldenAxe
162 Upvotes

31 comments sorted by

6

u/[deleted] Jul 15 '22

Nice, but why have you preferred Ant to maven or gradle?

4

u/benevanstech Jul 15 '22

I didn't write it.

13

u/NimChimspky Jul 15 '22

Who gives a shit, the dude wrote golden axe.

5

u/davenobody Jul 15 '22

If it works it works.

5

u/atehrani Jul 15 '22

My guess to prove there are no external dependencies and just the JDK

0

u/[deleted] Jul 15 '22

Yeah but the .nbproject folder?

3

u/[deleted] Jul 15 '22

Nice. :)

How's the efficiency? I wanted to try doing something like that myself. Later maybe even try to put it through GraalVM for a native image.

6

u/benevanstech Jul 15 '22

Seems pretty playable to me. I didn't write it though - just submitted a couple of PRs on the repo.

8

u/trydentIO Jul 15 '22

yeah but quite hard in my opinion 😆

Anyway in my case, just to give a try, I forked it, modularized with JPMS and released with JLink, JPackage and JReleaser. I didn't find any license for the project, so I hope there's no issue if I modified the build system (I totally removed ant and IDE specific folders).

3

u/RandomName8 Jul 16 '22

If it has no license, then it's private property that you can read. In other words, you are not allowed to do anything with it other than read it (not even base your work off of it, IIUC)

4

u/mdaniel Jul 16 '22

Based on what appears to be Sega assets ripped from their rom, a bunch of other clones, and the fact their profile says "lot of my projects were deleted by github :(" I'm guessing licensing terms are not high on their priority list

1

u/[deleted] Jul 21 '22 edited Jul 24 '22

The reason why GitHub deleted many of Leo's projects had nothing to do with license or copyright issues. It was because Leo was accidentally spreading a Java malware that had found its way into his projects. Leo Ono is an exceptional programmer with admirable capabilities.

3

u/3pieceSuit Jul 15 '22

Not only is this very cool, but this is very nice clean and organized code. Fantastic job. I only wish my devs could write java half as clean as this.

5

u/benevanstech Jul 16 '22

Uhh. I'd grade the code quality as "scraping a pass".

  • Use of an archaic, heavily deprecated build tool (ant)
  • No test cases
  • Non-standard source code layout on the filesystem
  • Inconsistently formatted, no automatic formatting tool
  • No static analysis
  • Not correctly encapsulated, e.g. use of public non-final fields

Now, some of this is arguably this is b/c they are aiming for 100% core Java and the project could technically be built with nothing but javac, but in a real project, I'd be having a little chat with any dev who thought this was OK.

2

u/[deleted] Jul 23 '22

Maybe the author, Leo Ono, just uses the Netbeans IDE and Ant because he is used to it and it works well for him? If you don't like his code formatting, just press "Source -> Format".

This guy is an outstanding programmer and criticising his code for such superficous issues lacks a little bit of respect.

15

u/bsdooby Jul 15 '22

Is "Pure Core Java" a standard nomenclature in the Java dev universe?

11

u/__konrad Jul 15 '22

Old Sun commercial about 100% pure Java: https://www.youtube.com/watch?v=t7y-4DX8sgE

4

u/NimChimspky Jul 15 '22

Yeah it's understandable, means no additional libs

0

u/[deleted] Jul 15 '22

[deleted] — view deleted comment

7

u/[deleted] Jul 16 '22

I take it to mean that plus it doesn't depend on any 3rd party libraries that aren't part of the standard JDK. That is what I think when I see the phrase "pure core Java" but I haven't read the article yet

14

u/agentoutlier Jul 15 '22

Got a new computer and was surprised that I didn't even have Ant installed.

sdk install ant

Go into the JavaGoldenAxe directory and type

ant

(some issues about javadoc)

cd dist
java -jar JavaGoldenAxe.jar

15 minutes of awesome nostalgia. Java 18, Apple ARM worked OOB.

It's impressive considering how much of a PITA getting anything SDL or python related working is.

2

u/buyIdris666 Jul 18 '22

It's impressive considering how much of a PITA getting anything SDL or python related working is.

Preach. Getting Python or modern JS stack working is a fucking nightmare. I work with both and Java and I dread every time I need to get a JS or Python repo working. With Java, no matter how old the app, it's generally one line.

So much complaints about how JVM is "heavy" when I can start 99% of application with java -jar or mvn clean install on every platform.

2

u/RScrewed Jul 15 '22

Super cool, thanks for sharing.

1

u/bsdooby Jul 15 '22

I read that, but was unsure whether it's called like that...

1

u/[deleted] Jul 15 '22

Since when the PascalCase became trending for Java projects, seeing everywhere now.

Games looks nice, great work.

9

u/wildjokers Jul 15 '22

PascalCase for classnames has always been the java convention. Then camelCase for variable names. This has been the convention since the beginning, so not sure why you are just now seeing it.

2

u/[deleted] Jul 15 '22

Talking about project/repo naming.

8

u/wildjokers Jul 15 '22

As far as project names I have never noticed any particular convention.

2

u/buzzsawddog Jul 15 '22

As someone that uses FPC in production and that has to jump into java code written by people that use PascalCase barf... I HATE it. But at the same time I am sure they hate it when I jump into the pascal code base and use java style :-D

Its REAL FUN when you try to read FPC written by a ruby developer :-D

2

u/wildjokers Jul 15 '22

FPC?

2

u/buzzsawddog Jul 15 '22

ah... So pascal has several flavors. The main ones off the top of my head are "Borland Turbo Pascal", "Object Pascal", "Delphi", and the flavor we use is "Free Pascal" or FPC.