Slick Forums

Discuss the Slick 2D Library
It is currently Wed May 22, 2013 5:39 pm

All times are UTC




Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

Do you want a contest?
Poll ended at Tue Sep 29, 2009 3:05 pm
yes 95%  95%  [ 18 ]
no 5%  5%  [ 1 ]
i don't know 0%  0%  [ 0 ]
Total votes : 19
Author Message
 Post subject:
PostPosted: Fri Oct 30, 2009 2:16 am 
Offline

Joined: Mon Oct 26, 2009 6:44 pm
Posts: 10
Ha wow excellent! I literally just about managed to complete it in time. Never clicked to fast in my life!!!

I'm on Windows. It crashed first time (webstart crashed rather than the game) - second time it worked fine. It appears bigger than the actual screen though which is a bit of a pain. Not much bigger.


Top
 Profile  
 
 Post subject: NetBeans woes
PostPosted: Fri Oct 30, 2009 6:43 am 
Offline

Joined: Sat Sep 26, 2009 10:26 am
Posts: 9
I need some help with getting my game to work.
When I run it from NetBeans, everything works fine. But when I try running it from Windows, it gives me an error.

So the project has this under Run, VM Options:
-Djava.library.path="C:\Users\Daniel\Documents\NetBeansProjects\Libraries\lwjgl\lwjgl-2.1.0\native\windows"

And has these complie time libraries:
LWJGL
Slick

Both were made by me in the Library Manager. LWJGL has all the jars from lwjgl-2.1.0/jar/ , and Slick has all the jars from slick/lib

The dist folder (created by NetBeans) has BeerGame.jar and a folder called lib that contains all the jars from lwjgl and slick.

I also have a second configuration for WebStart, which has the same VM Options but also has "Run with Java Web Start" checked (I checked "Enable Web Start" under Appliction, Web Start.

So when I run the default configuration (from NetBeans), it all goes well.
When I try the Web Start configuration (also from NetBeans), it gives:

Unable to lauch the application.
Clicking Details gives:
Launch File
Code:
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<jnlp codebase="file:/C:/Users/Daniel/Documents/NetBeansProjects/BeerGame/dist/" href="launch.jnlp" spec="1.0+">
    <information>
        <title>BeerGame</title>
        <vendor>Daniel</vendor>
        <homepage href=""/>
        <description>BeerGame</description>
        <description kind="short">BeerGame</description>


    </information>

    <resources>
<j2se java-vm-args="-Djava.library.path=&quot;C:\Users\Daniel\Documents\NetBeansProjects\Libraries\lwjgl\lwjgl-2.1.0\native\windows&quot;" version="1.5+"/>
<jar eager="true" href="BeerGame.jar" main="true"/>


    <jar href="lib/jinput.jar"/>
<jar href="lib/lwjgl-debug.jar"/>
<jar href="lib/lwjgl.jar"/>
<jar href="lib/lwjgl_test.jar"/>
<jar href="lib/lwjgl_util.jar"/>
<jar href="lib/lwjgl_util_applet.jar"/>
<jar href="lib/slick.jar"/>
<jar href="lib/hiero.jar"/>
<jar href="lib/ibxm.jar"/>
<jar href="lib/jinput.jar"/>
<jar href="lib/jnlp.jar"/>
<jar href="lib/jogg-0.0.7.jar"/>
<jar href="lib/jorbis-0.0.15.jar"/>
<jar href="lib/lwjgl.jar"/>
<jar href="lib/natives-linux.jar"/>
<jar href="lib/natives-mac.jar"/>
<jar href="lib/natives-win32.jar"/>
<jar href="lib/packulike.jar"/>
<jar href="lib/pedigree.jar"/>
<jar href="lib/scalar.jar"/>
<jar href="lib/slick-examples.jar"/>
<jar href="lib/slick-sources.jar"/>
<jar href="lib/slick-util.jar"/>
<jar href="lib/slick.jar"/>
<jar href="lib/tinylinepp.jar"/>
</resources>
    <application-desc main-class="beergame.BeerGame">

    </application-desc>
</jnlp>


and
Exception
Code:
com.sun.deploy.net.FailedDownloadException: Unable to load resource: file:/C:/Users/Daniel/Documents/NetBeansProjects/BeerGame/dist/lib/jogg-0.0.7.jar
   at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1347)
   at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1487)
   at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1465)
   at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1568)
   at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1496)
   at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:217)
   at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:920)
   at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:803)
   at com.sun.javaws.Launcher.downloadResources(Launcher.java:1310)
   at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:838)
   at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:306)
   at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:183)
   at com.sun.javaws.Launcher.launch(Launcher.java:104)
   at com.sun.javaws.Main.launchApp(Main.java:403)
   at com.sun.javaws.Main.continueInSecureThread(Main.java:250)
   at com.sun.javaws.Main$1.run(Main.java:111)
   at java.lang.Thread.run(Thread.java:619)



