Mini 3D FPS in an Applet Update 9

thanks for feedbacks,

[quote]It runs very well on both of my machines (celeron M 1.5, E8400), although the control is a little bit hard. I didn’t notice any difference between softeware and hardwere
modes, or could it be that i was running at the software mode all the time? I did receive the warning window after pressing “H”.
[/quote]
hum… depending on GPU : software and hardware images can be very very similar, sometimes it is hard to see any differences 8). the biggest difference is that in hardware mode there is no ambiant (some things become completly black as some part of the wall in wood that is all around).

The mouse movement I find a little annoying.
The game I find can freeze up a few secs randomly.
Jump is a little buggy, that you can fall through the ground, also you can jump on top of buildings.
Are the windows meant to be colourful?

[quote]The mouse movement I find a little annoying.
[/quote]
arf :-\ , do I am really the only one who like that kind of control ?

not really a bug, rather something unfinished : as long as you are in contact with an object you can jump, so if you touch a buiding and jump you can get on its top.

[quote]that you can fall through the ground, also you can jump on top of buildings.
[/quote]
I saw that too, I made a full review of the collision engine and patch a lot of bugs (“paradoxaly”, it was working better even with severals bugs in it…) and now it give me headhack…

[quote]Are the windows meant to be colourful?
[/quote]
yes, building are box, nothing inside

Update 4:
not really an update on the game but on the 3DzzD API it use.

this result in a better texture quality without “blink” effect on face that are not pointing towards the camera.

Before I use a low level for mipmap to avoid blink on ground for example:

After updating the API, ground and faces that are not pointing toward the camera use same mipmap but other are greatly improved

I also made a comparison on software and hardware renderer using maximum quality setting on th GC (X800):

render in hardware mode (JOGL) :

render in software mode :

you can redo this using H and S keys to respectivly switch to Hardware/Software (first switch take some seconds others are imediates).

http://demo.dzzd.net/FPSSample3/

I guess I have the same problem as gouessej; arrow keys do not work. :frowning: Mouse work fine, though. WinXP, Java 6u7

I have some problems with the arrow keys too on my EEEPC with the default Linux installation. They do work sometimes, but most of the time, pressing the keys doesn’t do anything.
Switching to hardware mode is also impossible, because you are usually dead before hardware mode has been initialized. I still think that this game is close to unplayable, at least for me. I would be better if the bots wouldn’t head directly towards the player no matter what he does. What about making them shoot at the player from a distance instead of letting them run directly into the player?

[quote]I have some problems with the arrow keys too on my EEEPC with the default Linux installation. They do work sometimes, but most of the time, pressing the keys doesn’t do anything.
Switching to hardware mode is also impossible, because you are usually dead before hardware mode has been initialized. I still think that this game is close to unplayable, at least for me. I would be better if the bots wouldn’t head directly towards the player no matter what he does. What about making them shoot at the player from a distance instead of letting them run directly into the player?
[/quote]
you are absolutly right, but this was firstly intended to be a test, I will invastigate more on keyboard issue when I will come back. About robot you are right too, they are not enought intelligent and giving them a lazer could be a cool stuff. anyway this is still a WIP and as I do a lot of WIP in the same time I lack of time :frowning:

[quote]I guess I have the same problem as gouessej; arrow keys do not work. Mouse work fine, though. WinXP, Java 6u7
[/quote]
anybody have an idea about this issue?

Thanks boy

updated the model and made some improvment on the api

api news:

  • remove a bug on 3ds loader : was throwing an exception when mesh version was 2 (blender and some other export 3ds V2, 3dsmax export V3)
  • remove a bug on 3ds loader : camera fov was not properly loaded with keyframer
  • remove a bug when calculate frustrum culling with camera FOV
  • remove FPS limiter as it was bugged.

demo news:

  • new level model !

http://demo.dzzd.net/FPSSample4/

