Need docs for game

It was not so easy setting the subject, because I need both help for my game and I am thing to get people to make more docs/samples.



I have written a basic "game" with jme, you are able to walk around on a terrain page as the surface and the sky is done with skydome (that is found in the wiki, i think i read some where on the forums earlier that some one has added it to cvs, but my cvs is round about at the beginning of the year (I live in south africa we pay 40 usd for broken 64kbit/s) so thanks to that one if it is so ) i've got my models loaded with a xml loader also found in the wiki, i've got 2 "guns" they can't fire atm only weapons changes had been implemented. you are stuck to the surface with +x of the terrain page's height (no physics what so ever) i think thats about it.



I am struggling to find good documentation or samples of:

*a jme game/app with networking (jgn/jme-networking - I don't know what one is good to use or even if they are the same thing) i know your doing much work on that darkforg

*a jme game/app with physics (old sf physics or new java.net i also don't know what one is good?) irrisor

*a tutorial that shows how to use a good md5 model converter and how to load it in jme (I am not sure I think there is a example of loading md5 models somewhere in jme)



I do not hope you feel criticized by this, but I think that jme needs much more documentation I am willing to use my game as documentation, but only after I hand it in as a project (I am easily convinced though :P) personally i'd like more like these http://www.jmonkeyengine.com/wiki/doku.php?id=the_tutorials (I think I read some where in the foruns that some one said/asked why you used wikiduku if thats its name and not mediawiki, I am not saying thats its bad I just get lost sometimes in there where i think if i used mediawiki i wouldn'tve)



I think that soccer game darkfrog wrote is a good sample if it has physics in too (but i also think it uses jgn1 and it doesn't run on my windows or linux pc)


I've got a lot to do just like every one else (I presume) but I am willing to contubte (give) to jme for what I can do...  ;)
Anyways thanks in advance and thanks for all the hard work that had been done so far XD

I know some of the stuff eg. jgn has samples in the pkg that you download but then there should be docs that say that there is samples in the pkg or the same samples should be hosted on http (you can see that i am really confused and need simple straight forward docs) I'd say that any thing jme can be used for should be documented on the jme site but thats not for me to decide …

physics: use the new one from java.net, but the only docs I can provide are the tutorials in cvs

thank you irrisor I wanted to write there "i tinhk your the person that does or does most of the physics" but is see i only wrote there your name :-o i'll check get the new java.net files tomorrow  :slight_smile:

I've made a screen shot http://scar.zapto.org/games/teh_scar_jme_game/

A good jME example using JGN is sorely needed, but between http://www.jseamless.org, http://www.galaxiesbeyond.com, JGN, and jME I haven’t had a lot of free time lately. :)  If someone was willing to create a simple game I’d be happy to wire up the networking in JGN as long as I could display it on the JGN web site (when it’s ready).  I just don’t have the time at the moment to undertake that project.  However, I’m approach a 1.0 release of jSeamless and nearing the combat demo release of Galaxies Beyond, so whether I have more or less time after those two goals are met only time will tell.  :stuck_out_tongue:

ooh ooh! If you want a game to do networking for, I would be honoured if you could do AirCarrier! :slight_smile: I was going to do it a while back, but I know nothing at all about game networking, so for the time being I decided to concentrate on single player. Hopefully though there's enough stuff in there now that if it had networking, people could shoot at each other in a simple deathmatch. It has some slightly separated controller type stuff, so it might not be TOO bad to replace an AI controller with a network controller, then let each client do its own hit detection like Crimson Skies used to (or however you want, as I said I have no idea how to do networking well :). You can display it wherever you like (whether you help or not…) :slight_smile:



Mind you, I think what you should have said is "If someone was willing to create a simple game with code that doesn't make little kittens cry"…



Oh also, I had a look at jseamless, but I can't run the swing example because it wants to use the windows look and feel, and I'm on linux :frowning: I had ANOTHER look at galaxies beyond, then I had a little cry since there is still nothing there to gawp at :frowning:



[edit] Oh also I meant to say - if there is anything useful in the non-networking code of aircarrier, I could do some small tutorials to go with the networking tutorials. At least I think I could, I've not actually written any tutorials so far :wink:

What's the URL for that project?



I'm concerned it's going to be more complicated than I wanted to delve into though.  I was thinking more along the lines of "asteroids meets multiplayer" kind of game. :o

aircarrier.dev.java.net



It could be complicated to have cheat free networking etc., but at the simplest level it would work if it was just:



Each client tells the server where its plane is

The server tells each client where the other planes are, clients just display this locally

Each client watches for its plane's bullets hitting its local copies of enemy planes (there is already code to detect and display bullet hits)

The server accepts "hits" detected by each client, adds them up and kills the planes when it sees enough damage.

Ideally bullet firing and hits should also be mirrored between clients so that you can see approximately where the enemy is firing, but it doesn't really need to be all that exact. Most people will assume that if an enemy is pointing write at them and there are bullets flying fairly near, they should evade.



I'm pretty sure that's how the original Crimson Skies code worked, it's a bit prone to cheating but it actually works pretty well, especially on slower connections. I spent quite a while playing it and the way latency affected the game really showed you what it was doing, but didn't often get in the way of playing. It could actually go over a second and still be quite playable and skillful since a lot of dogfighting is positioning and planning rather than quick reflexes.



The planes do use physics etc. but this can all be client side, since each client can handle its own plane's collision and just pass the resulting movement to the server, and it can trust incoming plane positions so that it doesn't have to check collisions at all. Basically the networking could be little more than a way to mirror movement of each plane to other clients, and arbitrate damage reports from collisions that are already calculated on the client, so that the first one the server sees gets counted.



In that sense it's actually pretty much like asteroids - all the planes can do is change direction and speed, and fire. And there aren't even any asteroids so it must be simple :roll:



I've updated my jme and fixed up aircarrier for latest changes, but water is currently disabled due to that bug, do the map looks a little odd :wink: I also can't work out what happened to "Node.updateCollisionTree()" so if anything odd happens, it's because I've just commented this out for now  :smiley:

I sent you a private message so we can look into this further. :slight_smile:

shingoki, aircarrier uses jme-physics hey? if so sf or java.net version?



I've downloaded the java.net physics cvs i'm using eclipse 3.2 as ide with java 1.5.08 yes I know 6 has been out for some time… (I think eclipse's compiler supports 6 though…) anyways I've got some problems runing most of the tests, they tell me:


java.lang.Error: Unresolved compilation problem:
   The method getRadius() is undefined for the type GeoSphere

   at com.jmex.physics.PhysicsNode.addPhysicsGeometries(PhysicsNode.java:175)
....


It seems that the sphere class does not support .getRadius() function?
TestParcours: can't import the class com.jme.scene.shape.Extrusion; do i need a newer jme cvs?
TestRay: can't use the class input's .addAction function this is jme related too?

Ok so I had very old jme cvs but the reson is my internet is wasted so I had to download form the nightly build. I downloaded jinput.jar-jinput-linux.jar-junit-4.1.jar-lwjgl_applet.jar-lwjgl_fmod3.jar-lwjgl.jar-lwjgl-linux.jar-lwjgl_util_applet.jar-lwjgl_util.jar-openal-linux.jar-src.zip I extracted the natives and pasted it in jme/lib and deleted my jme/src folder and replaced it with the zip's src and I put junit in the build path. I can run TestTriMesh and it looks very nice, but i still can't run TestRay


java.lang.UnsupportedOperationException: need to recompile natives first
at org.odejava.collision.JavaCollision.collide2(JavaCollision.java:187)
at com.jmex.physics.impl.ode.OdePhysicsSpace.pick(OdePhysicsSpace.java:593)
at com.jmetest.physics.TestRay.simpleUpdate(TestRay.java:76)
at com.jmex.physics.util.SimplePhysicsGame.update(SimplePhysicsGame.java:128)
at com.jme.app.BaseGame.start(BaseGame.java:66)
at com.jmetest.physics.TestRay.main(TestRay.java:89)

I don't hope there is some thing i left out that i still needed to download... At lest i don't get any more errors ;)

Yup aircarrier uses jmephysics2, from java.net (I think java.net is jmephysics2… if not I am very confused :slight_smile:



It doesn't really use physics properly, it just uses it as a kind of enhanced collision detection system. However it can also have proper physics objects, for example debris, crates bouncing about, it all seems to work fine :slight_smile:



I'm on CVS for everything myself, so I'm not sure about nightly builds, but I would guess they are pretty much exactly the same as what I have here. I get the same error on that test, so I guess they are similar :slight_smile: Presumably whatever causes the error doesn't happen in my game :slight_smile: I'll have to have a look to see what that test tests… I mean, um, Rays, but which Rays? Stingrays? Irrisor will know!

shingoki said:

I mean, um, Rays, but which Rays? Stingrays?


I really hope so  :P Then my Marine Biologist game will finally be complete, mwuahahahah!

That exception is thrown when you try to use physics picking - API and sources are fine, but I did not get around to compiling the natives for linux and mac, thus didn't check in the new one for windows, too.

shingoki i've finally gotten your aircarrier game and its done really really good, I just need to know one thing how do you get your blender models to .jme and .xml (if you use the same way is the wiki says for xml then you can just say so you don't have to give me a link to it or explain how to…)

Thanks :slight_smile:



Yup, just like the wiki says. I tried Collada but I had trouble (not much, but Hevee's script is still better :slight_smile: ).

shingoki, how do you get your models to .jme? I read/scanned the wiki page though encase it is there I did not see any thing.

XMLtoBinary like it says in the wiki. I had another look at that page, and it's not super clear. The two lines:



converter.sendXMLtoBinary(modelURL.openStream(), BO);
modelNode = jbr.loadBinaryFormat(new ByteArrayInputStream(BO.toByteArray()));



convert the XML to an old-style jme file, but do it in memory (in a byte array). If you use a FileOutputStream instead of a ByteArrayOutputStream you should be able to get a file out of this. In fact if you use com.jmex.model.XMLparser.XMLtoBinary with two arguments (something.xml something.jme) it will do this for you.

As everyone keeps pointing out, JmeBinaryReader is dooooooomed! doooomed I say! so you will eventually have to use something else. When that terrible day comes, I'm going to try Collada again, I guess :( One day I will find the right settings to make it work  :-o
XMLtoBinary like it says in the wiki.
My Bad :|

I been wondering if I should try the md5reader2 but I've never gotten to try it.

(off topic this it meant for shingoki but any one else can answer too.)



Where can I find good blender how-tos and what version blender should I use with those how-tos? (In the past I have found some good how-tos but just where I got to the part where you set bones the how-to used a button that was not on my blender :open_mouth: )



SF