Java-Gaming.org    
Featured games (81)
games approved by the League of Dukes
Games in Showcase (487)
Games in Android Showcase (112)
games submitted by our members
Games in WIP (553)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: 1 2 [3] 4
  ignore  |  Print  
  Anyone working on the NeHe tutorials?  (Read 16930 times)
0 Members and 1 Guest are viewing this topic.
Offline pepijnve

Junior Member




Java games rock!


« Reply #60 - Posted 2003-09-16 21:15:10 »

I've modified JavaCoolDudes code to look similar to my own code (hope you don't mind). Updated zip here.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #61 - Posted 2003-09-17 03:35:11 »

I liked how you mixed up my work and yours, big thumb up Smiley
Offline mockum

Junior Newbie




Java games rock!


« Reply #62 - Posted 2003-09-17 20:30:20 »

Here's an Ant build.xml:

<?xml version="1.0"?>

<!-- Ant build file for the NeHe OpenGL/JOGL demos. -->
<project name="nehe-demos" default="jar" basedir=".">

 <property file="ant.properties"/>

 <property name="build.dir" value="build"/>
 <property name="cache.dir" value="cache"/>
 <property name="dist.dir" value="lib"/>
 <property name="src.dir" value="src"/>
 <property name="jar" value="${dist.dir}/nehe-demos.jar"/>
 <property name="dist" value="${dist.dir}/nehe-demos.zip"/>
 <property name="jogljar" value="${dist.dir}/jogl.jar"/>
 <property name="debug" value="false"/>

 <path id="project.class.path">
   <pathelement path="${java.class.path}"/>
   <pathelement path="${jogljar}"/>
 </path>


 <target name="init">
   <tstamp/>
 </target>


 <target name="prepare" depends="init">
   <mkdir dir="${build.dir}"/>
   <mkdir dir="${dist.dir}"/>
 </target>


 <target name="compile" depends="prepare">
   <depend srcdir="${src.dir}" destdir="${build.dir}" cache="${cache.dir}" closure="yes"/>
   <javac srcdir="${src.dir}" destdir="${build.dir}" debug="${debug}">
        <classpath refid="project.class.path"/>
   </javac>
 </target>


 <target name="jar" depends="prepare,compile">
   <jar jarfile="${jar}" basedir="${build.dir}"/>
 </target>


 <target name="dist" depends="jar,clean">
   <delete file="${dist}"/>
   <zip zipfile="${dist}" basedir="."/>
 </target>


 <target name="clean" depends="init">
   <delete dir="${build.dir}"/>
   <delete dir="${cache.dir}"/>
 </target>


 <target name="clean-all" depends="clean">
   <delete file="${jar}"/>
   <delete file="${dist}"/>
 </target>
</project>


And a sample (and optional) ant.properties:

# Tell Ant which compiler to use.
build.compiler=jikes

# Tell Ant and Jikes to output errors in a emacs-friendly format.
build.compiler.emacs=yes

# Tell javac/jikes to include debugging information into the .class files.
debug=on
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pepijnve

Junior Member




Java games rock!


« Reply #63 - Posted 2003-09-18 05:13:52 »

Thank you for the build script. I have added it to the zip file on my server.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #64 - Posted 2003-09-19 17:11:38 »

Would somebody contact Nehe about the work that we did so far? Seeing the current shape of the material, I think it's safe to expose it to a larger audiance through the mentioned website.
Peace.
PS: I'm too busy working on a little demo which will demonstrate the use of vertex shaders in volume shadows :p
Offline Caoimhin

Junior Member





« Reply #65 - Posted 2003-09-19 20:51:33 »

I've pointed Jeff Molofee (NeHe) to this thread awhile back.  I think you guys only need to submit your ports to him. I know pepijnve has already sent a few ports to him.
Offline pepijnve

Junior Member




Java games rock!


« Reply #66 - Posted 2003-09-21 11:21:19 »

I've updated the zip on my server again. I've added the last two lessons I was going to port.
zip file
Offline Java Cool Dude

Senior Member




Java forever


« Reply #67 - Posted 2003-09-21 16:02:00 »

Quote
I've updated the zip on my server again. I've added the last two lessons I was going to port.
zip file


What happened to lesson 30 and 24? Huh
Offline pepijnve

Junior Member




Java games rock!


« Reply #68 - Posted 2003-09-21 17:01:47 »

I haven't had time to integrate them yet. Patience my friend Smiley
Offline Java Cool Dude

Senior Member




Java forever


« Reply #69 - Posted 2003-09-21 17:03:59 »

