Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (579)
games submitted by our members
Games in WIP (500)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
   Home   Help   Search   Login   Register   
  Show Posts
Pages: [1] 2 3
1  Game Development / Networking & Multiplayer / Re: Reading files from an applet on: 2005-11-22 10:02:49
thx but what if my jar doesn't contain an entry point and only images .. ? Do I have to give the path to all the images then ?
2  Game Development / Networking & Multiplayer / Re: Reading files from an applet on: 2005-11-21 14:46:15
Thx for the help so far. But I am running into a little noob problem here I think. I have the following code:

1  
2  
3  
4  
url = new URL("jar:http://users.pandora.be/kozen/SimpleTest/Kungfu/images.jar!/");
JarURLConnection juc = (JarURLConnection)url.openConnection();
juc.setUseCaches(true);
JarInputStream jis = (JarInputStream)juc.getInputStream();


but this always gives me the following exception:
java.io.IOException: no entry name specified
   at sun.net.www.protocol.jar.JarURLConnection.getInputStream(Unknown Source)
   at menu.LoadingScreen.run(LoadingScreen.java:197)
   at java.lang.Thread.run(Unknown Source)

what can I do about it, and can I directly link to a jar which is on a HTTP server like this from  an applet which is online, or do  I have to do something special for this?

Regards,
Kenzo
3  Game Development / Networking & Multiplayer / Re: Reading files from an applet on: 2005-11-17 15:53:10
I know but the problem is that a webstart application doesn't run "in" a browser, but starts up standalone. Don't really think they want this .. Sad

4  Game Development / Networking & Multiplayer / Reading files from an applet on: 2005-11-17 15:19:00
Hello,

I need to make an applet based game, but the problem is the loading. When I put all my images with the class files into one jar file, the file is a little bit over 1,5 MB which might take to long to download for some poeple if I can't show a progress bar. So my idea was to first download a jar files containing all the class files and a littel bit of pictures to show a loading screen. In the loading screen, I want to download my other jar file, while showing something on screen. But the porblem is that my applet is of course not allowed to download my other jar file from code. How can I do this? I want to create a JarInputStream from a ja file which is located on the same server. I presume I need to download the byte[] from it and create my inputstream from this .. but how can I get the byte[] ..

Hope someone can help me here (another suggestion on creating a download progress bar is also welcome)

Regards,
Kenzo
5  Java Game APIs & Engines / Java 2D / Re: Files not completely loaded on: 2004-08-23 20:03:49
doesn't seam to help it. I don't get any errors, but the aliens are not completely loaded when they are displayed. It's quite strange. Doesn't do anything at the FPS test, but it's not so nice to see Smiley
6  Game Development / Newbie & Debugging Questions / Re: Java 1.2 emulating on: 2004-08-23 15:33:33
euh .. here I am again .. is it possible to set the compiler options in Eclipse 3.0?

sorry for all the lame questions ..
7  Java Game APIs & Engines / Java 2D / Files not completely loaded on: 2004-08-23 15:30:18
Hello,

here I am again .. another problem Smiley

I made a small applet to check FPS under Java2D. It has to be an applet since I think Java 1.2 doesn't have JNLP yet (or am I wrong here?). But when you run the program the sprites are not loaded completely. I use the base code of the Java2D tutorial: http://www.cokeandcode.com/info/tut2d.html, and I also tried a mediatracker already. Any tips ?

You can find the applet here: http://users.pandora.be/kozen/Java2DTest/Applet/java2d.html
8  Game Development / Newbie & Debugging Questions / Re: Java 1.2 emulating on: 2004-08-23 15:25:12
thanx .. !

Didn't know where to put it Smiley
9  Game Development / Newbie & Debugging Questions / Re: Java 1.2 emulating on: 2004-08-23 13:58:50
well I managed to download a JDK 1.2.1 but when I try to compile something with javac it gives me a runtime error on Win 2000, and it works fine on Win 98. Is it possible that JDK 1.2.1 won't work on win 2000?
10  Game Development / Newbie & Debugging Questions / Java 1.2 emulating on: 2004-08-23 11:56:54
Hello,

