Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (109)
games submitted by our members
Games in WIP (536)
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]
1  Discussions / Business and Project Management Discussions / Re: List of commercial games using Java? on: 2010-10-30 18:41:34
I believe that there are some here you missed:

http://lwjgl.org/projects.php
2  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 03:00:48
Ok, I'll keep that in mind  Wink  Thanks guys for all the quick replies; I was thinking I'd get like 1 reply in 2 days (like the netbeans forums) lol
3  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 01:31:33
Oops, update, I'm not entirely sure on GNU GPLv3.  The GNU representative said that I should send another email...so that's what I'm doing.  He thinks that you only have to provide your passwords in v3 so that things can run on hardware, and so software programs do NOT need to provide password/username information in source code.  I'm pretty sure he's right, but I'll let you guys know what the email response is, if you want to hear it.
4  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 01:21:16
Well, I went to the GNU IRC channel to ask about this...

GNU GPLv2, you don't have to provide passwords (for server virtual host, encryption, etc.). in source code
GNU GPLv3, you have too (I would like to use this one).

At least, that's what they said, just community users.

But, they gave me some good suggestions.

For submitting a highscore, I will track all keystrokes/etc.  Send this to the server which will then play the game using those keystrokes/etc. and compare the highscore submitted by the player to the one my server program creates (and have like a 1% tolerance or something).  I could probably make it where it isn't the actual game, just a simulation stepping through the keystrokes one frame at a time with the level loaded (no drawing obviously).  To try and prevent submission overload, I could log IP/macaddress and stuff to prevent how many times you can submit a highscore in a day (this is weak security as people can use proxies, etc., but still there).  Also, I could provide some type of randomness in points so that you can't get the exact same score as someone else, could be hard on server side.  Anyway, I think that the first 2 sentences will be sufficient.

For games that play online, if a bullet is shot for example, on the server side there is a limit to number of bullets shots, and it would record the player's position at all time so can make sure it doesn't change wildy from 0,0 to 180,180.  I will figure out other stuff for everything somehow Tongue

Thanx guys for the replies; if you have any good ideas about preventing cheating, please let me know here
5  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 00:37:07
Nothing. Just do nothing.

So you're saying...I'm screwed?  Cry
6  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 00:29:36
...as you don't really have any security.

What would you suggest I do please?
7  Discussions / Miscellaneous Topics / Re: Help! GNU GPL Online Game on: 2010-10-30 00:14:25
With Obfuscation, it would at least be a little better.  I know that nothing is unhackable, just wanting to make it harder to be hacked.

What would you suggest then in order to prevent cheating in online games?  How do other Java games (both open source and not) prevent cheating?
8  Discussions / Miscellaneous Topics / Help! GNU GPL Online Game on: 2010-10-29 23:57:01
Didn't know where to put this post...

I would like to put all of my games under the GNU General Public License, but how do I safeguard online games from cheating?  Anyone will be able to see the username and password for accessing the server along with the password to encrypt my packets.  Is it allowed to just leave those fields blank?  What do other GNU GPL games do?

I thought about creating a separate Jar executable that would not be under the GNU GPL that would send the info along with an md5sum of the calling Jar executable (to check no code was tampered with), but...then I can't truly say it is under the GNU license and won't be acceptable for the FSF directory, etc.

Should I just trust the users?  Huh   persecutioncomplex   Kiss

I remember sending an email a long time ago to GNU asking about this (I believe), and I think that they said I couldn't leave the password/username blank, and most be able to build and run exactly like I am able too....but perhaps, my memory is mistaken.  I don't really want to email GNU again because they never offer me alternatives/suggestions to my questions, annoying.

Please help, thanx.
9  Java Game APIs & Engines / Tools Discussion / Are you kidding me? on: 2010-01-18 09:37:10
Since I am talking about several bindings, I thought that this would be the best place to post this...

Okay, so Sun Microsystems made Java.  They also made Solaris.  Yet, there is only one binding (JOGL) that works on Solaris (at least last time I checked all of the bindings' websites)?  Are you kidding me?  Why would I even touch JOAL, JInput, and/or LWJGL when none of them support Solaris (well, there are unofficial hacks/binaries, but I'm not going to put my users through that)?  The point of using Java is to WORA (write once run anywhere)!  You other bindings need to work on Solaris.  How hard is it?  OpenSolaris and Solaris are free OS's.  Do a dual-boot or use the Live CD ffs and compile bindings!  Why would I use LWJGL when I could just use C++ and SDL and support Solaris?

