Slick Forums

Discuss the Slick 2D Library
It is currently Wed Oct 17, 2018 10:35 pm

All times are UTC




Post new topic Reply to topic  [ 10 posts ] 
Author Message
PostPosted: Thu Mar 01, 2012 5:23 am 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Hey everyone! I have been figuring out how to use mercurial, and think I might feel comfortable using the bitbucket repository soon. Once I do, I would like permission from other devs to update Slick-AE. The updates are described and stored in a temporary repository here: https://github.com/Kenkron/Slick-AE/ (ignore where I added the bin and prebuilt jar. I do not intend to add those to the bitbucket reposotory), and consist of three major changes:

1) The Input class was edited to be compatible with LibGDX version 9 (by adding a few extra parameters to methods)

2) A Shape rendering bug was fixed in which a drawn shape would be partially filled. This problem was caused because Slick's QuadBasedLineStrip renderer class falls back to the DefaultLineStripRenderer class when the width of the shape drawn is 1. The Problem was fixed by adding an alternate QuadBasedLineStripRenderer class to the Slick-ae project (and build.xml) that would override the original one when the project is built. This new one does not have the fallback to the default renderer.
(note: this solution fixed the bug, but I am somewhat unfamiliar with this part of the slick architecture, and though I have not come across any, there may be unintended consequences, if somebody is familiar with shape renderers, please look at the alternate class to see if there are any problems)

3) SavedState was implemented for android as described here:http://slick.javaunlimited.net/viewtopic.php?f=21&t=3559 (and build.xml was updated accordingly)

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Thu Mar 01, 2012 11:16 pm 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
Hi Kenkron,
It’s so nice to read that you take care for the SlickAE and became a committer. Yesterday I wrote Tommy an email and asked him if there is any hope to commit for SlickAE. I also thought about opening my own Slick Github clone. But now I know that, Slick has moved to Mercurial and some active developers are committing updates, great! And better: You manage AndroidAD.It seems I disregarded the forum too much.
I’ll test your github branch tomorrow. Hope that we can merge it soon to the rest of the Slick Project, because it’s confusing enough with a project split in SVN, Mercurial and a Git repo. Do you know what the following Slick projects “Slick-AE1”and “Slick-Android-Test1” imply?

Greets,
Tobse

_________________
XSwing Plus
German Java gaming Slick Tutorial


Top
 Profile  
 
PostPosted: Fri Mar 02, 2012 2:20 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
thankyou for your support. in answer to youre question, no, i am not sure what slick-ae1 and slick-android-test1 imply. perhaps the slick-ae and slick-android-test projects were duplicated in the same directory. i know that windows will sometimes rename a file by adding a number to the end if the file already exists in the target directory.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Fri Mar 02, 2012 10:02 pm 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
I found one problem with the Git SlickAE Project:

One missing class:
org.newdawn.slick.muffin.AndroidMuffin.app
Slick base is the newest bitbucket clone.

Maybe you added it to your local Slick project.

_________________
XSwing Plus
German Java gaming Slick Tutorial


Top
 Profile  
 
PostPosted: Sun Mar 04, 2012 8:12 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
Dad gum! you're right. I must have forgotten to call git add for the saved state commit. I just fixed it. Thanks for the catch! 8)

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Sun Mar 04, 2012 9:23 pm 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
Now the SavedState class is missing. Build is done via the ant build script. First I had to copy the Mercurial Slick project next the the AndroidAD git project.

_________________
XSwing Plus
German Java gaming Slick Tutorial


Top
 Profile  
 
PostPosted: Mon Mar 05, 2012 8:48 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
You're right again! I added SavedState just now. Do you know if there's any way to commit that automatically adds new files? This is embarrassing.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Tue Mar 06, 2012 3:38 pm 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
It should be easy to commit all changes of your project: Simply click on the project, right / commit. The next window shows you all changed files all over the project. Was it what you needed?

I still have a problem building the slick-ae.jar. Now all classes seem to be included. I unpacked your and my Ant built slick-ae.jar and compared the files with winmerge. Names and folders are now all equal. But by using my jar, I get some “VFY: unable to resolve static method “ warnings, and after that a ClassNotFound exception (in thise case for “BounceAnatorAndroid”). I found out this could be something with the Android DX Compiler. And then I noticed that my Slick-AE Eclipse project is not an android project. Maybe that’s the Problem why I can’t build a working jar. Could you please check if there are any project setting files which are not committed. Or is there a special way to build the jar –instead using the Ant script?
You can test my jar to reproduce the problems in the error log with your Bounce-Anator demo.

Included as attachment -600kb are too big for the foum :(
slick-ae-problems.zip
slick-ae.jar (build by me)
Slick-AE Ant build log
Bounce-Anator crash log

_________________
XSwing Plus
German Java gaming Slick Tutorial


Top
 Profile  
 
PostPosted: Tue Mar 06, 2012 6:54 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
AH! I know this one, and it took me forever to find out what it was. The problem is probably that Slick-AE is compiling in java 7. This will work with Slick-AE desktop projects fine, but for android, it needs to compile with version 6. This can be changed in (project>properties>java compiler) I think.

_________________
"Artificial intelligence will never be a match for human stupidity" - "Jamos Kennedynos"


Top
 Profile  
 
PostPosted: Wed Mar 07, 2012 2:32 pm 
Offline
User avatar

Joined: Thu Apr 24, 2008 4:28 pm
Posts: 66
Location: Germany
Ok I got it! –and made a big detour. The problem was really that the slick-ae.jar was built with java 1.7. Can be easily checked by opening the manifest file inside the jar. But for me, changing the build path (project/properties/java build path) or the java Compiler (project/properties/java compiler) had no effect. Then I found out that Ant uses the JAVA_HOME environment variable. So I also changed that to java 1.6, once again without a change.
The solution was: Change the JRE in the Ant task run configuration (right clock on the build.xml/Run As/External Tool Configuration/JRE).

Now I can compile my on slick-ae and run your demo and my game with it. Both run fine now an my SGS2. Green light for commiting SlickAD!

_________________
XSwing Plus
German Java gaming Slick Tutorial


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 10 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group