I need to make a demo for a JRE 1.2, but I have off coarse 1.4.2 and 1.5 installed on my PC. Is it possible to compile for 1.2, and run using 1.2 .. or does someone know where I can still download Java 1.2 ?

Thanx,
Kenzo
11  Java Game APIs & Engines / Java 2D / Re: Java2D Rendering Classes on: 2004-08-20 16:39:13
thanx for the great reply !
I am already reading all this stuff ..
12  Java Game APIs & Engines / Java 2D / Java2D Rendering Classes on: 2004-08-20 13:05:32
Hello,

I want to write a small program to test how fast Java2D runs on an old computer with no real GPU installed. I think a good benchmark would be to render a certain number of sprites and see what the frame rate is. But herefor, I would need an efficient rendering pipeline which calls the repaint as much as possible.

I can of coarse write my own little program with an infinitive while loop in a Thread, but I presume that there might be a better way, or some sort of framework already available for this. Something like a GLDrawable which I need to implement in JOGL/LWJGL. I am completely new to Java2D, so any help is more than welcome. Tips, anyone?

I am also wondering what the best/most optimal way is to render sprites. I can export them as PNG with alpha later, but this might slow down a lot. Perhaps by defining a color which should be transparant might be faster .. does anyone has some experience with this? Again, any help welcome ..

hope someone can give me some good info so I can start on programming Java2D Smiley

Links to sites with interesting information is also more than welcome.

Thanx in advance,
Kenzo

13  Games Center / Archived Projects / Re: Zohar Engine on: 2004-07-29 10:36:48
I know .. but I already had a thread here a month orso ago, when I tried to make a webstart app. from it, but nobody could help me. He couldn't find the resources (images, ..) for some reason. Might look at it once more later today or tomorrow. Will be easier to start then Smiley
14  Games Center / Archived Projects / Re: Zohar Engine on: 2004-07-27 13:44:18
because I just started out with JOGL and was going to change everything later on .. but JOGL doesn't have any audio so I already started with the audio from LWJGL .. make more sense this way ?
15  Games Center / Archived Projects / Zohar Engine on: 2004-07-27 13:05:53
Well .. here I go .. a link to a small page I made for my Quake 3 Port: The Zohar Engine - http://users.pandora.be/kozen/Zohar_Engine/

Please note that it runs rather slow, because I haven't done any optimizations yet. Will perhaps do so in the near future. Has still a few issues, but for the moment I don't really have the time to fix them ..

The source code is also there, so I if you are interested you can take a look ..;

regards,
Kenzo
16  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-14 19:59:51
well I tried it, and gives nothing. I already tried to put all my classes in a new package, because now it was in a default package. Already tried the the SystemClassLoader .. still nothing. I really don't see what I am doing wrong here ! Is there nowhere a decent webstart tutorial or so ?!?
17  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-14 08:32:55
thanx .. will take a look at it tonight then !
18  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-14 07:51:26
well .. I  still haven't fixed my web start problem yet. Might be interesting to have a little test code or something from somebody which uses webstart and works fine. The rest I will find out myself then .. really can't see the problem. I litterly tried the method from the tutorial at the Java Games Factory, but nothing. He can't find it in the JNLP classloader .. !
19  Java Game APIs & Engines / JOGL Development / Re: General question concerning hardwareaccelerati on: 2004-06-14 07:48:38
well .. for JOGL, but work normally, but I don't think it will make any difference in speed. Not sure yet. Haven't really tried, quite a Swing fan so Smiley
20  Java Game APIs & Engines / JOGL Development / Re: Order of operations in ¬†frustum culling. on: 2004-06-14 07:46:39
you can take a look at http://www.gametutorials.com, they have a nice frustum tutorial class which you can use. It implements all these things, but can use a little bit of optimization. Can send you my version if you want to .. just mail me.
Mine partially based on this and on Game Programming Mathematics from Lengyel (great book).
21  Java Game APIs & Engines / JOGL Development / Re: Order of operations in ¬†frustum culling. on: 2004-06-13 18:08:49
hehe .. know the thing! But sometimes you can learn great things of other peoples code. I always rewrite the code in my own style, so I can make sure I understand everything I take over ... ! So it works now ?
22  Java Game APIs & Engines / JOGL Development / Re: Order of operations in ¬†frustum culling. on: 2004-06-13 11:35:10
yip .. although I normally change positions before calling my camera position method, which is gluLookAt() for you.

