Hey
I’m quite new to JMonkey, but I’m working on a horror game of which I want to design the levels myself.
But now I want to be able to build the entire level into a scene, including walls, ceilings and floors. In other words, I have a model called wall.j3o, another model called floor.j3o, etc.
And designing levels in the built in scene composer isn’t really efficient, so I’m looking for a way to build a better level designer based on a grid layout to which you can snap models and stuff like that.
Can anyone give me a little bit of advice on how I can do this? Is it possible to load, edit and save scenes in applications using jmonkey? If so, how?
Quick update here: what I want is called modular level design. Apparently this is the best way to design the kind of level I want to get, but if I add 2 pieces of floor together, they are outlined with an ugly black line. Does anyone know how to fix this?
No clue about the black outline… could be anything from poorly defined texCoords, to the WrapMode being set to border clamp, to the model instances not being place directly beside each other /shrug
As for modular level design. Try adding each piece to a BetchNode, then call .batch() Once you’ve done this (if the level is static and the individual pieces won’t be shifting around), I would grab the Geometry from the batch node, place it in a regular Node and GC the BatchNode.
One thing you’ll want to keep in mind is one huge model is going to fight against frustum culling. So, you’ll want to create multiple batch nodes for groups of tiles… this also allows for setting up a really quick and easy Paging system to keep the scene relatively small at all times.
I just recently built a dungeon generator that uses these techniques for testing a Particle System I was writing. It worked very well with stellar frame rates using multiple (10+) point lights even prior to switching the scene over to deferred rendering. And that’s saying something considering my shitty machine.
Thanks for your replies, I’ll look into the BatchNode thing,
I’ve fixed the black outline around separate tiles; not sure how, but suddenly they were gone after rebuilding the floor model a few times.
Right now I’m using blender for level deign. The issue I had before with this was that it didn’t load specular and normal maps properly in jMonkey, but that turned out to be a mistake on my end.
Thanks a lot for your input, I’ll do some more research before I make a final decision
Yeah, a placement grid would offer 90% of what you need for a modular level editor…although some automatic lining up of walls/presenting options for next pieces/etc all makes that sort of thing a lot easier to use.
@zarch said:
Yeah, a placement grid would offer 90% of what you need for a modular level editor...although some automatic lining up of walls/presenting options for next pieces/etc all makes that sort of thing a lot easier to use.
Well if I wouldn’t just explain to people how that can be done as a SDK plugin I’d be a happy camper too