Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 4:59 am

All times are UTC




Post new topic Reply to topic  [ 42 posts ]  Go to page Previous  1, 2, 3  Next
Author Message
 Post subject:
PostPosted: Sun Jan 24, 2010 9:29 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Kappa,

I resolved more issues, but now I found that in full-screen mode, it can draw sprites outside of the 640x480 boundary. Unlike ScalableGame, there is no clipped region. Any idea how to add clipping to applets in full screen mode?

Edit: Also, when I exit full-screen mode, the scaling is slightly off.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 9:46 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
fullscreen mode still doesn't work here, although i get a different error now

Code:
Sun Jan 24 21:44:04 GMT 2010 ERROR:Target display mode not set.
org.newdawn.slick.SlickException: Target display mode not set.
   at stickvania.AppletGameContainer2$Container.setDisplayMode(AppletGameContainer2.java:468)
   at stickvania.Main.update(Main.java:871)
   at stickvania.Main.update(Main.java:844)
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657)
   at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:574)
   at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:235)
   at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:94)
org.newdawn.slick.SlickException: Game.update() failure - check the game code.
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:663)
   at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:574)
   at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:235)
   at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:94)


You could try clip manually with slick when rendering use, g.setClip(x, y, width, height).

btw any immediate plans to add sound to the game?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 10:08 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Kappa,

I uploaded a new version yet again. It's unlikely that this will fix your problem, but it took care of the clipping problem at least for me.

Quote:
fullscreen mode still doesn't work here, although i get a different error now


What is your monitor native resolution? Do you have a wide screen monitor?

See the latest version of my AppletGameContainer2 class. Perhaps you can give me some advice. I'm not sure how it's possible to get that exception, yet.

Quote:
btw any immediate plans to add sound to the game?


I feel bad about using the original game music due to copyright reasons, but I can't imagine this game with any other music. I'm considering sound options.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Jan 24, 2010 10:25 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
zeroone wrote:
What is your monitor native resolution? Do you have a wide screen monitor?


yes, i have a widescreen monitor, I'm running @ 1680*1050


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 25, 2010 12:22 am 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
Nice game :)...The source works under gentoo 64bit ;-)....


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 25, 2010 3:45 am 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
I've got to give you kudos, zeroone, for being able to stick with that graphical style. I'm a sucker for simplicity but always a victim to complicating things.

I'm not sure if there is supposed to be sound. I've got none.

Re: Castlevania. Stickvania is a nice tribute to the game.

_________________
Linux and free software enthusiast.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 25, 2010 2:19 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Quote:
I'm not sure if there is supposed to be sound. I've got none.


No sound yet. I'm still deciding what to do about that. I would prefer not to just steal the original music.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 25, 2010 2:32 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Quote:
You could try clip manually with slick when rendering use, g.setClip(x, y, width, height).


Kappa,

In Slick's AppletGameContainer, is there anything that prevents the drawing of sprites outside of the original bounds of the container after it enters full-screen mode assuming it maintains the original aspect ratio. ScalableGame draws solid black padding around the display area; so, even if you draw outside of that region, the drawing is covered up. It doesn't look like AppletGameContainer does that and it doesn't seem to clip either.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Jan 25, 2010 7:06 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
zeroone wrote:
Quote:
You could try clip manually with slick when rendering use, g.setClip(x, y, width, height).


Kappa,

In Slick's AppletGameContainer, is there anything that prevents the drawing of sprites outside of the original bounds of the container after it enters full-screen mode assuming it maintains the original aspect ratio. ScalableGame draws solid black padding around the display area; so, even if you draw outside of that region, the drawing is covered up. It doesn't look like AppletGameContainer does that and it doesn't seem to clip either.


opengl's GL11.glViewPort is used, so nothing can draw outside it.


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 27, 2010 2:33 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Quote:
fullscreen mode still doesn't work here, although i get a different error now


Kappa,

The target display mode is set in the constructor of Main; the loop tries to determine the native (maximum) resolution of the monitor. Perhaps I have to do this in the init() method instead possibly due to sort of initialization phase of the Slick API or for some thread related issue. Any idea if that is the case?


Top
 Profile  
 
 Post subject:
PostPosted: Wed Jan 27, 2010 8:30 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
zeroone wrote:
Quote:
fullscreen mode still doesn't work here, although i get a different error now


Kappa,

The target display mode is set in the constructor of Main; the loop tries to determine the native (maximum) resolution of the monitor. Perhaps I have to do this in the init() method instead possibly due to sort of initialization phase of the Slick API or for some thread related issue. Any idea if that is the case?


i can't be sure atm, but i think the way you have done your code, you must do the following before you do Display.create(), to be able to use fullscreen.

Code:
Display.setDisplayMode(new DisplayMode(width,height));


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 07, 2010 12:05 am 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
I added music and sound effects, but it forced me to increase the memory allocated to the applet. I think you need Java plugin 1.6 build 10 or higher because of the JVM argument.

Also, I tried again to address your full screen problems Kappa. Let me know how it goes.

http://meatfighter.com/stickvania/


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 07, 2010 12:17 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
zeroone, plays great now, soundfx and music really give it a nice atmosphere.
however 26mb is IMO too large for a webgame, you should try keep this close to the 5-10mb mark at most.

maybe you could lower the quality on the ogg files, or better try find that music in xm format (which slick also supports) should be even smaller then ogg. Size of the ogg files is probably why you need to increase the vm memory too.

fullscreen still fails here, would using the standard slick applet fullscreen stuff without aspect ratio (i.e. stretched to fullscreen) be good enough for you?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 07, 2010 4:13 pm 
Offline
Regular

Joined: Wed Dec 09, 2009 6:56 pm
Posts: 132
Quote:
zeroone, plays great now, soundfx and music really give it a nice atmosphere.
however 26mb is IMO too large for a webgame, you should try keep this close to the 5-10mb mark at most.

maybe you could lower the quality on the ogg files, or better try find that music in xm format (which slick also supports) should be even smaller then ogg. Size of the ogg files is probably why you need to increase the vm memory too.


Agreed. It's unfortunate that the music file are so large. I'll experiment to see if anything can be done. The SNES used a MIDI-like format; so, the original files are very tiny. Why doesn't Slick support MIDI?

Quote:
fullscreen still fails here, would using the standard slick applet fullscreen stuff without aspect ratio (i.e. stretched to fullscreen) be good enough for you?


What's the latest exception?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 07, 2010 4:22 pm 
Offline
Game Developer
User avatar

Joined: Sun Nov 12, 2006 8:40 pm
Posts: 574
zeroone wrote:
Agreed. It's unfortunate that the music file are so large. I'll experiment to see if anything can be done. The SNES used a MIDI-like format; so, the original files are very tiny. Why doesn't Slick support MIDI?


well not sure there is a good java midi library appart from the built in stuff which uses java sound.

you can get GMod2Mid (under recommended tools) from the Slick sites front page, it converts midi to xm, which can be used with slick.

zeroone wrote:
What's the latest exception?


still the same as last time

Code:
org.newdawn.slick.SlickException: Target display mode not set.
   at stickvania.AppletGameContainer2$Container.setDisplayMode(AppletGameContainer2.java:472)
   at stickvania.Main.update(Main.java:1004)
   at stickvania.Main.update(Main.java:977)
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657)
   at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:577)
   at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:239)
   at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:98)
org.newdawn.slick.SlickException: Game.update() failure - check the game code.
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:663)
   at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:577)
   at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:239)
   at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:98)


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

All times are UTC


Who is online

Users browsing this forum: Bing [Bot] 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