Slick Forums

Discuss the Slick 2D Library
It is currently Thu Nov 14, 2019 6:17 am

All times are UTC




Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject: Re: intro to Slick-AE
PostPosted: Tue May 22, 2012 5:08 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
Hi! If you develop on Eclipse with Android all exception go into logcat, see debug prospective

About using libgdx directly or slick.. they are completely different, libgdx is more more more low level: Slick helps you in get something fast and easy way IMHO

_________________
Blog | Last game Drone Swarm


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Tue May 22, 2012 7:56 pm 
Offline

Joined: Mon May 21, 2012 6:21 pm
Posts: 7
Gornova81 wrote:
Hi! If you develop on Eclipse with Android all exception go into logcat, see debug prospective

About using libgdx directly or slick.. they are completely different, libgdx is more more more low level: Slick helps you in get something fast and easy way IMHO


k have now the exception: http://images.devs-on.net/Image/3VAh7G8 ... ereich.png

The error is that I didnt implemented the abstract method: touchDown, but I dont implement and touch input atm. A bug of slick-ae?


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Tue May 22, 2012 8:58 pm 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1340
Location: Italy
it's to implement or just @override it ?

_________________
Blog | Last game Drone Swarm


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Fri May 25, 2012 2:06 pm 
Offline

Joined: Mon May 21, 2012 6:21 pm
Posts: 7
Gornova81 wrote:
it's to implement or just @override it ?


hmm what do you mean?


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Sat May 26, 2012 9:44 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
@Override means that the method is overwritten. For example, keyDown() is guaranteed to be called for each touch event, and when you override keyDown() in your game, you can decide what happens when a touch occurs.

Concerning your exception, yes, that is a bug. Another one of your posts indicates you have already figured this out, but the source on the main slick webpage is out of date. For most of slick, the older version of the code will work, but for Slick-AE, the old version has bugs. One of them is that it doesn't use LibGDX Methods properly. The new version can be found at https://bitbucket.org/kevglass/slick/downloads. As I said before, your other post indicates you already know all of this, but for others who may not have seen, I repeat it. Also, I will update the link in this post. Thankyou for bringing this to attention.

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


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Sat May 26, 2012 11:49 pm 
Offline

Joined: Mon May 21, 2012 6:21 pm
Posts: 7
hmm as I can imagine I downloaded and compiled it from there, but Im not sure. Ill check it tomorrow ;)


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Sun May 27, 2012 3:39 pm 
Offline

Joined: Mon May 21, 2012 6:21 pm
Posts: 7
Ah nice works now. I updated gdxLib. I only have some problems to understand how the input listener for the touch screen works. I have this method: input.touchDown(x, y, pointer, button);
But what is the pointer/button? And how can I do this if I dont know where x and y is? I also didnt found any examples for touch screen inputs. Is there an interface for touchDown, touchUp.. like KeyListener/MouseLisener?


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Sun May 27, 2012 5:07 pm 
Offline
Oldbie
User avatar

Joined: Thu Jan 13, 2011 4:42 pm
Posts: 349
I'm not sure. Slick-AE is actually designed to use MouseDown for android touches. This does not have a button element. Note that this and similar methods can be used for multi-touch.

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


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Fri Jun 01, 2012 10:50 am 
Offline

Joined: Fri Mar 30, 2012 6:58 pm
Posts: 1
After following the guide, I'll get this error when trying to start my project:

Code:
Exception in thread "main" java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException
   at org.newdawn.slick.ApplicationGDXContainer.start(ApplicationGDXContainer.java:35)
   at de.transformice.renderer.Main.main(Main.java:20)
Caused by: java.lang.ClassNotFoundException: org.lwjgl.LWJGLException
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.net.URLClassLoader$1.run(Unknown Source)
   at java.security.AccessController.doPrivileged(Native Method)
   at java.net.URLClassLoader.findClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
   at java.lang.ClassLoader.loadClass(Unknown Source)
   ... 2 more


Honestly, I am confused. I am still trying to get it running on the computer first (I used normal slick before and want to "port" it to the gdxcontainer). I don't need more libs than those provided in the slick-ae project?


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Fri Jun 01, 2012 9:46 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
It looks like it's not recognizing the class for your game. Just want to double check with you here:

Do you have a Java project for your game, and a separate Android project to run the game?

Your Activity.java in your Android project should look something like this, where Test is your StateBasedGame (or any other game class from slick) class in your Java project:

Code:
package test.android.game;

import org.newdawn.slick.SlickActivity;

import android.app.Activity;
import android.os.Bundle;

public class TestActivity extends SlickActivity {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);

          start(new Test(width, height);
    }
}


Make sure you have all the libraries in a folder called libs (armeabi folder, armeabi-v7a folder, gdx-backend-android.jar, gdx.jar, slick-ae.jar) in your Android project. These don't need to be included in your build path if you have ADT 17 installed, but do if you have a previous version.


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Tue Jul 03, 2012 6:06 pm 
Offline

Joined: Tue Jan 03, 2012 5:05 pm
Posts: 9
I *think* I did it correctly but am getting a random nullpointer exception when looking at the SlickAEDemo-Android.
Location of error is also unknown, it just won't let me build it because "there's an error, go fix it".

My actual project also has an error, namely "Conversion to Dalvik format failed with error 1".
What did I do wrong?
I'd love to work with this.


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Wed Jul 04, 2012 10:59 pm 
Offline

Joined: Tue May 03, 2011 10:38 pm
Posts: 32
Can you post the errors here? I have a feeling I know what the issue is but I need to refresh myself with what's going on.


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Thu Jul 05, 2012 8:28 am 
Offline

Joined: Tue Jan 03, 2012 5:05 pm
Posts: 9
TheVapourRub wrote:
Can you post the errors here? I have a feeling I know what the issue is but I need to refresh myself with what's going on.

Of course. It's caused by a class not found exception, which can be found here: http://pastebin.com/dPeaV5aW (Do you have skype? PM me if you do, that'd be great!)


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Thu Jul 05, 2012 8:32 am 
Offline

Joined: Tue Jan 03, 2012 5:05 pm
Posts: 9
TheVapourRub wrote:
Can you post the errors here? I have a feeling I know what the issue is but I need to refresh myself with what's going on.

Looks like the desktop version also doesn't work, http://i.imgur.com/RHDvD.jpg


Top
 Profile  
 
 Post subject: Re: intro to Slick-AE
PostPosted: Sat Aug 18, 2012 7:01 pm 
Offline

Joined: Tue Jan 03, 2012 5:05 pm
Posts: 9
I *think* I read somewhere that you can include the assets folder of the Android Project in the Desktop project, but I can't find where that was. How would I do such a thing?
EDIT: Never mind, I just did such a thing by adding the assets folder to the "source folders" in the Desktop version's properties.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 39 posts ]  Go to page Previous  1, 2, 3  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 0 guests


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