Anyway, I guess I'll just be using JOGL and not offer Joystick support or 3D audio, but this just seems ridiculous...
10  Java Game APIs & Engines / JOGL Development / Re: frame rate issue on: 2008-08-04 19:03:55
1)  Try Animator with setRunAsFastAsPossible to true (or FPSAnimator with higher FPS and scheduleAtFixedRate to true).  Then do Thread.sleep(...) yourself.

2)  You may have selected a display mode that locks it at a certain FPS.  Try it windowed instead of fullscreen.

3)  Maybe the garbage collector is lowering FPS?
11  Java Game APIs & Engines / JOGL Development / Re: getting a bufferedimage from glGetTexImage on: 2008-08-01 20:27:21
First, just create an empty Buffered Image with the specific type you need:

BufferedImage image = new BufferedImage(width,height,BufferedImage.TYPE_INT_ARGB);

Then, you can either iterator through all of the pixels and call image.setRGB(x,y,color) or you can somehow do image.createGraphics and use the Graphics/2D class.

1  
2  
3  
4  
5  
6  
7  
8  
int bitsPerPixel = 1;  //If this doesn't work, change this to 32
int totalWidth = width * bitsPerPixel;

for(int y = 0; y < height; y++) {
  for(int x = 0; x < width; x++) {
    image.setRGB(x,y,byteBuffer.get(x * totalWidth + y));
  }
}


or

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
Graphics2D g = null;

try {
  g = image.createGraphics();
  //I'm not sure how you would do this?
}
finally {
  if(g != null) {
    g.dispose();
  }
}



I'm kind of curious why you even need to do this when you can do the following:

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  
private boolean createTextures = true;
private BufferedImage bufferedImage = null;
private Texture texture = null;

public void loadBufferedImage(File file) {
  BufferedImage image = null;
  try {
    image = ImageIO.read(file);
  }
  catch(IOException e) {
    System.err.println("Unable to load the IMAGE.");
    System.exit(0);
  }
  return(image);
}

public Constructor() {
  bufferedImage = loadBufferedImage(new File("Image.png");
}

//JOGL's display method...
public display(...) {
  if(createTextures) {
    texture = TextureIO.newTexture(image,false);
    createTextures = false;
  }

  //draw the textures
 texture.enable();
  texture.bind();
  TextureCoords coords = texture.getImageTexCoords();
    //drawing here...
 texture.disable();
}

12  Java Game APIs & Engines / JOGL Development / Re: Get rid of window decorations in fullscreen? on: 2008-08-01 17:45:23
Yeah, doing this should work (maybe even try leaving out dispose):

frame.setVisible(false);
frame.dispose();
frame.setUndecorated(true);

Also, make sure that you're using the latest JDK/JRE, because it may have been a bug in a previous release.  But, if that doesn't work, I'd just create two frames.  Then show one, hide the other.  Draw to one and don't draw to the other.  Then when you need to switch just change that stuff.  It'll actually be faster than doing dispose and recreating the window again.  Here's a rough example of what I'm thinking:

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  
36  
37  
38  
39  
40  
41  
private boolean fullscreen = true;

public void setWindowed() {
  fullscreen = false;

  destroyOpenGL();
  fullscreenFrame.setVisible(false);
  windowedFrame.setVisible(true);
  createOpenGL(windowedFrame);
}

//windowedFrame
public void display(...) {
  if(fullscreen) {
    return;
  }

  GL gl = drawable.getGL();
  gl.glFlush
  etc.
}

public void setFullscreen() {
  fullscreen = true;

  destroyOpenGL();
  windowedFrame.setVisible(false);
  fullscreenFrame.setVisible(true);
  createOpenGL(fullscreenFrame);
}

//fullscreenFrame
public void display(...) {
  if(!fullscreen) {
    return;
  }

  GL gl = drawable.getGL();
  gl.glFlush
  etc.
}

13  Java Game APIs & Engines / JOGL Development / Re: flickering with Animator on: 2008-07-22 21:44:35
Maybe try running it with this command:

java -Dsun.awt.noerasebackground=true -jar MyJar.jar

I would expect this to be the problem because when you use the menu it redraws the frame, but I don't know.  Why does it matter if it flickers during the menu anyway?  If they're using the menu, they aren't looking at the game part.  Maybe you could stop animation while they are in the menu (using a listener).
14  Game Development / Performance Tuning / Re: short parameters on: 2008-07-19 18:30:52
First, if you do any lengthy calculations, make sure to use an int.  If you use shorts, it will be slow because Java will convert all of them to ints.  I couldn't find a solution like you are wanting probably because Java wants you to type cast to warn people about what I just said.  Having 2s might make people think that "short s = 2s + 4s + 5s" is just as fast as "short s = (short)(2 + 4 + 5)" when it's not.  Hopefully some one else will come along and give a better solution, but here are some solutions I can offer:

1  
2  
3  
public void foo(int i) {
  short s = (short)i;
}


1  
2  
3  
4  
5  
6  
public void foo(short s) {
}

public void foo(int i) {
  foo((short)i);
}
15  Java Game APIs & Engines / JOGL Development / Re: Help? How do you Auto Install or use Web Start? on: 2008-07-19 03:43:40
Ok, sorry guys and gals I don't mean to keep dragging this topic further, but I still have some questions about Web Start.  I'm going to provide my users with Web Start (and other alternate methods).  My question is where does Web Start install your files?  I know you can go do "javaws -viewer" and see, but most Windows users don't know how to use the command line.  If they want to know where my files are so that they can uninstall it, how can I tell them the location of the files?  Is the current directory automatically set to this?  Thanks again.
16  Java Game APIs & Engines / JOGL Development / Re: Testing Performance on: 2008-07-18 18:52:59
I think most games just use FPS.  At the beginning of your loop do this:

long nanoTime = System.nanoTime();

Then at the end of your loop do this:

nanoTime = System.nanoTime() - nanoTime;
System.out.println("Frames Per Nanoseconds: " + nanoTime);
System.out.println("Frames Per Seconds: " + ((double)nanoTime) / 1000000000.0);


Or you can use System.currentTimeMillis() and divide by 1000.  Also, you could use Animator instead of FPSAnimator and call animator.setRunAsFastAsPossible(true).  Of course, by doing this, everything is going to go extremely fast and probably make the game unplayable, but you can just use it for testing purposes.

Probably the best way to see how well your game is running is to run it on multiple machines.  It might be great on your computer...but on Bob's computer it's crap.
17  Java Game APIs & Engines / JOGL Development / Re: Help? How do you Auto Install or use Web Start? on: 2008-07-14 17:43:35
I wouldn't care about an overhead of just 2Mb in a download, it's not worth the trouble:
1) You will have to make sure all your games keep working with the version of JOGL you ship (if you update your JOGL version). That's also why for example installing JOGL in the JRE (such as in lib/ext) is such a bad idea.
2) Like Orangy Tang said, it's not a good idea to let your users worry about some internal libraries like JOGL.
3) In the time the user had to spend in 'JOGL install dialogs' etc, he could have downloaded the JOGL libs automatically anyway. Probably more than once.