always stay with the intuitive one. I just presume that there is a culling error in your frustum class, or when you calculate the planes. minuses are easily placed on the wrong side Smiley

Kenzo
23  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-10 15:15:36
thanx for the help .. and would you mind sharing that loader with us. Might be very very handy for a few of us .. !
24  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-10 14:13:48
yip .. there is subdir data with glass.png in it. And it works fine when I perform following command: java -jar Sample.jar

perhaps there is something wrong with the Jarsigner or so. How do you need to sign a jar. I simple used the following method: (from http://java.sun.com/developer/technicalArticles/Programming/jnlp/)

Quote

1. First, create the JAR file:
jar cf JNLPTime.jar TheTime.class
2. Second, create a key in the keystore (or use one you already have). You'll be prompted for information like first name and last. You should at least fill in that information.
keytool -genkey -keystore myKeys -alias jdc
3. Third, sign the JAR. Be sure to remember your password from the previous step.
jarsigner -keystore myKeys JNLPTime.jar jdc


is the this correct ?
25  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-10 13:42:00
well .. I tried the native seperator by calling System.getProperties("file.separator"), but then I always get "\". And the jar executable won't work either then.

Changed everything back to normal, and added the filename also in the output, and I get this:

1  
2  
3  
4  
5  
6  
System separator: \
Resource stream: null with filename: data/glass.png
java.io.FileNotFoundException: data\glass.png (Het systeem kan het opgegeven pad niet vinden)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(Unknown Source)      at java.io.FileInputStream.<init>(Unknown Source)
...


so you see that I call py using "data/glass.png", but then he changed it to data\glass.png .. presume this is a windows thing. So I don't know what I am doing wrong here .. !

All these people who made Java Webstart games, how do they do it to load their files .. ? I presume all the data is also in the jar ..
26  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-10 13:20:47
strange .. but I don't write backslashes in my code. Java makes backslashes out of them. Will try the native getDefaultSeperator or something .. know it excists, just have to find how and where Smiley
27  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-10 06:51:36
sorry typo: http://users.pandora.be/kozen/demos/
28  Java Game APIs & Engines / JOGL Development / Re: Java Webstart Problem on: 2004-06-09 21:01:15
Sorry for long dealy, was out away for a few days, but I still have the same problem. To load my files I simply use the following methods:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
public static URL getResourceURL(final String filename) throws IOException {
        // Try to load resource from jar
       URL url = ClassLoader.getSystemResource(filename);
        System.out.println("Resource url: "+url);
        // If not found in jar, then load from disk
       if (url == null) {
            return new URL("file", "localhost", filename);
        } else {
            return url;
        }
    }

    public static InputStream getResourceAsStream(final String filename) throws IOException {
        // Try to load resource from jar
       InputStream stream = ClassLoader.getSystemResourceAsStream(filename);
            System.out.println("Resource stream: "+stream);
        // If not found in jar, then load from disk
       if (stream == null) {
            return new FileInputStream(filename);
        } else {
            return stream;
        }
    }


When i try to run a simple sample program from a jar, this gives no errors. He always finds the extra jars for JOGL, ... but he can't seam to read my data, which is also in the jar. I get a null pointer when I try to create the data. This is the error:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
Resource stream: null

java.io.FileNotFoundException: data\glass.png (Het Systeem kan het opgegeven pad niet vinden)
      at java.io.FileInputStream.open(Native Method)
      at java.io.FileInputStream.<init>(Unknown Source)
      at java.io.FileInputStream.<init>(Unknown Source)
      at ResourceRetriever.getResourceAsStream(ResourceRetriever.java:30)
      at TextureReader.readImage(TextureReader.java:29)
      at TextureReader.readTexture(TextureReader.java:23)
      at TextureReader.readTexture(TextureReader.java:15)
      at Sample.createTexture(Sample.java:427)
      at Sample.init(Sample.java:511)
      at net.java.games.jogl.impl.GLDrawableHelper.init(GLDrawableHelper.java:68)
      at net.java.games.jogl.GLCanvas$InitAction.run(GLCanvas.java:187)
      at net.java.games.jogl.impl.windows.WindowsGLContext.makeCurrent(WindowsGLContext.java:144)
      at net.java.games.jogl.impl.windows.WindowsOnscreenGLContext.makeCurrent(WindowsOnscreenGLContext.java:110)
      at net.java.games.jogl.impl.GLContext.setRenderingThread(GLContext.java:253)
      at net.java.games.jogl.GLCanvas.setRenderingThread(GLCanvas.java:148)
      at net.java.games.jogl.Animator$1.run(Animator.java:89)
      at java.lang.Thread.run(Unknown Source)


I placed my little demo online at http://users.pandora.be/koze/demos/. If you check the java console, you'll see the error, and you can also check that the data is in the Jar. I also placed my source code inside the jar. Hope someone can find my error, so i can put my game online :)
29  Java Game APIs & Engines / JOGL Development / Java Webstart Problem on: 2004-06-01 07:53:51
Hello,

I am trying to make a webstart version of my game, but i have a problem. Everything works fine if I startup the game from my local disc, and have my data (models, textures, ..) in a directory; although all this data is also in the jar. When I startup the jar from somewhere else I don't need the data dir. Only when I try to run the webstart application. What am I doind wrong here ?

Here is the webstart code:

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
<?xml version="1.0" encoding="UTF-8"?>
<jnlp spec="1.0+" codebase="http://users.pandora.be/kozen/demos" href="Sample.jnlp">
<information>
  <title>JOGL Sample</title>
  <vendor>K. Development</vendor>
  <description>JOGL Demo</description>
</information>
<offline-allowed/>
<security>
      <all-permissions/>
</security>
<resources>
  <j2se version="1.4+" />
  <jar href="Sample.jar"/>
  <jar href="Resources/jogl.jar"/>
</resources>
<resources os="Windows">
    <j2se version="1.4+"/>
    <nativelib href="Resources/jogl-natives-win32.jar"/>
  </resources>
  <resources os="Linux" arch="i386">
    <j2se version="1.4+"/>
    <nativelib href="Resources/jogl-natives-linux.jar"/>
  </resources>
  <resources os="OSX">
    <j2se version="1.4+"/>
    <nativelib href="Resources/jogl-natives-macosx.jar"/>
  </resources>
  <resources os="Mac OS X">
    <j2se version="1.4+"/>
    <nativelib href="Resources/jogl-natives-macosx.jar"/>
  </resources>

<application-desc main-class="Sample" />
</jnlp>


Regards,
Kenzo
30  Java Game APIs & Engines / Java Sound & OpenAL / Re: OpenAL Startup Problem on: 2004-06-01 07:41:00
Thank you very much !!
Pages: [1] 2 3
 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

xsi3rr4x (37 views)
2014-04-15 18:08:23

BurntPizza (33 views)
2014-04-15 03:46:01

UprightPath (49 views)
2014-04-14 17:39:50

UprightPath (31 views)
2014-04-14 17:35:47

Porlus (48 views)
2014-04-14 15:48:38

tom_mai78101 (69 views)
2014-04-10 04:04:31

BurntPizza (129 views)
2014-04-08 23:06:04

tom_mai78101 (229 views)
2014-04-05 13:34:39

trollwarrior1 (193 views)
2014-04-04 12:06:45

CJLetsGame (200 views)
2014-04-01 02:16:10
List of Learning Resources
by SHC
2014-04-18 03:17:39

List of Learning Resources
by Longarmx
2014-04-08 03:14:44

Good Examples
by matheus23
2014-04-05 13:51:37

Good Examples
by Grunnt
2014-04-03 15:48:46

Good Examples
by Grunnt
2014-04-03 15:48:37

Good Examples
by matheus23
2014-04-01 18:40:51

Good Examples
by matheus23
2014-04-01 18:40:34

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:22:30
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!