Quote
I haven't had time to integrate them yet. Patience my friend Smiley


Roger that Grin
/me back working a Quake3 model + animation loader for JOGL Tongue
Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline pepijnve

Junior Member




Java games rock!


« Reply #70 - Posted 2003-09-21 18:52:25 »

I've added lessons 24 and 30 and updated the zip.
Offline kaffiene
« Reply #71 - Posted 2003-09-21 21:13:04 »

Is it possible to submit the nehe tutorials to the jogl/demos cvs repository?

That would provide one point of contact to get all the jogl tutorials (NeHe provides no way to browse only those tutorials that have Jogl ports AFAIK)

It would also allow all updates to be fetched in one go, and put the demos somewhere where visitors to games.dev.java.net are likely to find them.

Offline Ken Russell

JGO Coder




Java games rock!


« Reply #72 - Posted 2003-09-21 21:18:27 »

I've been hoping someone on this thread could assemble the demos into that tree and test the results to make sure they all build and run. Any takers?
Offline pepijnve

Junior Member




Java games rock!


« Reply #73 - Posted 2003-09-21 21:31:54 »

Ken, the demos I've put up on my site should integrate fine now with the other demos from jogl. All source is under a package demos.nehe. Also all the demos read their data file from a directory demos/data/(images|models|samples) and also support that these files are read from a jar. Is this sufficient? As you know I'm kind of stuck on signing the contributors agreement, so someone else will have to check them in.
Offline Ken Russell

JGO Coder




Java games rock!


« Reply #74 - Posted 2003-09-21 21:47:12 »

It sounds good. Ideally I would like a developer to sign up for maintaining these demos once checked in to the source tree.

Could you please file an RFE for integrating these sources into the jogl-demos tree? Thanks.
Offline pepijnve

Junior Member




Java games rock!


« Reply #75 - Posted 2003-09-21 21:57:06 »

Done
Offline Java Cool Dude

Senior Member




Java forever


« Reply #76 - Posted 2003-09-21 22:34:05 »

Quote
I've added lessons 24 and 30 and updated the zip.


You only included the .Bat files my friend Grin
Offline pepijnve

Junior Member




Java games rock!


« Reply #77 - Posted 2003-09-22 05:54:22 »

Serious? Hum, there goes my reputation Grin I'll fix this asap (being tonight).
Offline pepijnve

Junior Member




Java games rock!


« Reply #78 - Posted 2003-09-22 17:05:18 »

Stupid me. I uploaded the wrong zip file. That little mistake has been corrected now.
Offline Java Cool Dude

Senior Member




Java forever


« Reply #79 - Posted 2003-09-22 17:14:41 »

Pepi: I'm working on a Quake3 loader and animator in JOGL, and I'm pretty advanced as I type in these lines.
Question is, do you mind taking my code once done and shape it the way you did with my nehe's port?
Like including the binaries etc...
I also wanna use your bitmapLoader class as it's that || close to mine, but looks prettier to the eye Cheesy
Offline Caoimhin

Junior Member





« Reply #80 - Posted 2003-09-22 20:24:31 »

I've a silly question.  Why are you guys using batch files?  Why aren't you just making your jars executable?

I've never found someone else's batch file to be compatible with my runtime environment on Win32.  And they're useless on other platforms.

Just curious...
Offline pepijnve

Junior Member




Java games rock!


« Reply #81 - Posted 2003-09-22 20:29:24 »

Good point. I simply hadn't thought of packaging them that way. I'll see if I can repackage the lessons quickly.
Offline pepijnve

Junior Member




Java games rock!


« Reply #82 - Posted 2003-09-22 21:29:14 »

http://pepijn.fab4.be/nehe/nehe-demos-execjars.zip
Here's a zip containing each lesson as a self contained executable jar. I repackaged them manually for now. I'll look into a proper ant script tommorrow.
Offline quintesse

Junior Member




Java games rock!


« Reply #83 - Posted 2003-09-23 13:46:44 »

