Flag Rush Tutorial 8

Tutorial 8 first draft is done. Again let me know if there are errors, something doesn't make sense, something is glossed over too much, etc.


Very nice…  Finally a flag in "flag rush"  :slight_smile:


nice Tutorial…but can you tell me where to find the Texture-Files (those jpg's and so on?) I tried to use some files I found on my harddrive but it didn't work…is there a rule how to build jme-Textures?


PS: nice Spell Check…very useful…

All the image files are in jmetest/data/texture directory. You can use any texture you want though, no reason that you must use the ones I reference in the tutorial. The textures should be power of 2 (required if you are going to use mipmapping). If you use the class loader's getResource method to obtain a texture, that texture must be in your classpath.



in tutorial 4 you try to use TestSkybox.class.getClassLoader() to load a texture but there is no class TestSkybox, you have to change it to e.g. lesson4.class, than it works, same with Lesson2.class.getClassLoader()…

TestSkybox is refenced from jmetest.jar if that isn't in your classpath or you are referencing your own resources then you do it the way you did

Thanks, I'll fix that typo.

modulo would work just fine, but I guess the code is clearer for beginners the other way(though it's more code since the modulo way can cover both cases, -/+)…

and if not going with modulo, to make the angle not pop at boundarys, it's better to do:

if (angle > 360) {

Actually, Thyast, you're right. I shouldn't be setting back to 0, as I'm losing that extra bit of angle there. So, that is an error that will be fixed in the current tutorial. It was done for "simplicity" sake in the fact, that I wanted it obvious that we were taking care of going over 360 degrees. However, I'll use modulo as an "optimization" in the next tutorial.

Well less code is more clear to me  :smiley:

And the real equivalent of the modulo would be

while (angle >= 360) {
   angle -= 360;

since angle could be in some (hopefully rare) cases >= 720 and 360 is equivalent to 0.  :wink:

Ok I stop being maniac...  }:-@

jeez, ranting around about something like this must surely mean you have way to much spare time…

I was trying out Tutorial 2, but when i typed in this code, NetBeans raised an alert:

timer = Timer.getTimer(properties.getRenderer());

getTimer() in com.jme.util.Timer cannot be applied to (java.lang.String)

Is there something wrong with the tutorial, or is it just me?

I guess you're doing the tutorial from the wiki? It's probably out of date a bit with the latest CVS version of jME if you're using that (or a recent nightly build). The tutorials themselves are also in CVS ( the jmetest.flagrush package I think), and these are up to date.

timer = Timer.getTimer(); should be the new code.

yup. it worked. Thankz.

hm… someone should put up a notice on the flag rush tutorial index informing newcomers about the possible outdatedness of the tutorials… Or maybe just upload the new versions. I'll now go get the new CVS versions…

"Setting up netBeans to build jME" <- this is pretty out of date too, especially regarding JME-physics…

Well, it's a wiki :wink: Don't let me stop you…

(mostly talking about the Netbeans stuff here… the warning (and probably links to up to data CVS code), we should get that done some time)

Yep - having just wasted an hour fixing one of the tutorials myself so it'd work and then finding the next didn't a note in the tutorial saying "newer versions may be under source control" would be great!  :smiley:

simongv said:

a note in the tutorial saying "newer versions may be under source control" would be great!

Is somebody going to finish "Flag Rush" tutorial ?

In my opinion it is very nice and I'd love to see the last 12 topics :slight_smile:

Well, I guess mojomonkey probably would finish it once, right?  :wink: Even if he doesn't fix it, there are people like me writing tons (or alteast preparing to write tons) of tutorials.

Anyone feel free to take on the later tutorials. I can't even get the time, motivation and energy to work on the user's manual like I said I would and that doesn't even require coding. :wink: