Java-Gaming.org    
Featured games (91)
games approved by the League of Dukes
Games in Showcase (576)
games submitted by our members
Games in WIP (497)
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  Games Center / Showcase / Re: Starshock, a retro-esque arcade shooter on: 2013-03-23 04:57:22
Nice little demo, a bit difficult without inverting the mouse Y though.

Here's one little suggestion for retro-style games like this which I think might be quite neat:  How about a graphics option pre-rendering the graphics at low pixel resolution (ie 320x200) to a buffer, and then stretching that to the screen with anti-aliasing.  That way you get fuzzy pixels rather like an old tube monitor, a similar effect that you see in old hardware emulation software.
2  Java Game APIs & Engines / OpenGL Development / Re: Can't compile example! (SOLVED) on: 2013-03-21 19:48:11
Looks like I had a folder with LWJGL class source which was shadowing the JARs, deleted it and it works now!
3  Java Game APIs & Engines / OpenGL Development / Can't compile example! (SOLVED) on: 2013-03-17 23:22:57
After a bit of a break from programming, I have started a new FPS-type project going.  Was making nice headway, able to walk around a simple scene made of several areas with basic portal frustum entity culling (rather pleased with myself for managing to work that out).  It then came to my attention that the code I was using (glBegin()/glEnd() stuff) is now old hat, I should be using these VBO and shader thingies instead.  It feels like I've been kicked down several flights of stairs... ouch.  Shocked

So I have to start over, trying to compile example code (TheQuadExampleColored), but it won't compile, just throws up a load of this:-

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  
D:\Java\cruithne3753\games\TheQuadExampleColored.java:79: cannot find symbol
symbol  : method create(org.lwjgl.opengl.PixelFormat,org.lwjgl.opengl.ContextAttribs)
location: class org.lwjgl.opengl.Display
         Display.create(pixelFormat, contextAtrributes);
                ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:135: glGenBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to ()
      vboId = GL15.glGenBuffers();
                  ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:142: glGenBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to ()
      vbocId = GL15.glGenBuffers();
                   ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:152: glGenBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to ()
      vboiId = GL15.glGenBuffers();
                   ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:174: glBindAttribLocation(int,int,java.nio.ByteBuffer) in org.lwjgl.opengl.GL20 cannot be applied to (int,int,java.lang.String)
      GL20.glBindAttribLocation(pId, 0, "in_Position");
          ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:176: glBindAttribLocation(int,int,java.nio.ByteBuffer) in org.lwjgl.opengl.GL20 cannot be applied to (int,int,java.lang.String)
      GL20.glBindAttribLocation(pId, 1, "in_Color");
          ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:233: glDeleteBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to (int)
      GL15.glDeleteBuffers(vboId);
          ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:237: glDeleteBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to (int)
      GL15.glDeleteBuffers(vbocId);
          ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:241: glDeleteBuffers(java.nio.IntBuffer) in org.lwjgl.opengl.GL15 cannot be applied to (int)
      GL15.glDeleteBuffers(vboiId);
          ^
D:\Java\cruithne3753\games\TheQuadExampleColored.java:271: glShaderSource(int,java.nio.ByteBuffer) in org.lwjgl.opengl.GL20 cannot be applied to (int,java.lang.StringBuilder)
      GL20.glShaderSource(shaderID, shaderSource);
          ^
10 errors


