Slick Forums

Discuss the Slick 2D Library
It is currently Fri Apr 18, 2014 7:54 pm

All times are UTC




Post new topic Reply to topic  [ 4 posts ] 
Author Message
PostPosted: Sat Dec 24, 2011 5:52 pm 
Offline

Joined: Sat Dec 24, 2011 5:44 pm
Posts: 2
Hi everybody,

I'm trying to follow some basic tutorials from:
http://slick.cokeandcode.com/wiki/doku. ... slick_game

My code isn't very robust either except it's trying to load something testdata/alphamap.png and I'm not exactly sure why:
Code:
package hoofd;
import blahblahblha;
public class HoofdProgramma extends BasicGame {
   public HoofdProgramma() {
      super("test programma");
   }
   @Override
   public void init(GameContainer gc) throws SlickException {   }
   @Override
   public void update(GameContainer gc, int delta) throws SlickException { }
   @Override
   public void render(GameContainer gc, Graphics g) throws SlickException { }
   public static void main() throws SlickException {
      AppGameContainer app = new AppGameContainer( new HoofdProgramma() );
      app.setDisplayMode(640, 480, false);
      app.start();
   }
}


The error is coming from:
Code:
at org.newdawn.slick.tests.AlphaMapTest.main(AlphaMapTest.java:79)


Does anybody have an idea why it's trying to load this file?


Top
 Profile  
 
PostPosted: Thu Dec 29, 2011 11:00 pm 
Offline

Joined: Mon Dec 26, 2011 12:02 am
Posts: 2
Hey!

I am no expert but i can see that no one here to answer you, so I'll try :)

I had this problem before.. so:

Somewhere you load the testdata/alphamap.png i guess for sprite or something, and your environment (I'm using eclipse) cannot access this file.
What i did was, creating a folder in the project and linked it to the folder where my pictures in my computer are, so the project will have the images saved in side it and he can get to them.

NOTE: the path testdata/alphamap.png means the it should be YOURPROJECT/testdata/alphamap.png, which means the folder should be named testdata.

Hope i helped :)


Top
 Profile  
 
PostPosted: Fri Dec 30, 2011 12:08 pm 
Offline
Regular
User avatar

Joined: Thu May 05, 2011 8:35 pm
Posts: 231
Location: Somewhere between the bits and bytes
Well the error clearly states that that it happens inside one of slicks test classes, are you using or extending any of them in your own code?
Maybe your slick jar is corrupt, try re-downloading it.

_________________
For every new problem, a new source of solutions has come to exist.


Top
 Profile  
 
PostPosted: Mon Jan 02, 2012 2:46 am 
Offline

Joined: Sat Dec 24, 2011 5:44 pm
Posts: 2
Hi Guys,

Sorry it took me so long to respond (I was without internet for some time).

I assuming that's where it happens too. I'm assuming it's something that gets called in BasicGame class. However since I'm not so fimilar with the engine I couldn't really find the problem myself (searching google gave me different results).

I'll give both the above a try, thanks guys!


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

All times are UTC


Who is online

Users browsing this forum: Jon 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:  
Powered by phpBB® Forum Software © phpBB Group