SuperLemminiToo Build Instructions: How to build from source (was: learn Java)

Started by Charles, October 20, 2021, 05:21:38 PM

Previous topic - Next topic

0 Members and 3 Guests are viewing this topic.

Charles

Thought I'd take Simon's advice and create a new thread for programming related questions.

I didn't create the SuperLemmini codebase, but I have looked through enough to make my own changes to it, and I'd love to help other people get started being able to do the same.

First step, you'll need the code:

You can download my fork: https://github.com/Blazingstix/SuperLemminiToo
Or you can get the original Lemmini: https://bitbucket.org/fade0ff/lemmini/src/master/

As far as I know Tsyu's SuperLemmini isn't on any source-control, however he has shared links to google drives with all his versions zipped up.  I have also included those versions previous revisions in my SuperLemminiToo source.

Second step:
You'll need something to edit and compile the Java code in. I recommend Eclipse, but I'm sure there are others.
https://www.eclipse.org/ide/

Once you have the source code, and you've set up Eclipse, make sure you have all the proper dependencies hooked up. I've tried to include all the dependencies in my github (along with all their respective licenses and source code where I could).

SPECIAL NOTE
If you're using my SuperLemminiToo code base, you'll need to copy the /data folder into the /bin folder, for SuperLemminiToo to recognize it.

After that's all set up, and you're able to build the code, you're ready to start playing. I recommend looking through the code, or even running step by step through it.

Charles


Charles

#2
replying to your question from the other thread:
Quote from: WillLem on October 20, 2021, 05:06:00 AM
So, I had a go at changing the xPos for the countdown graphic... at least, I think that's what I've done. In the GameController class, I changed the number in line 1815 from /2 ; to /8 ;

NOTE: This change is, in fact, twice as much as is needed. The numbers only need to be moved 3px to the right.






At the moment, it's difficult to check whether this has had any effect, since I get the following error when trying to compile & run the project:



This is in Eclipse, and I'm using JDK 15. Any help anyone can offer would be most welcome! The code is full of red crosses, which I'm guessing will all be many errors which will need to be overcome before I can compile and run...

The graphic will, of course, be easy enough to edit if it comes to that.

I'm not positive, but I think you don't have the dependencies properly configured. On the folder view, there's a bunch of red x icons in the lower left of each tree node. Each of those indicates that there's an error in that file/folder that will prevent compiling. So it's not just the one error the compiler is calling out -- that's probably just the first one.

The Error says it cannot resolve SystemUtils. It can't find it-- doesn't know what it is. A quick google search tells me that SystemUtils is part of the apache commons library.

To add the dependencies, right-click on the SuperLemminiToo1 at the top of your tree view on the left-hand side, and click Properties.

Then go to the Java Build Path section, and select the Libraries tab.  Click Add JARs... That will open a window where you can select the dependencies to add. Browse down to the dependencies folder, and add each of the JAR files there.

IchoTolot

QuoteYou'll need something to edit and compile the Java code in. I recommend Eclipse, but I'm sure there are others.

I can provide another alternative here: IntelliJ

https://www.jetbrains.com/idea/

I use this at my workplace and was positively suprised by it. :)

WillLem

Quote from: Charles on October 20, 2021, 05:27:28 PM
To add the dependencies ... Browse down to the dependencies folder, and add each of the JAR files there.

Thanks for this! I followed these steps (and also added the "data" folder to "bin," as instructed in the OP), and attempted to compile again. I now get this error:



So, I'm a step closer. I remember getting a whole bunch of errors last time I tried to compile Lemmini... I wish I could remember how I fixed it! :forehead:

WillLem

Me and Pooty are having another look at this and we've got it working! :thumbsup:

It turns out that a lot of the issues I was having were likely because I was using an old MacBook Pro. Since Pooty uses Windows, I opened the project in Eclipse on Windows so that we were both working from the same setup and it just worked... irony! ;P

For a quick tester, I changed the logo slightly :lemcat: :crylaugh:



Now to have a look at this Bomber number... (Edit Simon: split into new thread)