Hi !
Featured games (91)
games approved by the League of Dukes
Games in Showcase (757)
Games in Android Showcase (229)
games submitted by our members
Games in WIP (844)
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
1  Games Center / 4K Game Competition - 2007 / Re: Tutorial Time + Sources on: 2007-04-14 20:36:49
i know the program yields differend results, and I expected it too.

I know. I probably just got in a hurry and made it sound wrong.

ok so I'm poor at explaining this... oh well if you don't believe me trust your JVM:

The point of my post was to break down the explanation a little simpler than you had already done.
2  Games Center / 4K Game Competition - 2007 / Re: Tutorial Time + Sources on: 2007-04-13 20:19:45
public class MathProgram {
  public static void main(String[] args) {
    int x = 1;
    System.out.println(200 - x + 5);
    System.out.println(200 - (x + 5));
    System.out.println(205 - x);

Your addition of parenthesis changes the problem completely because you are changing a negative x to a positive x.

200 - (x+ 5)
should read
200 + (-x + 5)
and can read
200 + 5 - x
because x is still negative

What you are actually doing is this.
200 + (-x) + 5

This is why you are getting different values. This is a common mistake. If you change the order of things, do not change a positive to a negative or visa versa.
3  Java Game APIs & Engines / JOGL Development / Re: Scrolling background image on: 2007-03-02 00:00:51
I think what you are looking for is called a 3d skybox. Do some googling on this, and here are some links.
4  Games Center / Archived Projects / Re: RPG ( started at least ) on: 2007-03-01 21:45:28
The FF3 style is fairly easy to implement. Just make some backgrounds, give the monsters some random AI and some stats, and set up timers on everyone. There should probably be a stat that handles everyones timings.

Just a few shallow thoughts on a very deep subject. :-)
5  Games Center / 4K Game Competition - 2007 / Re: Road Fighter on: 2007-03-01 01:44:51
Cool game. I was over 40,000, but it doesn't display score after death.
6  Games Center / 4K Game Competition - 2007 / Re: SubPar submitted! on: 2007-03-01 00:00:30
It could be, I have cheap one. It could also be the way the mother board handles the keyboard? Maybe someone else can test this and reply.
7  Games Center / 4K Game Competition - 2007 / Re: SubPar submitted! on: 2007-02-28 22:55:25
There are several things I would like to change about java due to cross platform issues. One would be its lack of control over input devices. We should be able to decide if we want the native feel, or if we want the keyboard and mouse to behave differently than on the host OS. (sounds error prone :-)

The other would be distribution issues. Webstart is only good for smaller applications, and an executable jar simplifies nothing on most platforms. Neither help with file path problems.
8  Games Center / 4K Game Competition - 2007 / Re: Mega (much improved) on: 2007-02-28 22:42:23
I could not launch your webstart here on my Slackware Linux 10.2. It did not through any exception it just closes the window so I cannot tell you anything else.

I am using Ubuntu 6.10 right now and it webstarts just fine, and plays smooth.

Are you using compiz or beryl or similar? What version jre? You may have an old blackdown jre.
9  Games Center / 4K Game Competition - 2007 / Re: SubPar submitted! on: 2007-02-28 22:35:50
I tested it in windows, and the problem was not the same. I had all directions unless the space bar was pressed. I had similar trouble with Choppacide. I would up adding the "F" key as an alternative fire key and that cleared it up. In Choppacide I tried Shift, Cntl, and Alt, and it behaved the same as the Space Bar. There is either a java error with the arrow keys, or with the control keys.

When the space bar is pressed in your game, I have these directions in windows. "N, NE, E, S, W, NW".

I will be back in a little bit.

Here is my key handling code. It seems to work well on most platforms.

public void keyPressed(KeyEvent e) {
      // System.out.println(e.toString());
      // TODO Auto-generated method stub
      if(e.getKeyCode() == KeyEvent.VK_UP)
         verticle = 1;
      if(e.getKeyCode() == KeyEvent.VK_DOWN)
         verticle = -1;
      if(e.getKeyCode() == KeyEvent.VK_RIGHT)
         rotation = 1;
      if(e.getKeyCode() == KeyEvent.VK_LEFT)
         rotation = -1;
      if(e.getKeyCode() == KeyEvent.VK_F || e.getKeyCode() == KeyEvent.VK_SPACE)
         fire = true;
      if(e.getKeyCode() == KeyEvent.VK_ENTER)
         button = 1;
      if(e.getKeyCode() == KeyEvent.VK_ESCAPE)
         button = 2;


   public void keyReleased(KeyEvent e) {
      // TODO Auto-generated method stub
      if(e.getKeyCode() == KeyEvent.VK_UP)
         if(verticle == 1)
            verticle = 0;
      if(e.getKeyCode() == KeyEvent.VK_DOWN)
         if(verticle == -1)
            verticle = 0;
      if(e.getKeyCode() == KeyEvent.VK_RIGHT)
         if(rotation == 1)
            rotation = 0;
      if(e.getKeyCode() == KeyEvent.VK_LEFT)
         if(rotation == -1)
            rotation = 0;
      if(e.getKeyCode() == KeyEvent.VK_F  || e.getKeyCode() == KeyEvent.VK_SPACE)
         fire = false;
10  Games Center / 4K Game Competition - 2007 / Getting Choppacide Finalized on: 2007-02-28 21:39:26
Choppacide has went through several changes since I first submitted it. I have tweeked the controls to make it a bit more manuverable. I also added the "F" key as a fire key because it seems that many linux windows managers handle the space bar odd, and I was loosing control of the ship if I pressed the space bar first. 

I am working on a few visual improvements for the final version of choppacide. I would appreciate any feedback on the game.

11  Games Center / 4K Game Competition - 2007 / Re: SubPar submitted! on: 2007-02-28 21:22:52
I am playing this game on linux and noticed an error.

First off, the game is great, and the difficulty seems balanced.

The error has to do with simultanious buttons being pressed. I can press Up+Left and go go NE, but no other combinations will work. So I only have N, NE, E, S, W.

Great game!

12  Games Center / 4K Game Competition - 2007 / Re: Finally got a webhost for my game! (VOTA) on: 2007-02-20 22:35:26
I updated the jar file on my site. I moved the score because I though javaws window was blocking it, but turns out that is only in linux and not on windows, so the windows version has the score blocked right now.

I also transfered all sounds to a single thread, and it seems to give a better sound, but the music cracks every now and then. If this doesn't work I have some more thoughts.

Does anyone know the ethics of the 4k competition surrounding open sourcing the game. I would like to do that and write a short lay-mans tutorial on sound and music for the 4k if I can get it all working right together.

Oh, and I saw a blank spot on the wiki for kzip usage. Here is what I used on linux, should be mostly the same, just use kzip instead of kzip-static.

kzip-static /s0 /r VOTAk.jar V.class META-INF/MANIFEST.MF

13  Games Center / 4K Game Competition - 2007 / Re: Finally got a webhost for my game! (VOTA) on: 2007-02-20 01:51:55
I had this problem once on windows. I solved it by updating the jre to (I think) update 11.

I just learned sound programming last weekend, but it seems that the midi sequencer should be the problem, not the sine wave generator through regular audio?

Is it possible for MIDI sequencing to be conflicting with the wav-type audio?
14  Games Center / 4K Game Competition - 2007 / Re: ApoFun4k on: 2007-02-19 22:19:25
This is fun. I get twitchy, I have yet to break 200. Maybe if I waited until late at night to play it.

Great idea.
15  Games Center / 4K Game Competition - 2007 / Re: Finally got a webhost for my game! (VOTA) on: 2007-02-19 22:17:29
I am still bug hunting on this game. Is anyone having sound problems. There should be a gunshot, an explosion, and music-ish playing.

And is this game too easy, I often find myself at level 18+.

16  Games Center / 4K Game Competition - 2007 / Re: Finally got a webhost for my game! (VOTA) on: 2007-02-19 02:48:24
Sorry, I forgot to post the controls.

All you need to control this game is the mouse.

    * Left Click: Selects a ship.
    * Left Click: Sets waypoints for the selected ship.
    * Right Click: Sets one waypoint and cancels all others for the selected ship. (for evasive manuvers :-)

17  Games Center / 4K Game Competition - 2007 / Finally got a webhost for my game! (VOTA) on: 2007-02-19 02:30:30
After submitting the game this weekend my web host went down and has yet to come back up. Now I am paying for two web hosts until my old one comes back up so I can transfer the domain.  Undecided

Any way, here is the new webstart link, and I sent in a new submission with the new links.

Sound is variable, it just depends on your sound card (no sound banks necessary). Oddly enough, I have had better luck with alsa on linux than with vendor drivers in windows.
18  Games Center / 4K Game Competition - 2007 / Re: Roadfourk on: 2007-02-18 04:30:00

Have you tried Moogies 4KJO it is a great tool to automatically find the best (or at least one of the very best) compression settings. I really found it useful, thanks Moogie.

Thanks for the link. I would use it, but I am a linux guy. I did however get my game shrunk down using some of his suggestions and submitted the game today, but my web host crashed while I was uploading files and the host is still down, so who knows when the game will actually be posted. In the two years I have used I have never failed to bring down their server with either a file upload or a permission change (and this is not free web hosting). I think I may go back to netfirms soon, I usually had to do something really stupid with a semi-tested script to bring them down. (NOTE: I am not trying to bring these servers down).
19  Games Center / 4K Game Competition - 2007 / Re: Roadfourk on: 2007-02-16 01:30:19
I really enjoyed this game! It made me wish I had some old 2600 paddles. :-)

I just discovered the 4k competition about a week ago, and this looks like a lot of fun.

I used it as an excuse to tackle an old stupid idea I had, and I am about 80 bytes of shaving away from submitting.

Great Game!
20  Java Game APIs & Engines / JOGL Development / Problem with jsr231 on a 64 bit machine on: 2006-08-18 22:33:52
I was sending some compiled code to my friend with everything scripted to automatically set library paths etc so all he would have to do is launch a shell script, and he got an error. The first time, he got an error complaining about a Wrong ELF class "ELFCLASS32". After this I figured out he was running an AMD 64, so he downloaded the beta 5 natives for linux and AMD 64, and he got another ELF class error. Here is the error.

Exception in thread "main" java.lang.UnsatisfiedLinkError: /home/mephibosheth/finaldist/lib/natives/ /home/mephibosheth/finaldist/lib/natives/ wrong ELF class: ELFCLASS64
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(
        at java.lang.ClassLoader.loadLibrary(
        at java.lang.Runtime.loadLibrary0(
        at java.lang.System.loadLibrary(
        at com.sun.opengl.impl.NativeLibLoader$DefaultAction.loadLibrary(
        at com.sun.opengl.impl.NativeLibLoader.loadLibrary(
        at com.sun.opengl.impl.NativeLibLoader.access$100(
        at com.sun.opengl.impl.NativeLibLoader$
        at Method)
        at com.sun.opengl.impl.NativeLibLoader.loadDRIHack(
        at com.sun.opengl.impl.x11.DRIHack.begin(
        at com.sun.opengl.impl.x11.X11GLDrawableFactory.<clinit>(
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(
        at com.faceinthesword.rolegamer.glview.GameView.<init>( at com.faceinthesword.rolegamer.glcontrol.RoleControl.<init>(
        at com.faceinthesword.rolegamer.RoleGamer.<init>(
        at com.faceinthesword.rolegamer.RoleGamer.main(

As you can see, it is now ELFCLASS64. It seems that changing the natives should have solved the problem, but found out otherwise. The graphics card he is using is a Radeon 9000, it is the exact same card I used for testing the initial dri-hack native for linux (I switched to NVidia for linux reasons). He is running Fedora Core 5, and I am unaware as to whether he has SE Linux enabled or not.


21  Java Game APIs & Engines / JOGL Development / Re: Bug in TextureIO.newTexture without Mipmapping? on: 2006-07-05 21:12:23
I was banging my head against the wall playing with TextureIO for maybe the first time (I think I tried it out a few months ago, can't remember :-), until I came across this thread. I turned mipmap to true, and presto, everything works now. Before I was getting a blank square.

For my purposes at this time, I really don't need mipmapping, I am doing a 2D project.

I am using Ununtu linux 6.06.
Nvidia GeForce MX 4000
nvidias kernel module found in the ubuntu repository precompiled for a k7 processor.
The kernel is also precompiled for a k7.
beta 5 of jsr231.

The function is this one.
TextureIO.newTexture(File, boolean);

I may throw this over to my laptop later tonight and test it on an ati with dri running Ubuntu 5.10.

I am not saying that this is not a driver bug, I am saying it is a little more broad than the matrox.


22  Java Game APIs & Engines / Java 2D / Re: Drawing the background kills my perfomance on: 2006-05-01 14:22:05
Use a GraphicsConfiguration Object to createCompatilbeImage(x,y);

Render your images onto these and draw these images onto the screen.

23  Java Game APIs & Engines / JOGL Development / Re: Does glReadPixels behave dirrently in jsr231 on: 2006-02-24 15:00:27
Thank you both for the help. I'll pull up the redbook and do some searching. Thanks also, for the advise on using buffers. I had previously used the array versions of the functions, I changed them to buffers in an attempt to solve the problem early on.

I must say, this is the most helpful forum I have ever posted on.

Thanks again.

24  Java Game APIs & Engines / JOGL Development / Re: What hardware does JOGL run on? on: 2006-02-24 06:12:08
I am running jsr231 on both a laptop using the Radeon Mobility U1, and a desktop using the Radeon 9000. Both use linux, and both seem to work well. Ubuntu of all distributions gave me more grief than any of them, but they all work now with out of the box configurations as well as with customized settings. I have tried it on Suse 10, Slackware 10.2 with a desktop enhanced 2.6 kernel, and Ubuntu. Both computers seem to work well, I have especially been impressed with the performance I have been able to achieve on laptop with lit scenes, textures, and a bit of keyframing.

I have been meaning to install a new version of fedora, and I also have a mepis disc lying around somewhere that I would like to test it on.

I liked jogl a year ago, I really like it now!

25  Java Game APIs & Engines / JOGL Development / Re: Does glReadPixels behave dirrently in jsr231 on: 2006-02-24 04:34:38
Well, I am getting near perfect coordinates now.

I changed Z from a DoubleBuffer to a FloatBuffer.

I still am not sure what you mean by Scaling Z, is this a ray cast? I will keep digging.

Every now and then, the Y value is cast to deep into the scene, I believe it is getting its coordinates from the underlying polygons is what's happening in this instance.


26  Java Game APIs & Engines / JOGL Development / Re: Does glReadPixels behave dirrently in jsr231 on: 2006-02-24 04:08:52
OK, I am still diggin through backup mountain over here.

I believe my code has met all the requirements you listed except for one.

> the Z value must be scaled

I am going to look into this tonight. Maybe the original code working was just luck. I just copy pasted the c code from article 13 at nehe (before selling out to gamedev), and javatized it.

Ha, found it. Here is the old code.

        gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, modelview);
        gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, projection);
        gl.glGetIntegerv(GL.GL_VIEWPORT, viewport);
        winX = (float)x;
        winY = (float)viewport[3] - (float)y;
        //winY = 0;
        gl.glReadPixels(x, (int)winY, 1, 1, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, winZ);
        glu.gluUnProject(winX, winY, winZ[0], modelview, projection, viewport, posX, posY, posZ);[/font]

Here is the new code. I put a few extra rewinds just in case, I am still new to NIO. I love the BufferUtil by the way!

        gl.glGetDoublev(GL.GL_MODELVIEW_MATRIX, ModelView);
        gl.glGetDoublev(GL.GL_PROJECTION_MATRIX, Projection);
        gl.glGetIntegerv(GL.GL_VIEWPORT, ViewPort);
        winX = (float)x;
        winY = (float)ViewPort.get(3) - (float)y;
        XYZ = new double[3];
        DoubleBuffer Possition = BufferUtil.newDoubleBuffer(BufferUtil.SIZEOF_DOUBLE * 3);
        DoubleBuffer Z = BufferUtil.newDoubleBuffer(BufferUtil.SIZEOF_DOUBLE);
        gl.glReadPixels(x, (int)winY, 1, 1, GL.GL_DEPTH_COMPONENT, GL.GL_FLOAT, Z);

         glu.gluUnProject(winX, // winX
                winY, // winY
                ModelView, // model
                Projection, // projection
                ViewPort, // view port

I want to post the original code form nehe article #13, but I don't think I should. Here is a link to the article.

Thanks for your patience with me. I have been digging through articles and game books here at the house, I must be reading over something.


27  Java Game APIs & Engines / JOGL Development / Does glReadPixels behave dirrently in jsr231 on: 2006-02-23 23:03:24
I have been spending my spare time porting my old code to jsr231, most everything is going smooth, I am just having trouble getting exact 3D mouse coordinates with the new api.

With 1.0, I would call glReadPixels and get my z value, load that into gluUnproject, and have exact coordinates

I have tried two different jdk's, several cvs versions of jsr231, and the dri hack on a recent post. They all return values that are too small. I have used BigDecimal to get some readable output, and the value returned are roughly "0.00001". On manual z entry into gluUnproject, "z=0.4" and up to "z=0.9", give perfect x,y,z coordinates when I find that spot in the scene with my mouse.

I am using the glReadPixels function that takes a buffer for an argument. Currently I am using a DoubleBuffer, I have also tried using a ByteBuffer at one point or another, which caused the value to vary without much logic. I have also updated my ModelView, etc, to buffers instead of arrays.

I am sure it is the z value retured by glReadPixels that is the problem, because I can manually enter it into gluUnproject and get reasonable results back (of couse, only where the z value is correct with the manual setting).


28  Java Game APIs & Engines / JOGL Development / Re: glReadPixels Error in curent, jsr231, including with dri hack on: 2006-02-16 06:37:55
Yep, using the other function worked. I have not messed much with nio, except for a small networking utility, until recently, so this has been an educational week :-).

Thanks for the help.
29  Java Game APIs & Engines / JOGL Development / glReadPixels Error in curent, jsr231, including with dri hack on: 2006-02-14 23:17:53
In past code, I was able to use glReadPixels in my render loop. I am now using a cvs build of the jsr231, and when I use this function, I get this error.

Exception in thread "Thread-1" Required extensions not available to call this function
        at com.sun.opengl.util.Animator.display(
        at com.sun.opengl.util.Animator$
Caused by: Required extensions not available to call this function
        at com.sun.opengl.impl.GLImpl.checkBufferObject(
        at com.sun.opengl.impl.GLImpl.checkPackPBOEnabled(
        at com.sun.opengl.impl.GLImpl.glReadPixels(
        at fitsrender.RenderGLEvent.display(
        at com.sun.opengl.impl.GLDrawableHelper.display(
        at com.sun.opengl.impl.GLDrawableHelper.invokeGL(
        at java.awt.event.InvocationEvent.dispatch(
        at java.awt.EventQueue.dispatchEvent(
        at java.awt.EventDispatchThread.pumpOneEventForHierarchy(
        at java.awt.EventDispatchThread.pumpEventsForHierarchy(
        at java.awt.EventDispatchThread.pumpEvents(
        at java.awt.EventDispatchThread.pumpEvents(
BUILD SUCCESSFUL (total time: 6 seconds)

I have tried putting this funtion elsewhere in code, but to no effect. It is currently in the render loop, so this shouldn't be a threading issue. And it was working with the older jogl's flawlessly, I just don't know what library release was the last one it worked with. It has not worked with any of the jsr's I have tried.

All my other code ported seamlessly, and to try and fix the error, I also tried loading my textures with the textureIO, but I got the same results. I really like the textureIO by the way. Great job.

30  Java Game APIs & Engines / JOGL Development / Re: jogl 1.1.1 poor performance on: 2006-02-14 23:08:04
It seems to have worked. This is great. It has also brought the performance of my code up to par.

JOGL Output:

libGL: XF86DRIGetClientDriverName: 4.0.1 radeon (screen 0)
libGL: OpenDriver: trying /usr/lib/dri/
drmOpenByBusid: Searching for BusID pci:0000:01:05.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 8, (OK)
drmOpenByBusid: drmOpenMinor returns 8
drmOpenByBusid: drmGetBusid reports pci:0000:01:05.0
libGL: XF86DRIGetClientDriverName: 4.0.1 radeon (screen 0)
drmOpenByBusid: Searching for BusID pci:0000:01:05.0
drmOpenDevice: node name is /dev/dri/card0
drmOpenDevice: open result is 9, (OK)
drmOpenByBusid: drmOpenMinor returns 9
drmOpenByBusid: drmGetBusid reports pci:0000:01:05.0
libGL error:
Can't open configuration file /etc/drirc: No such file or directory.
libGL error:
Can't open configuration file /home/project/.drirc: No such file or directory.
JOGLTest3: GL_VENDOR: Tungsten Graphics, Inc.
JOGLTest3: GL_RENDERER: Mesa DRI Radeon 20050528 AGP 4x x86/MMX+/3DNow!+/SSE NO-TCL
JOGLTest3: GL_VERSION: 1.2 Mesa 6.3.2

I am about to post another error I have been having in both operating systems. It has to do with glReadPixels. I will put this in a new thread. This hack has not fixed this one issue. Everything else seems to be working great!

Pages: [1] 2
EgonOlsen (42 views)
2018-06-10 19:43:48

EgonOlsen (22 views)
2018-06-10 19:43:44

EgonOlsen (43 views)
2018-06-10 19:43:20

DesertCoockie (197 views)
2018-05-13 18:23:11

nelsongames (124 views)
2018-04-24 18:15:36

nelsongames (123 views)
2018-04-24 18:14:32

ivj94 (863 views)
2018-03-24 14:47:39

ivj94 (124 views)
2018-03-24 14:46:31

ivj94 (768 views)
2018-03-24 14:43:53

Solater (140 views)
2018-03-17 05:04:08
Java Gaming Resources
by philfrei
2017-12-05 19:38:37

Java Gaming Resources
by philfrei
2017-12-05 19:37:39

Java Gaming Resources
by philfrei
2017-12-05 19:36:10

Java Gaming Resources
by philfrei
2017-12-05 19:33:10

List of Learning Resources
by elect
2017-03-13 14:05:44

List of Learning Resources
by elect
2017-03-13 14:04:45

SF/X Libraries
by philfrei
2017-03-02 08:45:19

SF/X Libraries
by philfrei
2017-03-02 08:44:05 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‑
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!