I'd just use Java Web Start. You probably want to update your game every now and then anyway, and JWS will make sure your users will get it automatically.
Here's a nice tutorial: http://www.cokeandcode.com/webstarthowto

There's also the added download time of the JRE (if different version) each game.  Also, are there any restrictions of what you can do in Web Start?  Like full-screen exclusive?  Create files on the harddrive?  Etc.  I'll probably use JWS, but I don't want to learn everything about it if it turns out garbage.
18  Java Game APIs & Engines / JOGL Development / Re: Help? How do you Auto Install or use Web Start? on: 2008-07-13 20:00:55
I'm confused - why are you so concerned about letting the user have the jogl folder where they want and/or downloading it on the fly? Jogl is an internal part of your game that users don't want to know about and shouldn't care about. Why not just ship the whole thing with the files it needs and be done with it?

Every additional step you add frustrates users and makes them give up and go elsewhere. Plus you add the extra uncertainty of the user running against a different version of jogl that you tested against. Why cause yourself and users additional pain for no actual benifit?

Including the windows jogl adds 2 mb to the file size.  Including the mac os x jogl adds 4 mb to the file size.  If the user specifies a directory such as C:/jogl and updates and installs jogl only there, that can shed pounds off of their download time and harddrive space.  If I make 10 games and they only have one 4mb jogl folder where each game directs to, then that saves 36 mb's off of their harddrive space and most importantly download time.  I'm doing this for advanced users.  If you aren't concerned with memory/download time, then the user can use Method 1 to download my game, which will have the Jogl files that I used to compile the game with, and you don't have to do anything but double click on GameRun.jar (and make sure you have JRE updated).
19  Java Game APIs & Engines / JOGL Development / Re: Help? How do you Auto Install or use Web Start? on: 2008-07-13 18:54:28
For anyone that is interested, I am just going to make two methods of downloading:


Method 1 - Includes the jar's and native libraries and allows you to move the "jogl" folder included wherever you like.  Then run GameSetup.jar to set the directory where jogl is located.  If you do not move the folder, then you don't have to run GameSetup.jar, just run GameRun.jar immediately.

MyGame - Windows
MyGame - Mac OSX
MyGame - Linux


Method 2 - Does not include the jar's and native libraries, but you have to run GameSetup.jar to set the directory where jogl is located.

JOGL Homepage to download files

MyGame


