Voxel-Based RP-centric game

Good afternoon,



I have set myself on a daunting task. My dream is to make a game that finally focuses on the all-but-ignored role-playing community in MMOs out there. There simply isn’t a game designed for those of us who like to get into character and have our actions impact the world we play in. Most MMos are static and seem like a bad time loop where nothing you do matters and no matter how much good (or bad) you do, it goes un-noticed in the world.



My dream:



A game any computer or device can access (why I chose java) in which the players shape the lore and landscape of the world they live in virtually. A game designed from the ground up to not only support role-play, but encourages it (though I have intentions of servers for those that care less about RP and more for say, pvp, or just casual play).



So after looking about, I decided to set my sights high and found the jMonkeyEngine a while ago, but life has kept me from totally delving into my project. I am not a master java programmer, nor am I a 3D artist. I have Blender and use Netbeans for my development environment. I know enough Java to be able to write some basic code, and can grasp most concepts pretty fast. I am in the learning phases still, but am very quick to learn.



What I would like is to have a voxel-based world that doesn’t look like Minecraft (the cube-terrain is athema to immersion for RP) and quite frankly, don’t have any intention of making yet another Minecraft clone. I have seen voxel engines produce moderately realistic terrain that you can destroy or create at run time, so that is what I want. Any help in finding code, an engine or guidance in that direction would be most appreciated.



I am also having a hard time figuring out how to properly import a model from Blender and having it turn out properly (so far, my I have got a basic sphere in and the texture looks pure white, so I am not doing something in Blender right with the export. I admit, I am very inept at Blender and 3D modeling).



Any advice and help the community can offer would be greatly appreciated. I know its a monmumental task, but its where I want to focus my energies. Has been for years now. Time to really sink my teeth in and do it.

Search the forums for voxel. There are plenty of posts on that subject.



Good luck.

Have good look at Mythruna then go and read every post ever made by @pspeed. This will put you in a very good standing to attack your project. I understand you’re not looking for cube-terrain but the principals apply to more realistic voxel environments.



Your project sounds cool, I’d love to do something similar but the scope is too much for me :wink:



best of luck, keep us up to date!

Thanks for the replies so far. I will look at everything relevent to my development. Of course I’ll keep you all updated.

Take a look at Eve Online. It does several of the things you are talking about (although not all of them and not to the same extent). You could learn a lot from what they have done right and not-so-right :slight_smile:

Sounds like a good project, just make sure you dont give up on it. My buddy & I were supposed to be working on an small MORPG, but he got bored with it very quickly & now I am in similar position to you. By the way, try using the ogre exporter with blender if you have just been importing them as .blend files. The blender importer is not yet fully supported.

@javagame said:
Sounds like a good project, just make sure you dont give up on it. My buddy & I were supposed to be working on an small MORPG, but he got bored with it very quickly & now I am in similar position to you. By the way, try using the ogre exporter with blender if you have just been importing them as .blend files. The blender importer is not yet fully supported.

I have been, my biggest problem is that I think I am doing something wrong in the export on the Blender side as I am just a beginner with it. I can get the model into the game window and rendered, but the material doesn't show the tgexture. I either get a red model, or a grey model with no texture. Its really frustrating. I have been over as much documentation as I can find, but I just can't get it to work.

And I am not quitting, this is going to be the game I want to play.

Many people have had this problem :slight_smile: What you have to do is: if you have more than one material file from the export, open each file with a text edior & paste the contents of each file into one. Then rename this material file the same name as you model file ( modelname.scene or modelname.mesh etc)

I don’t though, that’s the issue. All I am trying to do right now is get a basic sphere with an applied texture to render in the basic jMonkey window. I make the model in Blender, create a material of the same name, apply the picture texture to it, export it to ogre xml then do the code to add the model to the scene as per the tutorial and all I get is either the red sphere (i.e. no texture) or a grey sphere.



I know I am doing something wrong somewhere. Just don’t know where. So let me do this step by step with a new model:



I open Blender and here’s the default cube. I’ll use that and call it Cube. I create a material and rename it Cube as well. Then, I grab an image to use as a texture. I rename it to Cube.jpg just to be safe. Then, I find the texture image and apply it to my cube in Blender. Now, I don’t care how its mapped to the cube right now, as long as the texture shows in some way (I chose Generated). It doesn’t look right, but the texture is on the object in Blender.



I save the file as Cube.blend to make sure things are okay, and I can go back later. Then, I export it as an Ogre mesh. Everything is checked except Seperate Materials and Only Animated Bones (which, I have no animations, so I ignore this). Then, I copy and paste the 4 files (Cube.mesh.xml, Cube.scene, Cube.jpg and Cube,material).



Now, here is the Cube.material file.

Code:
material _missing_material_ { receive_shadows off technique { pass { ambient 0.1 0.1 0.1 1.0 diffuse 0.8 0.0 0.0 1.0 specular 0.5 0.5 0.5 1.0 12.5 emissive 0.3 0.3 0.3 1.0 } } }

// blender material: Cube
material Cube
{
receive_shadows on
technique b2ogre_1336761319.504562
{
pass b2ogre_1336761319.536404
{
ambient 0.800000011920929 0.800000011920929 0.800000011920929 1.0
diffuse 0.6400000190734865 0.6400000190734865 0.6400000190734865 1.0
specular 0.5 0.5 0.5 1.0 12.5
emissive 0.0 0.0 0.0 1.0
alpha_to_coverage off
colour_write on
cull_hardware clockwise
depth_check on
depth_func less_equal
depth_write on
illumination_stage
light_clip_planes off
light_scissor off
lighting on
normalise_normals off
polygon_mode solid
scene_blend one zero
scene_blend_op add
shading gouraud
transparent_sorting on
texture_unit b2ogre_1336761319.537922
{
texture Cube.jpg
tex_address_mode wrap
scale 1.0 1.0
colour_op replace
}
}
}
}


Then, I power up jMonkey and insert this code and run it:
[java]
public void simpleInitApp()
{
Spatial cube = assetManager.loadModel("Models/Cube.mesh.xml");
rootNode.attachChild(cube);

DirectionalLight sun = new DirectionalLight();
sun.setDirection(new Vector3f(-0.1f, -0.7f, -1.0f).normalizeLocal());
rootNode.addLight(sun);
}[/java]

And this is what I get:
http://imgur.com/EuKIj

I know I must be missing something small, a checkbox, an option, a line of code or something, but for the life of me, I don't know what.

Ok, try going into edit mode with your block, pressing a to select all then unwrap. Set the texture as UV, instead of generated (just for the purpose of de-bugging). also, dont rename the mesh.xml file, leave it as it is if you already aren’t. In your assets folder, right click on the Cube.scene * view model. Report back. :slight_smile:

If this still fails I can prepare a short youtube video explaining.

Holy crap! Unwrapping it worked! Thanks! The texture isn’t applied properly, but it shows! WHeeeeee!



EDIT: Okay, got the sphere with texture applied. Now to get it applied right without it being tiled across the surface.

Great, yeah I think you need to always unwrap the model. If you ever wanted to swap models & ideas in the future by the way, you can message me :slight_smile:

@javagame said:
If this still fails I can prepare a short youtube video explaining.

The community would probably benefit from it.

This is what I have now:

http://imgur.com/CrZhT

Tried Generated, Sphere and a couple others. Won’t come out not tiled.

Did you unwrap the sphere? if you did, try opening up the UV editor & shrinking it all down in there.

Thanks to javagame, I have a properly applied texture in jMonkey.



Thanks man.

Awsome. Also, dont know if you know this but you can go onto shading - smooth on the left of blender to make it look more natural.

Nice sphere.