And wrapped Exception
Code:
java.util.zip.ZipException: invalid entry size (expected 237633544 but got 0 bytes)
   at java.util.zip.ZipInputStream.readEnd(ZipInputStream.java:376)
   at java.util.zip.ZipInputStream.read(ZipInputStream.java:148)
   at com.sun.deploy.net.HttpDownloadHelper.decompressWrite(HttpDownloadHelper.java:253)
   at com.sun.deploy.net.HttpDownloadHelper.download(HttpDownloadHelper.java:134)
   at com.sun.deploy.cache.Cache.downloadResourceToTempFile(Cache.java:523)
   at com.sun.deploy.cache.Cache.downloadResourceToCache(Cache.java:484)
   at com.sun.deploy.net.DownloadEngine.actionDownload(DownloadEngine.java:1322)
   at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1487)
   at com.sun.deploy.net.DownloadEngine.getCacheEntry(DownloadEngine.java:1465)
   at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1568)
   at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(DownloadEngine.java:1496)
   at com.sun.deploy.net.DownloadEngine.getResource(DownloadEngine.java:217)
   at com.sun.javaws.LaunchDownload.downloadJarFiles(LaunchDownload.java:920)
   at com.sun.javaws.LaunchDownload.downloadEagerorAll(LaunchDownload.java:803)
   at com.sun.javaws.Launcher.downloadResources(Launcher.java:1310)
   at com.sun.javaws.Launcher.prepareLaunchFile(Launcher.java:838)
   at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:306)
   at com.sun.javaws.Launcher.prepareToLaunch(Launcher.java:183)
   at com.sun.javaws.Launcher.launch(Launcher.java:104)
   at com.sun.javaws.Main.launchApp(Main.java:403)
   at com.sun.javaws.Main.continueInSecureThread(Main.java:250)
   at com.sun.javaws.Main$1.run(Main.java:111)
   at java.lang.Thread.run(Thread.java:619)



Double clicking BeerGame.jar from Windows just does nothing.
Running java -jar BeerGame.jar from cmd gives:

Code:
C:\Users\Daniel\Documents\NetBeansProjects\BeerGame\dist>java -jar BeerGame.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.libr
ary.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:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
        at org.lwjgl.Sys.loadLibrary(Sys.java:81)
        at org.lwjgl.Sys.<clinit>(Sys.java:98)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:129)
        at org.newdawn.slick.AppGameContainer$1.run(AppGameContainer.java:39)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.newdawn.slick.AppGameContainer.<clinit>(AppGameContainer.java:36)

        at beergame.BeerGame.main(BeerGame.java:36)

C:\Users\Daniel\Documents\NetBeansProjects\BeerGame\dist>


Apologies for such a code dump, but I really have no clue and I'm sorta desperate right now.

I can see the error, I just don't know how to fix it!


I'm also open to any suggestions about a better way to organize my programming environment.


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 7:38 am 
Offline
Slick Zombie

