Hi !
Featured games (90)
games approved by the League of Dukes
Games in Showcase (707)
Games in Android Showcase (208)
games submitted by our members
Games in WIP (781)
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 3 ... 38
1  Game Development / Newbie & Debugging Questions / Re: Making fields public that use both setters and getters on: 2016-12-27 23:09:22
Go ahead and use public fields. There is no point in using setters and getters in your case. In OOP setters and getters can be considered an anti pattern as it breaks encapsulation. Instead of setters and getters dealing with state one should instead have methods that does stuff. But if you cant hide the state, like in your case, then you might as well just make it public.
2  Games Center / Contests / Re: Java4K Competition 2015 on: 2014-12-08 23:38:33
I would be interesting to enter the competition.

How about allowing executable jars. Otherwise keep it as it was. They were allowed a couple of years ago. Not as user friendly as applets. But would not be a problem for fellow developers to try the games.
3  Game Development / Newbie & Debugging Questions / Re: 2D Text Overlay Java 3D on: 2014-11-14 18:21:46
A good pixel perfect hud is almost impossible to do in Java3D. You could use Text3D or Text2D for the text and show in front of the camera. So attach it the view transform group. Think you can get it from SimpleUniverse.
4  Game Development / Newbie & Debugging Questions / Re: JRift - Junior- Stuck on: 2013-06-21 13:57:18
You need the JRift dll and you need to point to it using -Djava.library.path. F.eks java -Djava.library.path=./lib -jar MyJar.jar

There is dll as part of the alpha that is linked on the jrift page:

It is only windows 32 bit. If you use another java vm you need to compile it yourself. I know there is a Visual Studio 2010 project as part of the source.

If you do this you may get another error message that says depending libraries not found. This is because the alpha dll was a debug build and it requires Visual Studio 2010. This can be solved by either installing Visual Studio 2010 or a redistributable.

I have tried the alpha dll and it works.

Have not got the rift to run correctly in jMonkeEngine. If you get that up and running please share.
5  Discussions / General Discussions / Re: anyone tried an oculus rift? on: 2013-04-16 13:07:03
Ordered one as part of the Kickstarter. Can't wait to try it.
6  Java Game APIs & Engines / Java 3D / Re: Java3D: 2 Appearances on a same Shape on: 2013-03-21 14:59:32
You can not have 2 appearances on the same Shape3D. You have to have two Shape3Ds. Each with their own appearance. But then there will be trouble with overlap and depth buffering. Not sure if there are a general solution.
7  Game Development / Newbie & Debugging Questions / Re: While loop help on: 2012-08-14 12:36:52
Static methods that do not produce side effects are fantastic!
8  Game Development / Networking & Multiplayer / Re: Network Infrastructure on: 2012-08-07 12:21:25
You have to start early but it won't help unless you know how to solve the problems you will encounter. Try prototyping the networking part before starting on the game.
9  Discussions / Miscellaneous Topics / Re: Android's best value phone on: 2012-05-22 09:51:01
Huawei phones are cheap.
10  Game Development / Game Mechanics / Re: Entity Manager (Searchable) on: 2012-05-18 12:45:32
I think that break would only break out of the if-clause. Thats better IMO:
No, it will break out of the for loop.
11  Game Development / Game Play & Game Design / Re: Game Internal Organization? on: 2012-05-10 08:51:31
Generally stay away from the Static key word.
Static data is bad. Static functions with no side effects are good.

Btw, interesting read:
12  Game Development / Game Mechanics / Re: collision detection problem under extreme case. on: 2012-04-30 14:02:24
Clamp speed of ball so it don't move more than radius length each frame.
13  Game Development / Newbie & Debugging Questions / Re: Masking in libGDX on: 2012-04-23 10:55:36
You can do what you asked by using stenciling. Then you would use glStencilFunc, not glColorMask. The passes would be:
1) draw stars normally
2) enable writing to stencil buffer, disable writing to color buffer
3) draw mask
4) enable stencil test, disable stencil write
5) draw terrain

Then the terrain is drawn only where the mask was drawn.

Another solution if the terrain is on e big texture is to put the mask in the textures alpha channel.
14  Game Development / Newbie & Debugging Questions / Re: Can I add an abstract class as a KeyListener? on: 2012-04-13 23:02:12
Why do you have your own constants?
15  Game Development / Newbie & Debugging Questions / Re: Java3D adding movement to a model, where to start/fix? on: 2012-04-06 00:56:21
google java3d javadoc. Look up Behavior and WakeupOnElapsedFrames.

You have to override Behavior and call wakupOn with a WakeupOnElapsedFrames in the initialise and processStimilus methods. Remember to set sheduling bounds to an infinite sphere.

The behavior have to be added to the scenegraph. You might have to wrap it in a BranchGroup.
16  Game Development / Newbie & Debugging Questions / Re: JAVA3D Universe problem on: 2012-04-06 00:10:58

Never put java3d or any other library in the runtime. There will be conflicts when applications embed a different version of the library. Always embed. You have to set -Djava.library.path to point to a where your application has stored the files.
17  Game Development / Newbie & Debugging Questions / Re: Java3D adding movement to a model, where to start/fix? on: 2012-04-06 00:07:21
1) looks ok

2) Neither. Java3D will repaint automatically when there is a change to the scenegraph.

3) if you want to change the camera you have to update the view transform group as you do with vpGroup in addModelToUniverse. If you want to move the model you have to put in under a TransformGroup that you update.