I think the MANIFEST is wrong, it now says something like Main-Class: demos/nehe/lesson04/Lesson04 while I think it should be Main-Class: demos.nehe.lesson04.Lesson04 (I'm getting class not found errors while unpacking the jar and executing manually does work).

The other thing is that the jars all refer to Class-Path: data-lessonNN.jar, are these necessary? (although I don't think they're doinig any harm either)
Offline pepijnve

Junior Member




Java games rock!


« Reply #84 - Posted 2003-09-23 14:06:57 »

The class-path item is indeed wrong. That's what you get when doing late night updates Wink. I'm not sure about the main-class item though. The manifest spec says
Quote
Main-Class :
The value of this attribute defines the relative path of the main application class which the launcher will load at startup time. The value must not have the .class extension appended to the class name.

I interpreted 'path' as meaning 'use slashes as separator'. I tested this on my Powerbook and it ran fine there. I didn't test on windows or linux though. I'll give the dot separator approach a try when I get home from work.
Offline Caoimhin

Junior Member





« Reply #85 - Posted 2003-09-23 14:18:51 »

You use the dot separator.  For example:

Main-Class: com.myco.game.MyGame
Class-Path: dependency.jar

dependency.jar would then have to be in the same directory as the executing jar or in the current classpath.

My guess is specifying the path with slashes worked because you had those classes in that directory structure on your drive.  It read the drive rather than the contents of the jar.
Offline quintesse

Junior Member




Java games rock!


« Reply #86 - Posted 2003-09-23 15:40:08 »

Maybe that's Java implementation dependent because doing "java some/path/to/a/Class" does not work on my Windows system (j2sdk 1.4.2) regardless if the directories exist or if it's a jar. Only "java some.path.to.a.Class" works.
Offline Caoimhin

Junior Member





« Reply #87 - Posted 2003-09-23 16:29:46 »

I've got some time now to work on the next tutorial, but I'm a big confused now.

Are we going with a common framework?
If not, is pepijnve going to continue to port work to the framework for the jogl demos?
Are we going to have to maintain two versions?  One for nehe.gamedev.net and one for jogl-demos.java.net?  Updating code between two sites is going to be a bear without CVS write access.  And nehe updates his site by hand.


Offline Caoimhin

Junior Member





« Reply #88 - Posted 2003-09-23 16:45:15 »

Ouch, the GLDisplay class is not working on this machine for fullscreen.

1  
2  
3  
4  
5  
6  
7  
8  
C:\Development\Projects\jogl\nehe-demos\src>java demos.nehe.lesson01.Lesson01
Exception in thread "main" java.lang.InternalError: Could not get display mode
        at sun.awt.Win32GraphicsDevice.getCurrentDisplayMode(Native Method)
        at sun.awt.Win32GraphicsDevice.getDisplayMode(Win32GraphicsDevice.java:330)
        at java.awt.GraphicsDevice.setFullScreenWindow(GraphicsDevice.java:195)
        at sun.awt.Win32GraphicsDevice.setFullScreenWindow(Win32GraphicsDevice.java:262)
        at demos.nehe.common.GLDisplay.start(GLDisplay.java:74)
        at demos.nehe.lesson01.Lesson01.main(Lesson01.java:9)
Offline Caoimhin

Junior Member





« Reply #89 - Posted 2003-09-23 16:49:48 »

Quote
Maybe that's Java implementation dependent because doing "java some/path/to/a/Class" does not work on my Windows system (j2sdk 1.4.2) regardless if the directories exist or if it's a jar. Only "java some.path.to.a.Class" works.


I'm running Sun's JRE and JDK.

C:\>java -version
java version "1.4.1_03"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.1_03-b02)
Java HotSpot(TM) Client VM (build 1.4.1_03-b02, mixed mode)

Either slashes or dots work fine for me as long as I'm executing from the top of the package tree.  I also run without a CLASSPATH if I can avoid it.
Pages: 1 2 [3] 4
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

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

The first screenshot will be displayed as a thumbnail.

TehJavaDev (16 views)
2014-08-28 18:26:30

CopyableCougar4 (25 views)
2014-08-22 19:31:30

atombrot (38 views)
2014-08-19 09:29:53

Tekkerue (34 views)
2014-08-16 06:45:27

Tekkerue (32 views)
2014-08-16 06:22:17

Tekkerue (20 views)
2014-08-16 06:20:21

Tekkerue (31 views)
2014-08-16 06:12:11

Rayexar (66 views)
2014-08-11 02:49:23

BurntPizza (44 views)
2014-08-09 21:09:32

BurntPizza (34 views)
2014-08-08 02:01:56
List of Learning Resources
by Longor1996
2014-08-16 10:40:00

List of Learning Resources
by SilverTiger
2014-08-05 19:33:27

Resources for WIP games
by CogWheelz
2014-08-01 16:20:17

Resources for WIP games
by CogWheelz
2014-08-01 16:19:50

List of Learning Resources
by SilverTiger
2014-07-31 16:29:50

List of Learning Resources
by SilverTiger
2014-07-31 16:26:06

List of Learning Resources
by SilverTiger
2014-07-31 11:54:12

HotSpot Options
by dleskov
2014-07-08 01:59:08
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!