Joined: Wed Apr 02, 2008 1:32 pm
Posts: 1313
Location: Italy
i remember to everybody the must important rule:

Code:
Final pack: Webstart AND Zip (at least working on win32) AND zip with source code (license idea? gplv2?)


that means that i need webstart and zip working at least on win32!

_________________
Blog | Last game Gravity Duck tribute | In progress Gravity Duck tribute


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 9:26 am 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
chrisevans1001 wrote:
Ha wow excellent! I
I'm on Windows. It crashed first time (webstart crashed rather than the game) - second time it worked fine. It appears bigger than the actual screen though which is a bit of a pain. Not much bigger.


Thank you :)!I have started at zero and have never worked with "Slick". I had little sleep the last two weeks :). The screen resolution is fixed by 1280x1024... Today i made a "google code" project and release the sourcecode under the lgpl.


Top
 Profile  
 
 Post subject: Re: NetBeans woes
PostPosted: Fri Oct 30, 2009 2:19 pm 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
Zeophlite wrote:
Code:
C:\Users\Daniel\Documents\NetBeansProjects\BeerGame\dist>java -jar BeerGame.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.libr
ary.path


You need: "java -Djava.library.path=lib/to/you/native/dlls -jar YouGame.jar"...
Hope it helps...


Top
 Profile  
 
 Post subject: Re: NetBeans woes
PostPosted: Fri Oct 30, 2009 2:40 pm 
Offline

Joined: Sat Sep 26, 2009 10:26 am
Posts: 9
Heldenhaft wrote:
You need: "java -Djava.library.path=lib/to/you/native/dlls -jar YouGame.jar"...
Hope it helps...


Ah thank you, that works.
How about webstart?

Also, anyone have an idea where I can host it?


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 3:06 pm 
Offline

Joined: Mon Oct 26, 2009 6:44 pm
Posts: 10
Google sites?

http://lmgtfy.com/?q=free+web+hosting


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 6:10 pm 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
My game at http://slickbeergame.googlecode.com:

The sourcecode is in the trunk and you can download a win32 version. Please start the bat file.

Code:
1. I have used a spring (dependency injection) for the entity/components. You can build entities with components over the xml-schema. Like this:
Code:
   <bean id="de.iritgo.skillfull.Shot" class="de.iritgo.skillfull.entity.EntityImpl" scope="prototype" init-method="initialize">
      <lookup-method name="cloneEntity" bean="de.iritgo.skillfull.Shot"/>
      <property name="eventService" ref="de.iritgo.skillfull.EventService"/>
      <property name="configManager" ref="de.iritgo.skillfull.ConfigManager"/>
      <property name="id" value="shot" />
      <property name="name" value="Shot" />
      <property name="components">
         <util:list list-class="java.util.LinkedList">
            <bean parent="de.iritgo.skillfull.MoveFieldComponent" scope="prototype">
               <property name="mapX" value="10" />
               <property name="mapY" value="10" />
               <property name="duration" value="30" />
               <property name="speed" value="6.0" />
            </bean>
            <bean parent="de.iritgo.skillfull.MoveRotationComponent" scope="prototype">
               <property name="duration" value="30" />
            </bean>
            <bean parent="de.iritgo.skillfull.PositionComponent" scope="prototype">
               <property name="id" value="MainPos" />
               <property name="description" value="The main position component." />
               <property name="relative" value="true" />
               <property name="x" value="0" />
               <property name="y" value="0" />
            </bean>
            <bean parent="de.iritgo.skillfull.CollisionComponent" scope="prototype">
               <property name="id" value="Collision" />
               <property name="description" value="The main position component." />
               <property name="x" value="0" />
               <property name="y" value="0" />
               <property name="width" value="16" />
               <property name="height" value="16" />
            </bean>

The bad things are, that in spring you can not use back references (The parent variable). Another problem is that a new instance is very time-consuming. So I have a large instance pool.

