Slick Forums

Discuss the Slick 2D Library
It is currently Sat May 25, 2013 5:11 pm

All times are UTC




Post new topic Reply to topic  [ 29 posts ]  Go to page Previous  1, 2
Author Message
 Post subject:
PostPosted: Thu Nov 08, 2007 8:27 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I had a play with a seperate version of the same sort of thing last night. There's a couple of wierd things I don't get an Slick/JMEDesktop:

a) The example in SlickDesktop doesn't clean the dirty rectangle out after rendering - meaning the dirty rectangle just gets bigger and bigger. (just need to pass the clean flag in as true)

b) The SlickDesktop doesn't perform the same as the JMEDesktop (though this maybe to do with a)

c) JMEDesktop manages it's own dirty rectangle stuff, mostly well but in several places inefficently (glyph rendering most notable). Swing as a RepaintManager that can handle all this stuff for us - I've used this and seems pretty good.

I'm working on simple tests cases for this stuff which I'll hopefully be able to integrate back in with the SlickDesktop stuf.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Thu Nov 08, 2007 12:59 pm 
Offline

Joined: Tue Jul 24, 2007 8:43 am
Posts: 22
Quote:
a) The example in SlickDesktop doesn't clean the dirty rectangle out after rendering - meaning the dirty rectangle just gets bigger and bigger. (just need to pass the clean flag in as true)

b) The SlickDesktop doesn't perform the same as the JMEDesktop (though this maybe to do with a)


The code in SlickDesktop is as close a match as I could make it to JMEDesktop but there, of course, could be nuances of the code that I missed. I also didn't look too closely at the state, etc. classes from jME as I didn't think it would be overly relevant to getting things on screen in Slick so they could do updates and rendering at different rates to the SlickDesktop example.

Quote:
c) JMEDesktop manages it's own dirty rectangle stuff, mostly well but in several places inefficently (glyph rendering most notable). Swing as a RepaintManager that can handle all this stuff for us - I've used this and seems pretty good.

I'm working on simple tests cases for this stuff which I'll hopefully be able to integrate back in with the SlickDesktop stuf.


I really hope the stuff you're looking at will speed up the drawing, and to be honest, I completely forgot about clearing the dirty rect :oops:. As SlickDesktop currently stands I can't see it being useful for a game GUI. I'm using it for my level editor and other stuff, but I am still looking for something (probably fengGUI) that uses hardware rendering for use in the game.

I would like to be able to use it in my game (after testing with Substance and seeing Nimbus) so I'm hoping that with an extra set of eyes looking at the code you can see something that I missed.

Cheers,
Brett


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 8:57 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I've ended up starting from fresh, the JMEDesktop stuff just got me confused. At the moment the demo only works properly on windows - on linux theres an issue of security message that appears on unsigned webstart windows (pushes updates out) and on OSX nothing works at all - might just be my old OSX box. Anyway, this is where it's at right now:

http://slick.cokeandcode.com/demos/swingle.jnlp

The code is much smaller and makes use of Swings repaint mechanisms rather than attempting manage the graphics context manually. If you don't mind I'll continue and resolve the linux and osx bugs and then post the source.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 6:46 pm 
Offline
Oldbie

Joined: Tue Nov 28, 2006 6:18 pm
Posts: 429
Mostly works, but why is the FPS counter centered vertically and painted in black? Besides that everything looks great. Impressive work as always.

Framerate is 1500 or thereabouts. It gets considerably sluggish when I drag the windows around and drops into the 200 FPS zone.

- Jon


Top
 Profile  
 
 Post subject:
PostPosted: Fri Nov 09, 2007 7:46 pm 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
FPS counter is being rendering by normal slick over the top of the GUI. It's half way down so it doesn't get in the way of the menu bars.

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 10, 2007 12:55 am 
Offline

Joined: Tue Jul 24, 2007 8:43 am
Posts: 22
Wow!

Fantastic work Kev, I get somewhere between 3400 and 4000+ FPS even while moving the frames around quickly.

What are you using for the L&F? Is it a texture or a normal Java one?

Cheers,
Brett


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 10, 2007 1:24 am 
Offline
Regular

Joined: Mon May 28, 2007 8:47 am
Posts: 106
Location: Coimbra, Portugal
Nice work Kev.

I get ~400 fps and ~60 fps when dragging. No comment :(


Top
 Profile  
 
 Post subject:
PostPosted: Sat Nov 10, 2007 11:57 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
I'm only intending to use this for static screens, no dragging so it's all good for me.

I'm using SkinLF (GTK and KDE skins) at the moment. I think they look pretty great.

Still having issues with keyboard input on osx, but otherwise I'm just about happy. Though I'm considering support for rendering only certain components into textures rather than everything. That might be more efficient for the stuff I want to do.

I'll post the code soon, it's ended up taking a different route to JMEDesktop but still essentially the same process (those texture updates are painful)

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 11, 2007 12:15 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Found some performance improvements tonight related to getting the buffered image in the optimal format and translating to a texture efficiently.

Also added some functionality to render a single top level component to a texture - this is quite useful for single panel menus that appear centered or something.

On my OSX G4 super slow box the performance for a single panel in the centre of the screen (game menu style) is now adequate for my games needs at least :)

EDIT: Hmm, just thought, wonder what happens with fullscreen

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 11, 2007 12:19 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Source is here btw:

https://bob.newdawnsoftware.com/repos/s ... k/Swingle/

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 11, 2007 3:53 am 
Offline
Regular

Joined: Wed Feb 07, 2007 4:04 am
Posts: 107
Noticed 3 bugs.

1. Textarea does not advance the cursor after each character is type. So the insertion point remains at the same spot. So if you type Hello it comes out olleH.

2. The drop down list does not close after selecting an item.

3. If the drop down list is open when you close a window, the popup for the list remains.

Looking good otherwise. It runs at about 700fps here and drops to about 200 when I am moving a window.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Nov 11, 2007 11:12 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Is that against latest code? I've seen all 3 of those bugs in earlier versions.

If so, which platform?

Kev


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 4:03 am 
Offline
Regular

Joined: Wed Feb 07, 2007 4:04 am
Posts: 107
I started it from the webstart link above, right before my post. I am using Windows XP.


Top
 Profile  
 
 Post subject:
PostPosted: Tue Nov 13, 2007 8:15 am 
Offline
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 3143
Ah, was just out of date then. Haven't update from the webstart. Pretty much set on not using this for games now - never mind huh, only a couple of evenings.

Kev


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

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:  
Powered by phpBB® Forum Software © phpBB Group