4) Yes, thay are called behaviors. Google the Java3D tutorials and read more about it there. You should use a WakeUpOnElapsedFrames with 0 as parameter to update every frame. You should NOT use a Timer.
18  Java Game APIs & Engines / Engines, Libraries and Tools / Re: Benchmarks for 3D Scene Graph APIs on: 2012-04-03 18:04:14
It also appears that Ardor3d leaks memory when nodes are removed from the scenegraph.
No, it looks like it creates so little garbage that the gc is never called.
19  Game Development / Game Mechanics / Re: Component Interaction on: 2012-03-31 16:07:33
I do it like this:
    public <T> T getComponent(Class<T> type) {
        for (Component comp : this) {
            if (type.isAssignableFrom(comp.getClass())) {
                return (T) comp;

        return null;

Then you can write code like:
Renderer renderer = entity.getComponent(Renderer.class);
20  Java Game APIs & Engines / Java Sound & OpenAL / Re: SoundSystem problems on: 2012-03-30 13:16:54
I am just looking into paulscode Soundsystem:

I tried to position a sound by calling setPosition().
But when using OpenAL, this has no effect at all (sound stays centered)
In OpenAL the sound has to be mono for setPosition to work.
21  Java Game APIs & Engines / Java 3D / Re: Why so much confusion over Java3D? on: 2012-03-08 08:36:55
Java3D is exactly like all other projects. Download the zip binaries from here: and put the jar files to the class path and the native files in java.library.path.

Sure, there is also an installer. I think there are historical reasons why it exists. Java3D is really old and back in the day it was common practice to put the libraries in the jre. At least the official sun ones. This was never a good idea, and now we know better.
22  Game Development / Game Mechanics / Re: 3D voxel collision on: 2012-03-07 08:22:44
Not for negative numbers.
23  Game Development / Newbie & Debugging Questions / Re: Remove element while being used on: 2012-02-24 14:18:21
I vote for CopyOnWriteArrayList.
24  Games Center / 4K Game Competition - 2012 / Re: LAST WEEKEND! on: 2012-02-23 22:36:48
Damn, that is not enough time. I've got the game up and running. But creating the level takes so much time. And then there is the polish and throwing in some game elements. But if I don't make it this year I'm definitely entering next year.
25  Games Center / 4K Game Competition - 2012 / Re: Indiespot compression not working on: 2012-02-22 15:02:53
With sugar on top!!
26  Game Development / Newbie & Debugging Questions / Re: Searching for image files inside a jar on: 2012-02-22 15:00:49

Although I would consider not storing the files in the classpath. Put it in folder or zip file. It's much easier.
27  Game Development / Newbie & Debugging Questions / Re: Override what? on: 2012-02-17 08:01:00
Overriding Component just to get createImage is insane. Pass in an ImageCreator to the constructor instead. Or pass it in to the method that needs to create the image. Do anything but override Component.
28  Java Game APIs & Engines / Java 3D / Re: Java3D Stereoscopy Doubt on: 2012-02-14 16:45:53
Ok Thanks i am with a NVidia Quadro 4000 here I will try to see what i can do to make this work and thanks again
The easiest way to get stereo in Java3D is to use a ConfiguredUniverse. Then use the j3d1x1-stereo example config file you can find here:

You must also set up the nvideo driver correctly. There is a special setting to enable quad buffer stereo.

Also found there is a problem with Windows 7 and overlapping transparent windows. Stereo did not work when the top of the start button overlapped the stereo canvas.
29  Java Game APIs & Engines / Java 3D / Re: Java3D Stereoscopy Doubt on: 2012-02-13 20:59:27
Java3D supports quad buffer stereo with opengl. You will most likely need a NVidea quadro graphics card and a way to connect it with a 3d display device.
30  Java Game APIs & Engines / OpenGL Development / Re: VertexArray and 10k objects on: 2012-02-12 16:25:21
To simplify it a lot: There are three main bottlenecks with OpenGL:
 - The CPU can't feed data fast enough to OpenGL: your case.
 - The GPU cannot process vertices or triangles fast enough: too many small triangles.
 - The GPU cannot process fragments fast enough: too much overdraw and/or too expensive fragment shaders.
I would add changing state to that list. Solution: state sorting.
Pages: [1] 2 3 ... 38
Galdo (523 views)
2017-01-12 13:44:09

Archive (678 views)
2017-01-02 05:31:41

0AndrewShepherd0 (1150 views)
2016-12-16 03:58:39

0AndrewShepherd0 (1072 views)
2016-12-15 21:50:57

Lunch (1200 views)
2016-12-06 16:01:40

ral0r2 (1436 views)
2016-11-23 16:08:26

ClaasJG (1530 views)
2016-11-10 17:36:32

CoffeeChemist (1486 views)
2016-11-05 00:46:53

jay4842 (1568 views)
2016-11-01 19:04:52

theagentd (1263 views)
2016-10-24 17:51:53
List of Learning Resources
by elect
2016-09-09 09:47:55

List of Learning Resources
by elect
2016-09-08 09:47:20

List of Learning Resources
by elect
2016-09-08 09:46:51

List of Learning Resources
by elect
2016-09-08 09:46:27

List of Learning Resources
by elect
2016-09-08 09:45:41

List of Learning Resources
by elect
2016-09-08 08:39:20

List of Learning Resources
by elect
2016-09-08 08:38:19

Rendering resources
by Roquen
2016-08-08 05:55:21 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!