Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (581)
games submitted by our members
Games in WIP (500)
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  
  Getting Started  (Read 2859 times)
0 Members and 1 Guest are viewing this topic.
Offline stuffradio

Senior Newbie





« Posted 2008-01-18 22:02:15 »

I want to start making simple games with the Slick API. How easy is it to make something simple and fun at the same time? Any tutorials would be great Wink

I eventually want to be making a simple 2d like mmorpg thing. So I will be working my way up from simple games.
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #1 - Posted 2008-01-18 22:47:52 »

Its pretty simple to start making stuff with slick. The best place to start is to use the tons of example tests that slick comes with. Just have a look at how its done in the examples or better use them as a starting point to build your game on. They will really help you get going.

If you need further help you can also try the slick or lwjgl irc channels, you will usually find lots of helpful people there that'll help you through any problems.
Offline stuffradio

Senior Newbie





« Reply #2 - Posted 2008-01-19 00:02:42 »

Yeah I do need help, I downloaded the slick src but don't know how to import it to eclipse, and I don't know what the IRC channels are.

Edit: I think I figured out how to import it to eclipse.
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline Noya

Senior Newbie





« Reply #3 - Posted 2008-01-19 01:53:37 »

If you don't want to modify the source, you can just use the slick-jar-file. Place it somewhere in your project folder and add it in eclipse via project-properties -> java build-path -> libraries -> add.
Offline stuffradio

Senior Newbie





« Reply #4 - Posted 2008-01-19 02:22:16 »

I did that already. I'm trying to figure out if this is a better framework, or if lwjgl is better. They had an example on their site, and it looked easy. I don't know how to get started with Slick Sad. I just want to start making a basic game :p
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #5 - Posted 2008-01-19 02:26:45 »

In order to get slick running you need to

1) import the external jars slick.jar and lwjgl.jar into eclipse
2) add a vm argument which points to the path where lwjgl's native dll files are located.

Thats the tricky bit, once done you should be on your way.
Offline stuffradio

Senior Newbie





« Reply #6 - Posted 2008-01-19 05:57:22 »

So I need both Slick and lwjgl to do games?
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #7 - Posted 2008-01-19 12:10:21 »

So I need both Slick and lwjgl to do games?

Yes. LWJGL is a simple binding to OpenGL, OpenAL and JInput, so it gives you raw access to the OpenGL API.

Slick on the other hand is a 2d framework/library built on top of LWJGL that allows easy production of 2d games. It contains all the stuff you need like texture loader (png, tga, etc), sound loader(wav, ogg, etc), music loader(ogg, mod, etc), font support, tiledmap and much more, all of which you would have to write yourself if you plan to use plain LWJGL.
Offline purpleguitar

Junior Member





« Reply #8 - Posted 2008-01-19 14:13:22 »

I just wrote a "Slick+Eclipse" tutorial, which you may find useful.  It only goes as far as configuration and a "Hello, World" application, but maybe it's enough to help you get the libraries set up.

http://www.cs.bsu.edu/homepages/pvg/misc/slick_eclipse_tutorial.php
Offline kevglass

JGO Kernel


Medals: 85
Projects: 25


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #9 - Posted 2008-01-19 15:17:58 »

Ok if I link the tutorial into the Slick Wiki?

Kev

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline stuffradio

Senior Newbie





« Reply #10 - Posted 2008-01-19 21:19:05 »

The tutorial looks nice, but I get this error:

Exception in thread "main" java.lang.Error: Unresolved compilation problems:
   AppGameContainer cannot be resolved to a type
   AppGameContainer cannot be resolved to a type

   at edu.bsu.slicktest.SimpleTest.main(SimpleTest.java:1)
Offline stuffradio

Senior Newbie





« Reply #11 - Posted 2008-01-19 21:29:05 »

I fixed that error, you forgot to import org.newdawn.slick.*;

but you also didn't import org.lwjgl.*; which I did just now. I get the following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
   at java.lang.ClassLoader.loadLibrary(Unknown Source)
   at java.lang.Runtime.loadLibrary0(Unknown Source)
   at java.lang.System.loadLibrary(Unknown Source)
   at org.lwjgl.Sys$1.run(Sys.java:75)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.lwjgl.Sys.doLoadLibrary(Sys.java:68)
   at org.lwjgl.Sys.loadLibrary(Sys.java:84)
   at org.lwjgl.Sys.<clinit>(Sys.java:101)
   at org.lwjgl.opengl.Display.<clinit>(Display.java:111)
   at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:38)
   at java.security.AccessController.doPrivileged(Native Method)
   at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:35)
   at edu.bsu.slicktest.SimpleTest.main(SimpleTest.java:26)
