Slick Forums Forum Index Slick Forums
Discuss the Slick 2D Library
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Stickvania
Goto page 1, 2, 3  Next
 
Post new topic   Reply to topic    Slick Forums Forum Index -> Games / Demos
View previous topic :: View next topic  
Author Message
zeroone
Regular


Joined: 09 Dec 2009
Posts: 104

PostPosted: Sat Jan 23, 2010 8:26 pm    Post subject: Stickvania Reply with quote

Here's my first attempt at a Slick game:

http://meatfighter.com/stickvania/

Thanks for everyone's help answering my coding questions.
Back to top
View user's profile Send private message
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sat Jan 23, 2010 9:12 pm    Post subject: Reply with quote

doesn't work here, just get a blank screen after applet finishes downloading, no error or extra output on the java console.
Back to top
View user's profile Send private message
zeroone
Regular


Joined: 09 Dec 2009
Posts: 104

PostPosted: Sat Jan 23, 2010 9:18 pm    Post subject: Reply with quote

Kappa,

You may need to click on it.
Back to top
View user's profile Send private message
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sat Jan 23, 2010 9:20 pm    Post subject: Reply with quote

zeroone wrote:
Kappa,

You may need to click on it.


sorry no luck.

I'm on linux 64 bit, just got someone else to test it on mac, they have the same problem.
Back to top
View user's profile Send private message
TheMatrix154
Regular


Joined: 19 Jun 2007
Posts: 183
Location: Germany

PostPosted: Sat Jan 23, 2010 10:10 pm    Post subject: Reply with quote

No problems on my macbook pro os x 10.6.2 java 6 64 bit.
_________________
Blog | Astroiz | ConK
Back to top
View user's profile Send private message Visit poster's website
kdnewton
Regular


Joined: 07 May 2009
Posts: 123
Location: Okanagan, BC, Canadia

PostPosted: Sun Jan 24, 2010 5:41 am    Post subject: Reply with quote

No luck here, either. I'm using Ubuntu 9.10 x86. The applet goes through the download of the packages and I'm left with a blank/black screen.

Up until then, everything looks great. I like the intro graphic Smile Like Nosferatu creeping up stairs.

EDIT: Correction. I tried again, since the material would have been cached. It worked the second time.
_________________
Linux and free software enthusiast.
Back to top
View user's profile Send private message Visit poster's website
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sun Jan 24, 2010 11:29 am    Post subject: Reply with quote

still no luck here, really odd problem though, you could try to put a few System.out.println() in the code, various places in the init( ) and update() methods, from there we can see how far in game it gets before it freezes on the black screen.
Back to top
View user's profile Send private message
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sun Jan 24, 2010 11:54 am    Post subject: Reply with quote

doing some more testing, i found that the problem is somewhere in your AppletGameContainer2 class, i switch the html code over to use org.newdawn.slick.AppletGameContainer and it works without the freeze on the blank screen.

btw cool game Smile
Back to top
View user's profile Send private message
zeroone
Regular


Joined: 09 Dec 2009
Posts: 104

PostPosted: Sun Jan 24, 2010 5:32 pm    Post subject: Reply with quote

Quote:
i found that the problem is somewhere in your AppletGameContainer2 class, i switch the html code over to use org.newdawn.slick.AppletGameContainer and it works without the freeze on the blank screen.

btw cool game


Thanks for your help Kappa. I'll investigate. I wanted to use ScalableGame because I found the game seems to run best in the native resolution of the monitor and AppletGameContainer would not let me set the target resolution.
Back to top
View user's profile Send private message
jattra



Joined: 11 Jan 2010
Posts: 68

PostPosted: Sun Jan 24, 2010 5:38 pm    Post subject: Reply with quote

kdnewton wrote:
No luck here, either. I'm using Ubuntu 9.10 x86. The applet goes through the download of the packages and I'm left with a blank/black screen.

Up until then, everything looks great. I like the intro graphic Smile Like Nosferatu creeping up stairs.

EDIT: Correction. I tried again, since the material would have been cached. It worked the second time.


I have same problem here on Ubuntu 9.04. Not working on second try either.
_________________
Jattra
Back to top
View user's profile Send private message
zeroone
Regular


Joined: 09 Dec 2009
Posts: 104

PostPosted: Sun Jan 24, 2010 7:02 pm    Post subject: Reply with quote

I just updated the game based off of Kappa's advice. Hopefully, it will work better now.

But, I had to clear my WebStart cache (javaws -viewer) before it would work though. Any idea how to avoid that? I didn't sign my application jar. Is that necessary?

Also, I noticed that GameContainer.hasFocus() always returns true now. The bug may have been related to gaining focus after it was loaded. I had a check that would stop the game from updating if it were not in focus.
Back to top
View user's profile Send private message
jattra



Joined: 11 Jan 2010
Posts: 68

PostPosted: Sun Jan 24, 2010 7:27 pm    Post subject: Reply with quote

Working. Nice game zeroone.
_________________
Jattra
Back to top
View user's profile Send private message
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sun Jan 24, 2010 7:51 pm    Post subject: Reply with quote

works great now, really impressive work.

yes about the focus thing, by default slick will not render anything if it does not have focus, so good practice for applets is to set

container.setAlwaysRender(true);

so that it always renders even when it doesn't have focus.
Back to top
View user's profile Send private message
kappa
Oldbie


Joined: 12 Nov 2006
Posts: 353

PostPosted: Sun Jan 24, 2010 7:52 pm    Post subject: Reply with quote

fullscreen doesn't work here though, i get the following error in the console

Code:
org.newdawn.slick.SlickException: Failed to find value mode: 0x0 fs=true
   at stickvania.AppletGameContainer2$Container.setDisplayMode(AppletGameContainer2.java:502)
   at stickvania.Main.update(Main.java:869)
   at stickvania.Main.update(Main.java:842)
   at org.newdawn.slick.GameContainer.updateAndRender(GameContainer.java:657)
   at stickvania.AppletGameContainer2$Container.runloop(AppletGameContainer2.java:604)
   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:604)
   at stickvania.AppletGameContainer2$ContainerPanel.start(AppletGameContainer2.java:235)
   at stickvania.AppletGameContainer2$1.run(AppletGameContainer2.java:94)
Back to top
View user's profile Send private message
zeroone
Regular


Joined: 09 Dec 2009
Posts: 104

PostPosted: Sun Jan 24, 2010 8:14 pm    Post subject: Reply with quote

Quote:
fullscreen doesn't work here though, i get the following error in the console


Thanks. I'll investigate.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Slick Forums Forum Index -> Games / Demos All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group