I'm using LWJGL 2.8.5, the jar files are dated 04/11/2012 (or 11/04/2012 if you're American!), JDK is 1.6.0_24... I'm sure this should be pretty up to date, how come the function call parameters are different??!!
Thanks
Matt
4  Discussions / General Discussions / Re: Binary Heap Driving Me Mad on: 2009-05-22 02:34:19
Hmmm... I tried it with (index - 1) >> 1 for the parent but that gets me an array index out of bounds, so I tried it starting with heapEnd = 0 and an Intersection already at 0 with distance = 0, but still have the same problem.
I've been working around it for the time being by using the Arrays.sort, but I'm trying to go for raw speed (It's for a retro 90s-style raycaster).

Thanks anyway.
5  Discussions / General Discussions / Binary Heap Driving Me Mad on: 2009-05-19 03:02:31
I'm using a binary heap for getting intersections with distances in ascending order... at least it does most of the time, I get spurious numbers out of order.  Here's the code distilled down to demonstrate it:-

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  
42  
43  
44  
45  
46  
47  
48  
49  
50  
51  
52  
53  
54  
55  
56  
57  
58  
59  
60  
61  
62  
63  
64  
65  
66  
67  
68  
69  
70  
71  
72  
73  
74  
75  
76  
77  
78  
79  
80  
81  
82  
83  
84  
85  
86  
87  
88  
89  
90  
91  
92  
93  
94  
95  
96  
97  
98  
class HeapProblem
{
  /** Max number of intersections */
  static final int MAX_INTERSECTIONS = 300;

  /** Minimal version of the actual Intersection class */
  class Intersection
  {
    double distance;
  }
 
  /** Intersections stored in a binary heap so we can quickly get them in distance order */
  protected Intersection[] inSectHeap = new Intersection[MAX_INTERSECTIONS];
  /** Index of the end of the heap */
  protected int heapEnd = -1;

  /**
   * Test it
   */

  public static void main(String[] args)
  {
    HeapProblem hp = new HeapProblem();
  }

  /**
   * Testing...
   */

  protected HeapProblem()
  {
    // Shove a load of random numbers on
   java.util.Random rand = new java.util.Random();
    for (int i = 0; i < 100; i++)
    {
      Intersection inSect = new Intersection();
      inSect.distance = rand.nextDouble() * 1000;
      addIntersection(inSect);
    }
   
    // Pull 'em off, shout if out of order
   double prevDist = 0;
    while (heapEnd >= 0)
    {
      Intersection inSect = getNextIntersection();
      System.out.println(inSect.distance + ((inSect.distance < prevDist)? " *WRONG!*" : ""));
      prevDist = inSect.distance;
    }
  }
 
  /**
   * Add intersection to heap
   * @param inSect The intersection to add
   */

  private void addIntersection(Intersection inSect)
  {
    inSectHeap[++heapEnd] = inSect;
    int index = heapEnd;
    int parent = index >> 1;

    // Bubble intersection with shortest distance to the top
   while (inSectHeap[index].distance < inSectHeap[parent].distance)
    {
      Intersection temp = inSectHeap[parent];
      inSectHeap[parent] = inSectHeap[index];
      inSectHeap[index] = temp;
      index = parent;
      parent >>= 1;
    }
  }

  /**
   * Get next nearest intersection from the heap
   * @return intersection
   */

  Intersection getNextIntersection()
  {
    Intersection next = inSectHeap[0];      // Next nearest is on top
   inSectHeap[0] = inSectHeap[heapEnd--];  // Move the end of the heap to the top
   
    // Bubble next nearest to top
   for (int index = 0; (index << 1) < heapEnd; )
    {
      int left = (index << 1) + 1;
      int right = left + 1;
      // Choose the lower of the two children
     int child = (inSectHeap[left].distance < inSectHeap[right].distance)? left : right;
      if (inSectHeap[index].distance >= inSectHeap[child].distance)
      {
        Intersection temp = inSectHeap[child];
        inSectHeap[child] = inSectHeap[index];  // Swap it with current one
       inSectHeap[index] = temp;
      }
      index = child;
    }

    return next;
  }  

}


Any thoughts on what might be wrong?  Thanks.

(Moderators feel free to shunt this into another forum if more appropriate)
6  Java Game APIs & Engines / JInput / Re: Where's my controllers? on: 2006-02-26 20:14:26
Oops!  Yep, thats it, thanks!
7  Java Game APIs & Engines / JInput / Where's my controllers? on: 2006-02-25 00:36:59
I'm just trying JInput, I've got controller.jar, jutils.jar, jinput.jar, dxinput.jar in my lib folder, dxinput.dll and jinput-dxplugin.dll in my bin folder,  but when I test it with ListControllers I get nothing.  Not a sausage.  I'm expecting at least (in fact only) the keyboard and mouse.

Any gotchas here?

I'm using Java 1.4.1 under Windoze 2000.


8  Games Center / Archived Projects / Re: UridiumGL on: 2004-05-25 01:14:58
Quote
Wow! It almost works now Smiley.
Major problems:
1. No mouse cursor. Moving and clicking randomly changes the menus, but its f*ing hard to guess WTF is going on
2. ...or is it that there are supposed to be *letters* or *numbers* next to the menu options? All that appears in linux is a blank green space to the left of each menu item. Tried pressing 1 (the old standard for "start one player game") but nothing happened. Just a random guess Smiley

It's the up/down cursor keys with either fire (left Ctrl) or Return to select.  It might have been easy to miss this on the "briefing" page.

Quote
Minor suggestions:
1. you have a VERY long load time, counting from when the screen goes black (approx 30 seconds on a 1ghz PC) - at the very least put up a white text "loading, please wait".

Could see about this one...

Quote
2. The 1p and 2p scores were being displayed (on the menu screen!) in the bottom left quarter of the screen, at the top. Does this mean that if I had been able to start the game it would have only appeared in the bottom left?

Did the menu appear small too?  I'm wondering what might be happening here... whether the display is actually switching to 640*480.
9  Games Center / Archived Projects / Re: UridiumGL on: 2004-05-24 21:28:48
Well it seems some of my library loading code wasn't neccessary and might have been throwing up the errors on Linux and Mac.  v0.3 is now up...
10  Java Game APIs & Engines / OpenGL Development / Re: Library names on: 2004-05-24 21:25:55
Erm, I thought it was needed for JWS  Embarrassed It wasn't a show stopper under Windows so it seemed like the right thing at the time.  I've taken it out this pointlessness for UridiumGL 0.3 and it works (for me anyway)!
11  Games Center / Archived Projects / Re: UridiumGL on: 2004-05-23 23:47:19
Quote
An error occurred while launching/running the application.

Title: UridiumGL v0.22
Vendor: Cruithne3753
Category: Unexpected Error

no openal in java.library.path

System: OS X (10.3.3), Java1.4.2


I've suddenly realised, I love bug reports! Makes me nostalgic for the days when I had a decent job.  Cry

Already had some feedback from a Mac user, inching forward on this one...
12  Java Game APIs & Engines / OpenGL Development / Library names on: 2004-05-23 23:30:38
What should the correct library names passed to System.loadLibrary() be?  Just checking if these are right...

Linux:-





File System.loadLibrary()
liblwjgl.so lwjgl
liblwjgl_d.so lwjgl_d
libopenal.so openal

Mac:-





File System.loadLibrary()
liblwjgl.jnilib lwjgl
liblwjgl_d.jnilib lwjgl_d
openal.dylib openal or openal.dylib ?

(I know the Windows ones work!)
13  Java Game APIs & Engines / OpenGL Development / Screen resoloution on: 2004-05-09 18:50:01
Are all cards capable of 640*480?  I thought a low resolution like this would be pretty much universal, but on some machines it seems to remain at a higher resolution with the game graphics (UridiumGL!) lurking in the corner.  I got a mail from someone with this problem who is running this:-

P3 2.8
Sapphire 9800Pro 128Mb
1Gb RAM
DirectX9
XP Pro SP2

What should I consider for making sure the correct resolution is set? UridiumGL uses LWJGL0.8.
14  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-26 01:24:28
Quote
Nice to see a fellow Bristolian producing such quality


So you'll know what the "GL" actually stands for!
15  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-26 00:56:40
I found I could switch off VSync via Control Panel (nested off of various "Advanced options" buttons in there though) and I realise what people meant by it being too fast.  Maybe it's worth checking you've got it switched on.  For v0.21 I've added the option to toggle VSync, and adjust the frame rate if it's not available to get the smoothest (ie. least "rough") animation, and also moved the graphic and sound resources into seperate JARs - no more further need to download almost 7Mb for updates to 115k of code (quicker for me to upload too!)
16  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-18 18:40:09
I've changed it to arch="i386"... fingies crossed...
17  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-16 19:08:52
Right, with any luck it should (might) work for Mac and/or Linux (I have no way of testing myself):-

http://www.cruithne3753.pwp.blueyonder.co.uk/games/uridiumgl
18  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-14 21:10:10
Thanks for that pointer, there is now a Web Start option available,  (Adjusted URL):

http://www.cruithne3753.pwp.blueyonder.co.uk/games/uridiumgl

Next, gameplay tweaks...
19  Games Center / Archived Projects / Re: UridiumGL on: 2004-04-11 18:12:28
Right, I've spent a couple of days ruminating on this...

I've only just realised that the only things that might be controlling the timing is Window.update() at the start of my loop
and Window.paint() at the end.  It has been working perfectly fine for me, but it may be different on other set ups.  I've also noticed that I seem to have got away without doing any double-buffering stuff.  LWJGL does that for me, right?
I think I'll make the aliens a bit less trigger happy, and give the mines a slightly longer launch delay, too.

A friend of mine has just got a new Compaq Presario, 2.7Ghz with Intel Extreme graphics, it took a little tweaking of the OpenGL settings to get it running reasonably smoothly.  The white line round the edge of the dreadnought graphics shows up on it.  Not sure what I can do about it, it's probably down to the way the stencil buffere is used.  A stencil buffer is cut out using the dreadnought tiles, then a huge quad for the surface texture is drawn into this before the tiles are overlaid using alpha blending to get the bas-relief effect.  Before I worked out how to use the stencil buffer, I pre-generated the tiles, but this could mean over 2000 tiles per dreadnought!

I'm now trying to get Web Start to work, I didn't even know how do this when I put the page up, it will be a few days before I get it working; I'm still on ye-olde dialup so its a bit slow on the upload-download-see if it works cycle.  Seeing some of the recent posts, I think I should leave the usual download as an option.
20  Games Center / Archived Projects / UridiumGL on: 2004-04-08 00:56:25
Here's my remake of a classic C64 game:-

http://www.cruithne3753.pwp.blueyonder.co.uk/UridiumGL/

It's the first complete game I've put on the Internet, I hope it's not too bad.   Wink
21  Java Game APIs & Engines / OpenGL Development / Textured bas-relief problem on: 2003-09-27 20:19:20
Hello,

For a 2D game, I have a tile map, each tile representing a portion of a bas-relief pattern by use of a grey scale, and/or alpha channel.  What I want to do is combine this with a texture pattern, such as marble, to get a bas-relief marble (or whatever) effect.  This also includes transparent sections where the background shows through.

Thing is, I can't really suss out how to do it.  What I need is something like combining the colours from the texture pattern with the alpha channel from the tile set.

I suppose I could make all these tiles in a paint package but then I'd have to do a set for every level, rather than just combining a tile set & texture on the fly.  I also like having the texture repeat at a larger scale than the tile size (48*48 ).

Any ideas?  Cheers.
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.

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

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

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

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

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

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

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

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

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

CJLetsGame (182 views)
2014-04-01 02:16:10
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

Anonymous/Local/Inner class gotchas
by Roquen
2014-03-11 15:05:20
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!