Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (475)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (530)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  How to set up slick2d and lwjgl  (Read 2428 times)
0 Members and 1 Guest are viewing this topic.
Offline 8Keep

Senior Newbie


Medals: 1



« Posted 2012-08-27 23:22:23 »

I have followed a few tutorials, but I dont know how to. I am new to java and eclipse. How do I set up the project? I dont get the whole workspace thing, how do I start from the absolute beginning. I know other programming languages so I am not new to programming. Just java and eclipse.
I posted this on the lwjgl forums. but it seems those forums are much less active than java gaming forums.
Offline davedes
« Reply #1 - Posted 2012-08-27 23:25:13 »

Pulling the latest Slick code from Bitbucket

Offline 8Keep

Senior Newbie


Medals: 1



« Reply #2 - Posted 2012-08-28 01:09:55 »

I know I read that on the wiki but what i dont know is how to set up eclipse to work with slick. I dont understand that. What jars do i need and dont need from slick. There are a lot of them. And do I need to download lwjgl too or can i use the one that comes with slick?
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Vladiedoo
« Reply #3 - Posted 2012-08-28 01:31:15 »

This is how I was able to set up Slick2D.

1. Create a folder on your desktop and name it whatever you want, for this example I will say it is named "Slick2D_Files".
2. Open up your browser.
3. Go to http://lwjgl.org/, click download on the left, click latest build (first download link), save "lwjgl-2.8.4.zip" to Slick2D_Files.
4. Go to http://slick.cokeandcode.com/, click "Download Full Distribution" on the right and save it to  to Slick2D_Files.
5. Open Eclipse, create a new project, create a folder called "libs", create two folders inside this, one called "natives" and one called "jars".
6. Open up Slick2D_Files, open the lwjgl-2.8.4 folder, open the native folder, select all the contents (the linux, macosx, solaris, and windows folder) and drag and drop them into your natives folder.
7. Go back to "lwjgl-2.8.4" and open the jar folder, select the lwjgl.jar and lwjgl_util.jar (you might not see the extension of .jar but it's there) and drag those into your jars folder.
8. Go back again to Slick2D_Files and open up the slick folder, open up the lib folder, select the slick.jar and drag it into your jars folder.
9. In eclipse, right click your project and go all the way down to properties, once that is open click "Java Build Path" on the left, then click on Libraries tab.
10. Click "Add JARs...", select the three jar files that you have in your jars folder (located inside your lib folder).
11. Click on the little carrot next to "lwjgl.jar - "Your_Project_Name"/lib/jars
12. Click Native, library location:
13. Click edit, click workspace, inside the lib folder open the natives folder and select your OS system.
14. You're done!

I'm going to edit this to make sure it's understandable, if you have any questions please ask.
Offline 8Keep

Senior Newbie


Medals: 1



« Reply #4 - Posted 2012-08-28 01:38:14 »

This is how I was able to set up Slick2D.

1. Create a folder on your desktop and name it whatever you want, for this example I will say it is named "Slick2D_Files".
2. Open up your browser.
3. Go to http://lwjgl.org/, click download on the left, click latest build (first download link), save "lwjgl-2.8.4.zip" to Slick2D_Files.
4. Go to http://slick.cokeandcode.com/, click "Download Full Distribution" on the right and save it to  to Slick2D_Files.
5. Open Eclipse, create a new project, create a folder called "libs", create two folders inside this, one called "natives" and one called "jars".
6. Open up your created folder (the one one the desktop, the "Slick2D_Files", open the lwjgl-2.8.4 folder, open the native folder, select all the contents (the linux, macosx, solaris, and windows folder) and drag and drop them into your natives folder.
7. Go back to "lwjgl-2.8.4" and open the jar folder, select the lwjgl.jar and lwjgl_util.jar (you might not see the extension of .jar but it's there) and drag those into your jars folder.
8. Go back again to your desktop folder and open up the slick folder, open up the lib folder, select the slick.jar and drag it into your lib folder (the one in eclipse).
9. In eclipse, right click your project and go all the way down to properties, once that is open click "Java Build Path" on the left, then click on Libraries tab.
10. Click "Add JARs...", select the three jar files that you have in your jars folder (located inside your lib folder).
11. Click on the little carrot next to "lwjgl.jar - "Your_Project_Name"/lib/jars
12. Click Native, library location:
13. Click edit, click workspace, inside the lib folder open the natives folder and select your OS system.
14. You're done!

I'm going to edit this to make sure it's understandable, if you have any questions please ask.


Thanks! Thats exactly what I needed. I have another question. what about distributing the final game? I would want to have a zip file to download, with all the assets and data and the jar file. But I dont want the users to have to click on the jar file, I would want either a .bat or .exe file to launch the jar itself. How would I set that up with the libraries and such outside of the packaged jar file?
I saw this post here, but I'm not sure why they do that:
http://slick.javaunlimited.net/viewtopic.php?f=27&t=4763#p27188
Offline sproingie

JGO Kernel


Medals: 201



« Reply #5 - Posted 2012-08-28 01:39:22 »

Wow.  I copy-paste a pom.xml, change the name of the project, and type "mvn compile".  But for some reason people think that's the more complicated solution.

Offline 8Keep

Senior Newbie


Medals: 1



« Reply #6 - Posted 2012-08-28 01:40:34 »

Wow.  I copy-paste a pom.xml, change the name of the project, and type "mvn compile".  But for some reason people think that's the more complicated solution.
Can you explain a bit better? I am a complete newby.
Offline Vladiedoo
« Reply #7 - Posted 2012-08-28 01:49:53 »

 Clueless I'm not sure how to export yet since I've yet to need it (I haven't finished my game yet). It's very do-able and it seems more simple then setting up Slick2D. If you're here to learn then exporting should be a lower priority imo. If for some reason you'd need to be able to export the project very soon, R.D.'s post on the link seems easy to follow, try that. Sorry for not being of much help for this area, if this part goes un-answered I'll edit this post once I find out how to.
Offline sproingie

JGO Kernel


Medals: 201



« Reply #8 - Posted 2012-08-28 01:50:38 »

Wow.  I copy-paste a pom.xml, change the name of the project, and type "mvn compile".  But for some reason people think that's the more complicated solution.
Can you explain a bit better? I am a complete newby.

Not really.  It involves using Maven, and if you're using Slick out of bitbucket, the real story is actually a bit more involved than my flippant answer, at least until they start publishing artifacts to a repo (ruben01, you listening?).  There's a guide on the LWJGL wiki, but it's out of date and I don't recommend using the old version of Slick that one uses.

Offline 8Keep

Senior Newbie


Medals: 1



« Reply #9 - Posted 2012-08-28 01:53:43 »

Not really.  It involves using Maven, and if you're using Slick out of bitbucket, the real story is actually a bit more involved than my flippant answer, at least until they start publishing artifacts to a repo (ruben01, you listening?).  There's a guide on the LWJGL wiki, but it's out of date and I don't recommend using the old version of Slick that one uses.

Oh ok. So what should I do for the distributing problem? And also, I would like it to be one download for all os's if possible.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Vladiedoo
« Reply #10 - Posted 2012-08-28 02:00:52 »

Wow.  I copy-paste a pom.xml, change the name of the project, and type "mvn compile".  But for some reason people think that's the more complicated solution.
Can you explain a bit better? I am a complete newby.

Not really.  It involves using Maven, and if you're using Slick out of bitbucket, the real story is actually a bit more involved than my flippant answer, at least until they start publishing artifacts to a repo (ruben01, you listening?).  There's a guide on the LWJGL wiki, but it's out of date and I don't recommend using the old version of Slick that one uses.



Sorry to ask but I remember reading this briefly else where, I've never used bitbucket but I'd assume it's similar to Google Code where you can push and pull updates from the code? Should I learn to keep my projects updated from bitbucket's Slick2D, that's the most up to date code?
Offline sproingie

JGO Kernel


Medals: 201



« Reply #11 - Posted 2012-08-28 02:05:13 »

I wouldn't keep every project using the latest dev branch, no.  It's just that slick hasn't made any official releases since migrating to bitbucket, but it's made enough changes that it's worth using the new version, so that's more or less what you'll have to work with.  For everything else, stick with a stable release version.

Another possiblity is libgdx, which comes with a wizard that will create eclipse projects for you.  Just download and run http://libgdx.badlogicgames.com/nightlies/dist/gdx-setup-ui.jar and you're good to go.


Offline 8Keep

Senior Newbie


Medals: 1



« Reply #12 - Posted 2012-08-28 02:57:55 »

Ok thanks everyone, but i still need to know how should I distribute my game? My most favorable option would be a launcher type program like minecraft, in fact I would like to have the system like minecraft, the launcher, and the folder in appdata containing the jar, and all the libraries and natives. Is that possible? I dont need a fancy launcher, just some jar or exe that will automatically launch the right jar in my appdata folder, with the libraries and natives loading correctly with it.
Offline sproingie

JGO Kernel


Medals: 201



« Reply #13 - Posted 2012-08-28 03:06:27 »

I'm not really an expert in distribution, and I just stuff everything into one jar using the appropriately-named One-Jar.  Other single-jar deployment solutions are possible with JarSplice, Scar, and no doubt a whole bunch of others.  LWJGL itself has a deployment utility, though I can't recall what it's called (Minecraft uses a hacked version of it).

As for stuff that actually installs things into appdata and whatnot, I'd be looking at installers like NSIS or InstallAnywhere
Offline 8Keep

Senior Newbie


Medals: 1



« Reply #14 - Posted 2012-08-28 03:34:20 »

I'm not really an expert in distribution, and I just stuff everything into one jar using the appropriately-named One-Jar.  Other single-jar deployment solutions are possible with JarSplice, Scar, and no doubt a whole bunch of others.  LWJGL itself has a deployment utility, though I can't recall what it's called (Minecraft uses a hacked version of it).

As for stuff that actually installs things into appdata and whatnot, I'd be looking at installers like NSIS or InstallAnywhere

If you mean this:
http://lwjgl.org/wiki/index.php?title=Deploying_with_the_LWJGL_Applet_Loader_-_Introduction
Thats just for applets. My game will be for pc, mac, and linux.
Offline davedes
« Reply #15 - Posted 2012-08-28 08:21:08 »

I know I read that on the wiki but what i dont know is how to set up eclipse to work with slick. I dont understand that. What jars do i need and dont need from slick. There are a lot of them. And do I need to download lwjgl too or can i use the one that comes with slick? For natives you would point to the newly created "New Folder" and put it in its own folder (for curtosy)
Just read the guide... it will pull everything you need, and then explain how to build slick. After that, just add the slick/lib folder to a User Library in Eclipse, as you would any other library. For example: for JARs, you will need to point to lwjgl.jar, slick.jar, ibxm.jar, jogg*.jar, jorbis*.jar, jinput.jar and a variety of others d

As for distribution, JarSplice is all you need.


EDIT: Ugh.. I keep giving medals to everybody by accident. Appreciate it Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

ctomni231 (37 views)
2014-07-18 06:55:21

Zero Volt (35 views)
2014-07-17 23:47:54

danieldean (28 views)
2014-07-17 23:41:23

MustardPeter (31 views)
2014-07-16 23:30:00

Cero (46 views)
2014-07-16 00:42:17

Riven (47 views)
2014-07-14 18:02:53

OpenGLShaders (36 views)
2014-07-14 16:23:47

Riven (36 views)
2014-07-14 11:51:35

quew8 (32 views)
2014-07-13 13:57:52

SHC (69 views)
2014-07-12 17:50:04
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!