Offline kappa
« League of Dukes »

JGO Kernel


Medals: 70
Projects: 15


★★★★★


« Reply #12 - Posted 2008-01-19 22:04:20 »

that error means you haven't got the native libraries configured properly (try step 4 again). Make sure the path is correct. Also remember if on windows to use ; instead of : in the path.
Offline MKova

Senior Newbie





« Reply #13 - Posted 2008-01-20 00:47:46 »

that error means you haven't got the native libraries configured properly (try step 4 again). Make sure the path is correct. Also remember if on windows to use ; instead of : in the path.

where do you use ; instead of : in windows path!?

anyway, as you are working with eclipse, just find lwjgl.jar library in your project and expand it, select natives and select a directory where natives are (usually you need to extract natives-windows/mac/linux as they are in a .jar file and you must point to a directory with files unpacked)

Someone give me my account back!! ChrisM, please? ....
Offline stuffradio

Senior Newbie





« Reply #14 - Posted 2008-01-20 06:43:32 »

MKova awesome! You explained it the best Tongue

It works now Cheesy

So, now I've gotta play with this and see what I can do. Anyone have any other tutorials that you recommend?
Offline purpleguitar

Junior Member





« Reply #15 - Posted 2008-01-21 14:24:54 »

Ok if I link the tutorial into the Slick Wiki?

Please feel free.  I hope it is found useful.

I'll point out that, within Eclipse, one can edit the Properties of a jar (such as lwjgl.jar) and set the native paths for that library.  However, I advise against this since it can cause problems when developing on multiple platforms.  I develop and test in Linux and Windows, but all the code is shared in one repository.  I would rather not have to change all my jars' properties each time I hop between operating systems, so instead, my tutorial advises the reader to use command-line arguments (-Djava.library.path=...).

Offline MKova

Senior Newbie





« Reply #16 - Posted 2008-01-22 06:20:25 »

Well there should not be problems with that as all those properties and added classpaths are stored in .classpath file with is a xml file with data.

Example of lwjgl native location entry in .classpath
   <classpathentry kind="lib" path="lib/lwjgl.jar">
      <attributes>
         <attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="krajina/lib/natives"/>
      </attributes>
   </classpathentry>

I did not check if it works on linux but I can't see why it shouldn't.

Someone give me my account back!! ChrisM, please? ....
Offline purpleguitar

Junior Member





« Reply #17 - Posted 2008-01-22 13:41:28 »

I mean for the native libraries.  You're right that the classpath is fine, but last I checked, if you associate a native library folder with a jar via Eclipse's "properties" dialog, then upload your project to subversion, hop to another operating system, and pull down the code from subversion, it will remember the old native libs.  Now that I think about it, you could probably get around this by putting /all/ your native libraries in one big folder.  This had not dawned on me before since I like to use separate folders for each platform, as this helps me write more clear ant scripts that generate platform-specific resource jars.  If anyone has tried this, I'd be curious to know if it worked.
Offline MKova

Senior Newbie





« Reply #18 - Posted 2008-01-22 14:23:18 »

All native libs in one folder, that's what I'm doing, but I have not got the chance to test it yet on operating systems other than Win XP

Someone give me my account back!! ChrisM, please? ....
Offline CupOfJoe

Junior Newbie





« Reply #19 - Posted 2008-02-20 10:48:39 »

Can Anyone explain to me how to include the Slick library in Apple's Xcode tools?

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.

xsi3rr4x (62 views)
2014-04-15 18:08:23

BurntPizza (60 views)
2014-04-15 03:46:01

UprightPath (73 views)
2014-04-14 17:39:50

UprightPath (56 views)
2014-04-14 17:35:47

Porlus (73 views)
2014-04-14 15:48:38

tom_mai78101 (99 views)
2014-04-10 04:04:31

BurntPizza (159 views)
2014-04-08 23:06:04

tom_mai78101 (254 views)
2014-04-05 13:34:39

trollwarrior1 (208 views)
2014-04-04 12:06:45

CJLetsGame (215 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
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!