2. To iterate over the entity component tree i use the visitor-pattern. I can activate with the visitor functions in the component. But the visitor-pattern is..... complex ,). See the MoveFieldVisitor-class :)

3. Entity-Command system.
Every entity work with a list of commands. If you press F5 while playing you can see the current command. I think is a nice thing ,).

4. The attack-strategey is controlled by a state-pattern. You find it in the "director" package.

5. My dynamic QuadTree/Grid-Space is... i dont know... i haven't much tested.. maybe slowly. Test it with F5 in the game.

6. No comments at all :)...lousy method names and other illogical functions...

In the next days i will clean up the code :roll: :roll:

sorry for my bad english :cry:


Last edited by Heldenhaft on Sat Oct 31, 2009 10:33 am, edited 1 time in total.

Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 6:12 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
Aaaaaaaaaaaaaah! I'm running out of time.

_________________
Linux and free software enthusiast.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 8:22 pm 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
kdnewton wrote:
Aaaaaaaaaaaaaah! I'm running out of time.

go for it!! :P


Top
 Profile  
 
 Post subject:
PostPosted: Fri Oct 30, 2009 11:56 pm 
Offline
Regular
User avatar

Joined: Thu May 07, 2009 5:09 pm
Posts: 143
Location: Okanagan, BC, Canadia
I present to you

Beer Bottle Rocket Man

Not as polished as it could be. A little buggy, too. There is one level to it.

(I'll update my original post with the source and webstart info, too)

Webstart

Source - libraries included (~ 4MB)

Built and tested on Ubuntu 9.04 i386 (but includes libraries for Mac and Win as well). Sorry, Linux 64bit users. The source is there.

Known bugs:

Walking behind a foreground tile sometimes causes the foreground tiles to disappear and never return, rather than become see-through.

Sometimes the beer bottles take longer than 5 seconds (not normal behaviour) to re-appear. Though they only re-appear when the player has the minimum number of bottles, so don't expect them to always re-appear (normal behaviour).

The "woosh" sound of a bottle opening up seems a little delayed.

All of the zombies rush to the left as soon as the game starts. Weird.

Instructions

Pretend this is an old Nintendo game and the story and instructions are in the booklet but the game doesn't make sense without the booklet.

This is the booklet: The evil doctor wants a beer, so he sent you, his robot, down into the cellar to get it. It's easy enough for you to walk down stairs, but your legs are too short to climb back up. Being a heavy robot with short legs, you can't jump very high.

How are you going to get back up to the doctor to give him his beer?

Note: It is possible to finish the game with a beer for each of you and the doctor.

_________________
Linux and free software enthusiast.
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 1:19 am 
Offline
User avatar

Joined: Fri Dec 28, 2007 3:37 pm
Posts: 87
Location: bremen, germany
sry, but I won't manage it in time.
I was trapped by the call of technology ;)

So I decided to make it an ordinary projekt. (i.e. I'll continue it without time pressure). I'm actually suprised how much I've done in that time... but I set the bar too high ... So there's nothing playable.

good luck folks,
kulpae

_________________
Image
http://www.uraniumlane.de (german)
http://www.uraniumlane.net (english)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 8:15 am 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
kdnewton wrote:
I present to you

Beer Bottle Rocket Man



very nice and cool idea ;)! i have much fun while playing!


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 8:51 am 
Offline

Joined: Tue Sep 29, 2009 12:48 am
Posts: 5
Sorry, me too. I won't be able to finish it on time. But I'll still finish it nonetheless.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Oct 31, 2009 1:21 pm 
Offline
User avatar

Joined: Fri Sep 25, 2009 1:50 pm
Posts: 80
Hi a little update:
Menu and crosslines
http://code.google.com/p/slickbeergame/downloads/list
or Webstart
http://andreas.iritgo.de/tobi/beer-linux.jnlp
http://andreas.iritgo.de/tobi/beer-win.jnlp


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 122 posts ]  Go to page Previous  1 ... 4, 5, 6, 7, 8, 9  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 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