• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
mwarble

[java] Applets and JOGL

4 posts in this topic

All, I am trying to get JOGL to work with an applet and I am exasperated. I’ll say up front for reasons I won't explain I do not want to use the JNLP Launcher. I just want to use a plain old signed applet with the normal HTML tags. I have spent many hours on this problem and have taken several routes and still haven't succeeded. Here's where I am in the process and the approach I'm taking. 1. Launch a signed applet via HTML with your standard applet tag. 2. To the best of my knowledge, because System.load and System.loadLibrary will only load a library from a local drive not over a network using a URL, I download the required library files (jogl.dll, jogl_awt.dll, jogl_cg.dll, and gluegen-rt.dll) by copying the files from the webserver to a local drive on the end user's machine. Currently I am using the java.io.tmp property as the local directory. This seems to work fine. 3. I then use System.load to load the libraries from java.io.tmp. This seems to work fine. No exceptions. 4. Steps 3 and 4 are done in AccessController doPriviedged block to satisfy the security requirements. Here's the problem. 5. When the code that actually uses the libraries is executed, it tries to reload the libraries from java.library.path. Of course the library files aren't there, because they are in java.io.tmp, and an exception is thrown. So here's my questions/comments: 1. Does anybody know why the system would try to reload the libraries when they have already been loaded? 2. It seems pretty conclusive that java.library.path cannot be changed at runtime, so that isn't an option. Correct me if I'm wrong. 3. I've tried to copy the files to java.library.path, but that is a list of directories, most which require special permision to write to. That doesn't seem to be an option. Correct me if I'm wrong. I am out of ideas on this, so any input would be greatly appreciated. I'll attach a short code snippet that shows how I'm loading the libraries. Thanks, M. Warble AccessController.doPrivileged(new PrivilegedAction() { public Object run() { try { String lib = System.getProperty("java.io.tmpdir"); copyFile("http://www.mydomain.com/" + System.mapLibraryName("jogl"), lib + System.mapLibraryName("jogl")); copyFile("http://www.mydomain.com/" + System.mapLibraryName("jogl_awt"), lib + System.mapLibraryName("jogl_awt")); copyFile("http://www.mydomain.com/" + System.mapLibraryName("jogl_cg"), lib + System.mapLibraryName("jogl_cg")); copyFile("http://www.mydomain.com/" + System.mapLibraryName("gluegen-rt"), lib + System.mapLibraryName("gluegen-rt")); System.load(lib + System.mapLibraryName("jogl")); System.load(lib + System.mapLibraryName("jogl_awt")); System.load(lib + System.mapLibraryName("gluegen-rt")); // code that uses libraries wwd = new WorldWindowGLJPanel(); ...
0

Share this post


Link to post
Share on other sites
Quote:
Original post by INsanityDesign
I haven't really tried before but this https://jogl-demos.dev.java.net/applettest.html does not work for you?


That uses the JNLP launcher. I need to be able to do this without the JNLP launcher.

Thanks for your reply though.
0

Share this post


Link to post
Share on other sites
Yeah I read your post but as I cannot currently imagine a case where you would need to miss JNLP I posted that link. Have you tried the com.sun.opengl.util.JOGLAppletLauncher? Not the JNLPLauncher...



0

Share this post


Link to post
Share on other sites
This is how i do it and it works. (at least for me)

In applet i read the value of 'deployDir' to read resource files from server properly.

'japplet' contains my app .class files


<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
width=1024
height=768
archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
jbox2d-2.0.1-full.jar,
vecmath.jar,
japplet.jar">
<param name="deployDir" value="http://x.x.x.x:xxxx/JApplet/">
<param name="codebase_lookup" value="false">
<param name="subapplet.classname" value="render.JApplet">
<param name="subapplet.displayname" value="JOGL Applet">
<param name="noddraw.check" value="true">
<param name="progressbar" value="true">
<param name="jnlpNumExtensions" value="1">
<param name="jnlpExtension1"
value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
</applet>
0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0