http://demo.dzzd.net/FPSSample4/sources.zip

I got a error on first load. But seems to be fine when I reloaded.

[quote]java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.Win32GraphicsConfig.createAcceleratedImage(Unknown Source)
at sun.awt.windows.WComponentPeer.createImage(Unknown Source)
at java.awt.Component.createImage(Unknown Source)
at FPSSample.startOnce(FPSSample.java:219)
at FPSSample.start(FPSSample.java:208)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[/quote]
Edit: seems after loading I always get this.

I’m going to test it at home. I spoke about your engine recently to the author of JavaGL and TESSERACT, I advised him to use your engine because he is writing a 3D software engine for applets :s I’m impatient to see the improvement in the controls :slight_smile:

I’ve ran out of memory :-((

Exception in thread "Thread-18" java.lang.OutOfMemoryError: Java heap space
	at net.dzzd.core.an.d(Unknown Source)
	at net.dzzd.core.an.a(Unknown Source)
	at net.dzzd.core.an.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-19" java.lang.OutOfMemoryError: Java heap space
	at net.dzzd.core.w.buildMipMap(Unknown Source)
	at net.dzzd.core.w.build(Unknown Source)
	at net.dzzd.core.an.build(Unknown Source)
	at net.dzzd.core.an.a(Unknown Source)
	at net.dzzd.core.an.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Exception in thread "Thread-17" java.lang.OutOfMemoryError: Java heap space
	at net.dzzd.core.w.buildMipMap(Unknown Source)
	at net.dzzd.core.w.build(Unknown Source)
	at net.dzzd.core.an.build(Unknown Source)
	at net.dzzd.core.an.a(Unknown Source)
	at net.dzzd.core.an.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)

[quote]java.lang.IllegalArgumentException: Width (0) and height (0) cannot be <= 0
at java.awt.image.DirectColorModel.createCompatibleWritableRaster(Unknown Source)
at sun.awt.Win32GraphicsConfig.createAcceleratedImage(Unknown Source)
at sun.awt.windows.WComponentPeer.createImage(Unknown Source)
at java.awt.Component.createImage(Unknown Source)
at FPSSample.startOnce(FPSSample.java:219)
at FPSSample.start(FPSSample.java:208)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[/quote]
hum seems that this is this line :

this.bgi=this.createImage(this.getWidth(),this.getHeight());

It means that the start method of the applet has been called before applet has been sized, this is strange, I am not sur that it is a normal case in the applet life cycle ?? I will try to cach such case

[quote]I’m going to test it at home. I spoke about your engine recently to the author of JavaGL and TESSERACT, I advised him to use your engine because he is writing a 3D software engine for applets :s I’m impatient to see the improvement in the controls
[/quote]
thanks, I am still working to improve the control and the 3DzzD API , this sample is a piece of the current work I am doing to implement lightmapping , in this one there is only the light map, in next one I will add diffuse texture.

NB: I have realised that a cupple of people think that 3DzzD work with GC and is not software even if it is compatible with Java 1.1 as TESSERACT author who dont want to trust that 3DzzD is software … that’s finally pretty cool :wink:

[quote]Exception in thread “Thread-18” java.lang.OutOfMemoryError: Java heap space
at net.dzzd.core.an.d(Unknown Source)
at net.dzzd.core.an.a(Unknown Source)
at net.dzzd.core.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread “Thread-19” java.lang.OutOfMemoryError: Java heap space
at net.dzzd.core.w.buildMipMap(Unknown Source)
at net.dzzd.core.w.build(Unknown Source)
at net.dzzd.core.an.build(Unknown Source)
at net.dzzd.core.an.a(Unknown Source)
at net.dzzd.core.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Exception in thread “Thread-17” java.lang.OutOfMemoryError: Java heap space
at net.dzzd.core.w.buildMipMap(Unknown Source)
at net.dzzd.core.w.build(Unknown Source)
at net.dzzd.core.an.build(Unknown Source)
at net.dzzd.core.an.a(Unknown Source)
at net.dzzd.core.an.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
[/quote]
I think it should be ok now, I have reduce a texture from 2048 to 1024, and it seems that it should now work on standard JVM memory setting

thanks all for feed back, it help a lot

I told him to look at your source code, he didn’t answer about this point. I explained to him that he was not alone to write such kind of engine, I explained to him that there were already some technologies to write 3D games on mobile phones (M3G 1.0, JOGL-ES, Mascot Capsule) and he denied the obvious. The problem is that he was trying to convince people that there is no light cross-platform technology to write FPS on PC and mobile phone in Java. He denied these accusations. However, if some newbies read that, they could believe he said the truth and then they could begin reinventing the wheel… It would be fine if you could come to the forum of “Games Creators Network” at least to defend your own engine :
http://forum.games-creators.org/showthread.php?p=59488
If people believe that your engine works in hardware rendering when it works in software rendering, it means that you have made an excellent job :slight_smile:

I have tested your latest update. It is very good, maybe a bit too dark. It is playable. I haven’t reproduced the problem I had with the previous update

Update 5

About the API :

  • full review of collision engine, there was a bug on face edge collision, should be ok now

About the FPS : (only few updates…)

  • try the idea of Markus_Persson about a mouse dead zone
  • and as Ben has suggested, added some more particles for impacts.

and that hugly sources code is available

http://demo.dzzd.net/FPSSample5/

http://demo.dzzd.net/FPSSample5/sources.zip (no JOGL libraies inside for smaller size)

I have added a dead zone of 50px, your feedbacks on this one are welcome

[quote]If you were planning to develop it further, I would say that a few more damage particles would be nice
[/quote]
yup

It’s MUCH better with the dead zone IMHO. It’s actually playable now, after you get used to it. Before that change, i felt like a drunk staggering around in the level. But what am i supposed to do? I saw one enemy right at the beginning, but it seemed to be stuck in the ground or something and i wasn’t able to kill it… ???

Unable to run it on my windows xp computer

java.lang.InternalError: couldn't create component peer
	at sun.awt.windows.WComponentPeer.checkCreation(Unknown Source)
	at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
	at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
	at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
	at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
	at sun.awt.windows.WDialogPeer.<init>(Unknown Source)
	at sun.awt.windows.WToolkit.createDialog(Unknown Source)
	at java.awt.Dialog.addNotify(Unknown Source)
	at java.awt.Window.pack(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate.setMultiButtonErrorContent(Unknown Source)
	at com.sun.deploy.ui.UIFactory$4.execute(Unknown Source)
	at sun.plugin.util.PluginSysUtil$SysExecutionThread.run(Unknown Source)
java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate.setVisible(Unknown Source)
	at com.sun.deploy.ui.UIFactory$4.execute(Unknown Source)
	at sun.plugin.util.PluginSysUtil$SysExecutionThread.run(Unknown Source)
Caused by: java.lang.InternalError: couldn't create component peer
	at sun.awt.windows.WComponentPeer.checkCreation(Unknown Source)
	at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
	at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
	at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
	at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
	at sun.awt.windows.WDialogPeer.<init>(Unknown Source)
	at sun.awt.windows.WToolkit.createDialog(Unknown Source)
	at java.awt.Dialog.addNotify(Unknown Source)
	at java.awt.Window.pack(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate$10.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
basic: Added progress listener: sun.plugin.util.GrayBoxPainter$GrayBoxProgressListener@171ba90
network: Cache entry not found [url: http://demo.dzzd.net/FPSSample5/net/dzzd/access/IScene3DRenderCallBack.class, version: null]
network: Connecting http://demo.dzzd.net/FPSSample5/net/dzzd/access/IScene3DRenderCallBack.class with proxy=DIRECT
network: Connecting http://demo.dzzd.net:80/ with proxy=DIRECT
com.sun.deploy.net.cookie.CookieUnavailableException: No registered plugin for applet ID 1
	at sun.plugin2.main.client.MessagePassingExecutionContext.doCookieOp(Unknown Source)
	at sun.plugin2.main.client.MessagePassingExecutionContext.getCookie(Unknown Source)
	at sun.plugin2.main.client.PluginCookieSelector.getCookieFromBrowser(Unknown Source)
	at com.sun.deploy.net.cookie.DeployCookieSelector.getCookieInfo(Unknown Source)
	at com.sun.deploy.net.cookie.DeployCookieSelector.get(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.setCookieHeader(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
	at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
	at java.net.HttpURLConnection.getResponseCode(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
basic: error: net/dzzd/access/IScene3DRenderCallBack.
java.lang.NoClassDefFoundError: net/dzzd/access/IScene3DRenderCallBack
	at java.lang.ClassLoader.defineClass1(Native Method)
	at java.lang.ClassLoader.defineClass(Unknown Source)
	at java.security.SecureClassLoader.defineClass(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: net.dzzd.access.IScene3DRenderCallBack
	at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 10 more
Caused by: java.io.IOException: open HTTP connection failed:http://demo.dzzd.net/FPSSample5/net/dzzd/access/IScene3DRenderCallBack.class
	at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
	at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	... 14 more
Exception: java.lang.NoClassDefFoundError: net/dzzd/access/IScene3DRenderCallBack
Ignored exception: java.lang.NoClassDefFoundError: net/dzzd/access/IScene3DRenderCallBack
java.lang.InternalError: couldn't create component peer
	at sun.awt.windows.WComponentPeer.checkCreation(Unknown Source)
	at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
	at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
	at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
	at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
	at sun.awt.windows.WDialogPeer.<init>(Unknown Source)
	at sun.awt.windows.WToolkit.createDialog(Unknown Source)
	at java.awt.Dialog.addNotify(Unknown Source)
	at java.awt.Window.pack(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate.setErrorContent(Unknown Source)
	at com.sun.deploy.ui.UIFactory$3.execute(Unknown Source)
	at sun.plugin.util.PluginSysUtil$SysExecutionThread.run(Unknown Source)
java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at javax.swing.SwingUtilities.invokeAndWait(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate.setVisible(Unknown Source)
	at com.sun.deploy.ui.UIFactory$3.execute(Unknown Source)
	at sun.plugin.util.PluginSysUtil$SysExecutionThread.run(Unknown Source)
Caused by: java.lang.InternalError: couldn't create component peer
	at sun.awt.windows.WComponentPeer.checkCreation(Unknown Source)
	at sun.awt.windows.WComponentPeer.<init>(Unknown Source)
	at sun.awt.windows.WCanvasPeer.<init>(Unknown Source)
	at sun.awt.windows.WPanelPeer.<init>(Unknown Source)
	at sun.awt.windows.WWindowPeer.<init>(Unknown Source)
	at sun.awt.windows.WDialogPeer.<init>(Unknown Source)
	at sun.awt.windows.WToolkit.createDialog(Unknown Source)
	at java.awt.Dialog.addNotify(Unknown Source)
	at java.awt.Window.pack(Unknown Source)
	at com.sun.deploy.ui.DialogTemplate$10.run(Unknown Source)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

Edit: After a few tries it ran.

I find it more playable now but it is not like the other FPS, it is strange, I don’t know how to explain it.

Looks great!
What I find a little disconcerting between this and a traditional FPS is that the targeting reticle moves around the screen rather than staying fixed in the center. Since the mouse is controlling where you look and where you aim, the center of the screen should always be where I am looking and I should always be aiming where I am looking.
The “drunk” feeling comes from the disconnect between and absolute mouse move for aiming and a relative mouse move for looking.

You have found the good words to explain to the author what I think, it is the same feeling.