Slick Forums

Discuss the Slick 2D Library
It is currently Tue Oct 15, 2019 1:37 am

All times are UTC




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: FAQ
PostPosted: Fri Aug 10, 2007 1:03 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Q: Where is all the documentation?

The wiki is here. It contains a lot of useful information but isn't updated as often as other sources.

The javadoc is here. Every class and method should have some, if you find one that doesn't - report it.

The forum you're on now is the best place to ask questions. There are some really useful folks hanging around! :)

Slick is provided as is. If you find something that isn't documented, it won't be a surprise at this stage. If you can find it in your heart to work it out for yourself and document it on the way we'd be eternally grateful.

Q: Why are there two ways of rendering most things (images, geometry etc)?

A: One method gives you a path from Java 2D into Slick, it tries to keep the API similar. The other gives you cached state (for instance the calculation of triangles in geometry) which gives you potentially better performance.

Code:
// pseudo code since the API might change

// this method caculates the points of the circle everytime render
g.drawOval(0,0,100,100);

// this method caches the calculations of the points within the circle, you
// don't need to recreate it each time.
Circle c = new Circle(50,50,50);
ShapeRenderer.render(c);


Q: Why haven't you abstracted rendering between Java 2D and OpenGL?

A: In short, the benefits of abstracting the API (easy switching) are outweighed by the negatives (have to emulate everything in both impls). More discussion here: http://slick.javaunlimited.net/viewtopic.php?t=31

This doesn't negate abstracting the rendering for other APIs, maybe between OpenGL and DX in the near future. Or between OpenGL immediate and buffered modes.

Q: How do I get a constant framerate?

A: The best way is to use vertical sync by calling GameContainer.setVSync(true). However if a different constant use GameContainer.setTargetFrameRate(<your frame rate here>);

Q: How come Phys2D is also discussed here?

Phys2D and Slick were provided by the same person. They work reasonably well together and sit in the same sort of game domain.

Q: How come Phys2D isn't directly integrated with Slick? Or at least a binding layer provided?

There have been some attempts in this direction to a greater or lesser extent. See SlickSet for the most prominent. A formal binding hasn't been required yet - but it isn't ruled out for future work.

Q: I see graphics, audio, input and physics support, is there a networking library too?

Not as yet. Networking is any non-naive way is difficult and tends to be specific to the particular game. There are a few generic networking APIs available (see below) but so far none of these give a sufficient level of granualrity and/or provide enough over standard java.net.

Java Game Networking
JNAG

Again, it's not ruled out as potential future work.

Q: Can I use FengGUI with Slick?

One of the Slick users is doing so with reasonable success. The approach is described here.


Top
 Profile  
 
 Post subject: Re: FAQ
PostPosted: Tue Aug 11, 2009 10:35 pm 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
kevglass wrote:
Q: I see graphics, audio, input and physics support, is there a networking library too?

Not as yet. Networking is any non-naive way is difficult and tends to be specific to the particular game. There are a few generic networking APIs available (see below) but so far none of these give a sufficient level of granualrity and/or provide enough over standard java.net.

Java Game Networking
JNAG

Again, it's not ruled out as potential future work.



This is also very nice in my opinion:
NINJA: http://code.google.com/p/ninjanetworking/

Forum thread that also has good information: http://slick.javaunlimited.net/viewtopic.php?t=1795


Also, found this in the forums:
Noodles: http://www.cokeandcode.com/noodles/


Last edited by rhino on Fri Aug 14, 2009 8:25 am, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Tue Aug 11, 2009 10:38 pm 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
GUIS for Slick

Thingle: works nice and easy to setup in Slick:

Home Page: http://slick.cokeandcode.com/thingle/
Widget property documentation: http://thinlet.sourceforge.net/home.html

Forum Thread: http://slick.javaunlimited.net/viewtopi ... hlight=xml

Nifty GUI:
Home Page: http://nifty-gui.lessvoid.com/

TWL:
NateS wrote:
http://twl.l33tlabs.org/

Quite difficult to get going, but very powerful. See SingSong in my sig.

Sig: http://singthegame.com/


Last edited by rhino on Wed Aug 26, 2009 7:24 am, edited 2 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 19, 2009 7:55 am 
Offline
Regular

Joined: Sun Oct 05, 2008 9:24 pm
Posts: 173
How to Scroll a Tiled Map?
http://slick.javaunlimited.net/viewtopic.php?t=1416

How do I save my game?
http://slick.javaunlimited.net/viewtopi ... hlight=xml

How to make smoke trails?
http://slick.javaunlimited.net/viewtopi ... hlight=xml

Jar Files and Webstart
(check bottom of thread for newest info):
http://slick.javaunlimited.net/viewtopic.php?t=1636

twood wrote:
I've never used this plugin, and as far as I know, most people make webstarts manually, or via ant scripts they set up.

There is some more info here:

http://slick.cokeandcode.com/wiki/doku.php?id=webstart
http://www.popcornfarmer.com/gamedev/20 ... webstarts/
http://www.cokeandcode.com/webstarthowto

or search the forums, there should be more useful posts than this one was


How to do a Slick applet?
http://slick.javaunlimited.net/viewtopic.php?t=1612

How to do a timer?
http://slick.javaunlimited.net/viewtopic.php?t=1737


Last edited by rhino on Thu Aug 27, 2009 12:20 am, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Wed Aug 19, 2009 8:59 am 
Offline
Game Developer
User avatar

Joined: Sun May 25, 2008 9:45 am
Posts: 578
rhino wrote:
TWL:
NateS wrote:
http://twl.l33tlabs.org/

Quite difficult to get going, but very powerful. See SingSong in my sig.


http://singthegame.com/

_________________
SingSong Karaoke - http://singthegame.com


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 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