Another Billard game with JME3

Hello everyone,



I’m trying JME3 for some months now, and i have in mind to make a simple 3D game. I’ve choosen a billard game, as i’ve recently made an Nvidia optix viewer for a billard game (video on youtube ;), but i was too slow to make a real game.



So with JME3, that now got bullet integrated, I can make that game easily.



Here’s a short result, where i load a 3D pool table, and check for collision… of course there’s still a lot to do.



Youtube video :

http://www.youtube.com/watch?v=GDmhhwnT7Ss



FullScreen link:

http://www.youtube.com/v/GDmhhwnT7Ss?fs=1&hl=fr_FR&hd=1

Another video with adequate material



http://www.youtube.com/watch?v=teJ3MW8wfIA&hd=1



(thanks for embedded the precedent video)

(sorry, there’s a bug with video embeds when there’s no text after the video link. ~ erlend)

Wee, this’ll be fun! Are you gonna add multiplayer?

I’ll first try to make a “single player” like before starting anything huger :wink:

Here’s a little demo (60 mega ^^), controls for moving camera is the same as the default JME, you can shoot by pressing a certain amount of time on the left mouse bouton, and shoot the ball by releasing the boutton.



Link to download



I’ve made the light turning around the scene (just to see if it works), but i’ve a strange bug on my computer, some part become full BLACK like if there’s light bug or something. Did anybody got the bug, or an idea where it could come from ? (You can see it on the video too)

Cool work, but it looks to me like you’re ignoring the scales a bit, right? For the physics 1unit=1m, it looks a bit like your billard table was 6m high… :slight_smile:

Yes you are totaly right, i changed the pool model, and didn’t rescale everything correctly.

for the light, are you either exporting with binominal tangents or use the tangentbinominal generator calss on your loaded models? Because the tangents are needed for correct (complex) lightening

Mmmmm that could be something like that, I will check my export about the binormal tangents or use generator.



Also i’ve seen in the log lot of “ATTENTION: Binormal is flipped for vertex 20.936”…

In fact i used the “lightning.jm3d” and i don’t put a normal map, so it give the bug. With simpletextured.jm3D it work without bug :slight_smile:

well I’m not totally sure, but the lightning should work with only diffuse map and no other without problems.



Btw for what are you creating a frambeuffer with 8k resolution? cause the intel onboard at my work hates that ^^



[java]16.12.2010 13:04:06 com.jme3.renderer.Camera <init>

INFO: Camera created (W: 8.192, H: 8.192)

16.12.2010 13:04:06 com.jme3.renderer.Camera <init>

INFO: Camera created (W: 1, H: 1)

16.12.2010 13:04:06 com.jme3.renderer.lwjgl.LwjglRenderer setFrameBuffer

SCHWERWIEGEND: Problem FBO:

FrameBuffer[format=8192x8192x0, drawBuf=0]

Depth => TextureTarget[format=Depth]



16.12.2010 13:04:06 com.jme3.app.Application handleError

SCHWERWIEGEND: Uncaught exception thrown in Thread[LWJGL Renderer Thread,5,main]



java.lang.IllegalStateException: Framebuffer has erronous attachment.

at com.jme3.renderer.lwjgl.LwjglRenderer.checkFrameBufferError(LwjglRend

erer.java:1045)

at com.jme3.renderer.lwjgl.LwjglRenderer.setFrameBuffer(LwjglRenderer.ja

va:1269)

at com.jme3.shadow.BasicShadowRenderer.postQueue(BasicShadowRenderer.jav

a:156)

at com.jme3.renderer.RenderManager.renderViewPort(RenderManager.java:664

)

at com.jme3.renderer.RenderManager.render(RenderManager.java:688)

at com.jme3.app.SimpleApplication.update(SimpleApplication.java:216)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.runLoop(LwjglAbstractDispl

ay.java:144)

at com.jme3.system.lwjgl.LwjglDisplay.runLoop(LwjglDisplay.java:133)

at com.jme3.system.lwjgl.LwjglAbstractDisplay.run(LwjglAbstractDisplay.j

ava:198)

at java.lang.Thread.run(Unknown Source)

[/java]

Yes i probably made an error in the setting of the material concerning the normal texture (or i forget to disable something …).



I’ll reduce it 2048 instead of 8192, I had forget people don’t have graphics boards that can handle that much (and i don’t think 8192 is usefull as it’s huge …) and correct the RAR file within the hours.

Ok i’ve put another version with 2048 instead, hope it will work better.

Here’s another video

I also added a “billard a bouchons”