Making trees?

How would I go by doing this? Load a model with an animation…or?

Yep, load a model and save it in jme format. Take a look at the ModelLoader class in jmetest and see how it loads models. Or you can just use it to load them for you, save them as .jme models, then in your game, load them in and place them in the map.

Yea, but if I wanted to make them wave to make a "realistic" effect, what would I do?



And, I am loading .obj files just like the tutorial said, I don't save as .jme, but is there a difference?



Thanks!

To make them wave you will want to use an animation. I haven't dug into that part yet so I won't be much help there.



You should be fine with a .obj file. Jme will load that, convert it to jme format in memory and then use that. So it ends up in jme format in the end. You can save it out as a .jme to save some time on startup, so it doesn't have to do the conversion.

Eventually, if I get anywhere with this, I will pack/compress all of the game data together.



If I were to have, lets say, 500 trees, wouldn't it slow down the game a lot because of so many animations? Or?



Thanks again :stuck_out_tongue:

You probably wouldn't want to animate all 500 at once, nor render all 500 at max detail. Most games will have lower poly versions that will be rendered when the tree is really far away from the camera, and then more detailed ones that animate when closer to the camera.

Completely depends on the number of polys in each tree, and your hardware.

If you come up with something that works well, let us know. It's always interesting and helpful to see people's solutions to these problems.  :slight_smile:

It would be hard for me to do anything with jme. There isn't much that helps people that are unfamiliar with jme.



Wish someone could teach me more :frowning:

The best place to start is to take a look at all the tests and demos in the jmetest package. There is loads of code there that covers a lot of areas. Try a few out, combine some of the examples and build on top of them. The flag rush tutorial is a great place to start and covers all the basics (src/jmetest/flagrushtut/).

Beyond those, you have to start to plan out what kind of game you want to make, then narrow down what features you want to implement. Once you get to more specifics, then it will be easier for people to help you out.



cheers