Now, I may implement GameInstall.jar into method 2 using the following 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  
InputStream in = null;
FileOutputStream out = null;

try {
  URL url = new URL("https://jogl.dev.java.net/webstart/jogl.jar");
  //https://jogl.dev.java.net/webstart/jogl-natives-win32.jar, etc.
 in = url.openStream();
  out = new FileOutputStream("./temp/jogl.jar");
  int c = 0;
  while((c = in.read()) != -1) {
    out.write(c);
  }
}
catch(Throwable t) {
  System.err.println("ERROR");
}
finally {
  if(in != null) {
    in.close();
  }
  if(out != null) {
    out.close();
  }
}


But I probably won't do this because of proxies.  It will accept a Proxy class, but I don't want my users to have to input that in, etc.

GameRun.jar takes the directory that the user specified using GameSetup.jar and searches in it to find the "lib" folder.  Then it adds it to the classpath:

java -classpath ".;GameData.jar;jogl/lib/jogl.jar;jogl/lib/gluegen-rt.jar" -Djava.library.path="jogl/lib/" -Dsun.java2d.noddraw=true -Dsun.awt.noerasebackground=true mygame.MyGame

I thought that I would post this in case any else needed a solution to deploying jogl games without using webstart...

Web Start always hangs on me when I try to run it because of my crappy internet at home.  So I usually never play any Web Start games because of it  Roll Eyes .  The only way I can download stuff easily is through my browser Opera.  Opera's network code is amazing, so everything goes flawlessly.  So the methods above is probably what I will do.
20  Discussions / Jobs and Resumes / Re: Game Engineer & Intern Positions - San Francisco on: 2008-07-11 05:55:05
I assume you have to live in California?  And if you're like me with 18 hours of classes coming up this semester, can I work on it around my hours?
21  Java Game APIs & Engines / JOGL Development / Re: Help? How do you Auto Install or use Web Start? on: 2008-07-10 21:57:47
Ok, cool, thanks!  If you provide a zip file with the jnlp like you said, can you specify the directory where to install JOGL?  I would really like my clients to just have JOGL installed once (like C:/jogl).  Then my GameRun.jar will use the directory to run the game.  I don't want JOGL installed every time for every game (waste of time and space).
22  Java Game APIs & Engines / JOGL Development / Help? How do you Auto Install or use Web Start? on: 2008-07-10 19:31:03
Hello All  Shocked


First, can someone please direct me to some Web Start tutorials?  I am totally clueless when it comes to Web Start, and I can't seem to find a 100% beginner tutorial on how to create a Web Start program, have it download/install JOGL, and how to make it available on the web.  I just don't get it.   Huh


Ok, now my other question.  I've seen this asked before, but I have never seen it answered.  How do you deploy your game without Web Start?  I would like this because some people would like to download my game and then play it where there is little or no internet.  This is usually the reason why people download games.  You go to your grandmother's, and there isn't any internet, so you want something to do.  You're at school where the internet blocks websites, etc.  This way you can download it at home and then play it wherever you want.  I will describe in detail how I would like this to be done:

1.)  The user downloads my game (.zip file) and then extracts it to a folder.  Then inside of the folder are three files:  GameInstall.jar, GameRun.jar, and GameData.jar.

2.)  The user double clicks (or does java -jar) on GameInstall.jar.  It first asks you what directory you would like to install (or update) JOGL into.  Then it begins to install it there.

NOW, I would think that this would be possible?  If a Web Start program can download and install from https://jogl.dev.java.net/webstart/jogl.jnlp, then I should be able to do the same!  How would I use Java networking to download something from the internet and install it?  Is there not networking/socket code in Java to allow us to download and install something from the internet?  If this is not possible, then could I make Java Web Start program that does nothing but installs JOGL and a dummy .jar file?  This has to 100% work, then my program just uses that directory, right?

I just don't see how this is impossible to do.   Undecided

Please reply, thanks.
~IntuitSea!~
Pages: [1]
 

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

The first screenshot will be displayed as a thumbnail.

CogWheelz (18 views)
2014-07-30 21:08:39

Riven (26 views)
2014-07-29 18:09:19

Riven (15 views)
2014-07-29 18:08:52

Dwinin (13 views)
2014-07-29 10:59:34

E.R. Fleming (34 views)
2014-07-29 03:07:13

E.R. Fleming (12 views)
2014-07-29 03:06:25

pw (44 views)
2014-07-24 01:59:36

Riven (44 views)
2014-07-23 21:16:32

Riven (30 views)
2014-07-23 21:07:15

Riven (31 views)
2014-07-23 20:56:16
List of Learning Resources
by SilverTiger
2014-07-31 18:29:50

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

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

HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54
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!