Big quality games like the mummy,portal,nfs in jmonkey no comprimasation on speed and graphics

Hilarious.

Thank you. This is the funniest stuff I’ve read in a long time. Seriously.

5 Likes

and i thought jmonkey community is seriously dedicated making java no 1 programming language
for 3d game development

“It’s 6 fast.” - @normen. I’m gonna be cracking up at this one for at least a week. :joy:

1 Like

This is not a “teach people Java” site. This is a “programming in JME” site. You still have a lot to learn.

I want you to book mark this thread and come back and read it a few years from now for a good embarrassing laugh. We all have these threads in our past. Fortunately mine were on usenet and lost to history by now.

If you can’t even code your own Asteroids clone without downloading a prepackaged thing from the internet then you are going to have a bad time. That’s like the game programming equivalent of breathing, really.

We’re trying to be helpful, really. Your total stubbornness to ignore advice and your blatantly confident ignorance is what’s funny.

If you have the skills to make a game then you could code an Asteroids game in jMonkeyEngine easily by Monday. I did it in two hours once… then spent the rest of the time making art for it.

Anyway, good luck with your learning.

1 Like

Right! Downloading graphics designer and music composer. Two programmers awaits in queue.

4 Likes

Well, if that’s your plan, you should try unity (you could at least buy things when you don’t find them for free) instead of trying an engine for programmers.

You can’t glue every piece of code in the Internet and create a good game with that. JMonkey is NOT Unity. Unity has a framework where you can download not only assets, but code into your game. And it’s reusable code, like “AI Movement”, “Chat Windows”, etc… “Asteroids” is not a reusable code. It’s a GAME. You can’t glue a game’s code with another game’s code and hope it won’t fall apart.

Game Designing is designign your own game, without copying/pasting other game’s code. When you paint, you don’t print a photo and then paint over it, don’t you?

Things like Movement, Physics, Asset Pipeline, 3D Space and Sound are common things in games. That’s what engines are for. This is what you can call “reusable”. Now, “Asteroids”? It’s the final product, not a material.

well i made a model in blender say a big model
new1.j3o

it took 4 hours i make it big in blender by scaling
i use jmonkey scenegraph and locate it everywhere on the terrain by using add to scene composer

then i use code for travelling here and there in the rooms ,walking stairs

when the capsule size is small the motion is smooth and fast u can say ok

but when the capsule size is large

the motion of the game is shivering,its not smooth

tell me if make

jvm 1024 memory

then my game motion will be smooth.

/*

  • Copyright © 2009-2012 jMonkeyEngine
  • All rights reserved.
  • Redistribution and use in source and binary forms, with or without
  • modification, are permitted provided that the following conditions are
  • met:
    • Redistributions of source code must retain the above copyright
  • notice, this list of conditions and the following disclaimer.
    • Redistributions in binary form must reproduce the above copyright
  • notice, this list of conditions and the following disclaimer in the
  • documentation and/or other materials provided with the distribution.
    • Neither the name of ‘jMonkeyEngine’ nor the names of its contributors
  • may be used to endorse or promote products derived from this software
  • without specific prior written permission.
  • THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  • “AS IS” AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
  • TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
  • PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
  • CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
  • EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
  • PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
  • PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
  • LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
  • NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
  • SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
    */

package newpackage;

import com.jme3.app.SimpleApplication;
import com.jme3.bullet.BulletAppState;
import com.jme3.bullet.collision.shapes.CapsuleCollisionShape;
import com.jme3.bullet.control.CharacterControl;
import com.jme3.bullet.control.RigidBodyControl;
import com.jme3.input.KeyInput;
import com.jme3.input.controls.ActionListener;
import com.jme3.input.controls.KeyTrigger;
import com.jme3.light.DirectionalLight;
import com.jme3.light.PointLight;
import com.jme3.material.Material;
import com.jme3.math.ColorRGBA;
import com.jme3.math.Vector3f;
import com.jme3.renderer.Camera;
import com.jme3.scene.Geometry;
import com.jme3.scene.Spatial;
import com.jme3.scene.shape.Sphere;
import com.jme3.terrain.geomipmap.TerrainLodControl;
import com.jme3.terrain.geomipmap.TerrainQuad;
import com.jme3.terrain.heightmap.AbstractHeightMap;
import com.jme3.terrain.heightmap.ImageBasedHeightMap;
import com.jme3.texture.Texture;
import com.jme3.texture.Texture.WrapMode;
import java.util.ArrayList;
import java.util.List;

/**

  • This demo shows a terrain with collision detection,
  • that you can walk around in with a first-person perspective.
  • This code combines HelloCollision and HelloTerrain.
    */
    public class HelloTerrainCollision1 extends SimpleApplication
    implements ActionListener {

private BulletAppState bulletAppState;
private RigidBodyControl landscape;
private CharacterControl player;
private Vector3f walkDirection = new Vector3f();
private boolean left = false, right = false, up = false, down = false;
private TerrainQuad terrain;
private Material mat_terrain;

float angle1;
float angle2;
PointLight pl;
PointLight p2;
Spatial lightMdl;
Spatial lightMd2;

//Temporary vectors used on each frame.
//They here to avoid instanciating new vectors on each frame
private Vector3f camDir = new Vector3f();
private Vector3f camLeft = new Vector3f();

public static void main(String[] args) {
HelloTerrainCollision1 app = new HelloTerrainCollision1();

app.start();

}

@Override
public void simpleInitApp() {
/** Set up Physics */
bulletAppState = new BulletAppState();
stateManager.attach(bulletAppState);
//bulletAppState.getPhysicsSpace().enableDebug(assetManager);

flyCam.setMoveSpeed(50);
setUpKeys();

DirectionalLight dl = new DirectionalLight();
dl.setDirection(new Vector3f(-0.1f, -0.7f, 1).normalizeLocal());
dl.setColor(new ColorRGBA(1f, 1f, 1f, 1.0f));
rootNode.addLight(dl);

    lightMdl = new Geometry("Light", new Sphere(10, 10, 0.1f));
    lightMdl.setMaterial(assetManager.loadMaterial("Common/Materials/RedColor.j3m"));
    //rootNode.attachChild(lightMdl);

    lightMd2 = new Geometry("Light", new Sphere(10, 10, 0.1f));
    lightMd2.setMaterial(assetManager.loadMaterial("Common/Materials/WhiteColor.j3m"));
    //rootNode.attachChild(lightMd2);


    pl = new PointLight();
    pl.setColor(new ColorRGBA(1, 0.9f, 0.9f, 0));
    pl.setPosition(new Vector3f(0f, 0f, 4f));
    //rootNode.addLight(pl);

    p2 = new PointLight();
    p2.setColor(new ColorRGBA(0.9f, 10, 0.9f, 0));
    p2.setPosition(new Vector3f(10f, 60f, 3f));
    //rootNode.addLight(p2);

Spatial elephant = (Spatial) assetManager.loadModel(“Models/Untitled2/new.j3o”);
float scale = .3f;
elephant.scale(scale, scale, scale);
//rootNode.attachChild(elephant);
/** 4. We give the terrain its material, position & scale it, and attach it. */
//terrain.setMaterial(mat_terrain);
// terrain.setLocalTranslation(0, -100, 0);
//terrain.setLocalScale(2f, 1f, 2f);
rootNode.attachChild(elephant);

/** 5. The LOD (level of detail) depends on were the camera is: */
List<Camera> cameras = new ArrayList<Camera>();
cameras.add(getCamera());
//TerrainLodControl control = new TerrainLodControl(terrain, cameras);
//terrain.addControl(control);

/** 6. Add physics: */ 
/* We set up collision detection for the scene by creating a static 
 * RigidBodyControl with mass zero.*/
elephant.addControl(new RigidBodyControl(0));

// We set up collision detection for the player by creating
// a capsule collision shape and a CharacterControl.
// The CharacterControl offers extra settings for
// size, stepheight, jumping, falling, and gravity.
// We also put the player in its starting position.
CapsuleCollisionShape capsuleShape = new CapsuleCollisionShape(.3f, .3f, 1);
player = new CharacterControl(capsuleShape, .5f);
player.setJumpSpeed(60);
player.setFallSpeed(30);
player.setGravity(60);
player.setPhysicsLocation(new Vector3f(-10, 100, 100));

// We attach the scene and the player to the rootnode and the physics space,
// to make them appear in the game world.
bulletAppState.getPhysicsSpace().add(elephant);
bulletAppState.getPhysicsSpace().add(player);

}
/** We over-write some navigational key mappings here, so we can

  • add physics-controlled walking and jumping: */
    private void setUpKeys() {
    inputManager.addMapping(“Left”, new KeyTrigger(KeyInput.KEY_A));
    inputManager.addMapping(“Right”, new KeyTrigger(KeyInput.KEY_D));
    inputManager.addMapping(“Up”, new KeyTrigger(KeyInput.KEY_W));
    inputManager.addMapping(“Down”, new KeyTrigger(KeyInput.KEY_S));
    inputManager.addMapping(“Jump”, new KeyTrigger(KeyInput.KEY_SPACE));
    inputManager.addListener(this, “Left”);
    inputManager.addListener(this, “Right”);
    inputManager.addListener(this, “Up”);
    inputManager.addListener(this, “Down”);
    inputManager.addListener(this, “Jump”);
    }

/** These are our custom actions triggered by key presses.

  • We do not walk yet, we just keep track of the direction the user pressed. */
    public void onAction(String binding, boolean value, float tpf) {
    if (binding.equals(“Left”)) {
    if (value) { left = true; } else { left = false; }
    } else if (binding.equals(“Right”)) {
    if (value) { right = true; } else { right = false; }
    } else if (binding.equals(“Up”)) {
    if (value) { up = true; } else { up = false; }
    } else if (binding.equals(“Down”)) {
    if (value) { down = true; } else { down = false; }
    } else if (binding.equals(“Jump”)) {
    player.jump();
    }
    }

/**

  • This is the main event loop–walking happens here.
  • We check in which direction the player is walking by interpreting
  • the camera direction forward (camDir) and to the side (camLeft).
  • The setWalkDirection() command is what lets a physics-controlled player walk.
  • We also make sure here that the camera moves with player.
    */
    @Override
    public void simpleUpdate(float tpf) {
    camDir.set(cam.getDirection()).multLocal(0.6f);
    camLeft.set(cam.getLeft()).multLocal(0.4f);
    walkDirection.set(0, 0, 0);
    if (left) {
    walkDirection.addLocal(camLeft);
    }
    if (right) {
    walkDirection.addLocal(camLeft.negate());
    }
    if (up) {
    walkDirection.addLocal(camDir);
    }
    if (down) {
    walkDirection.addLocal(camDir.negate());
    }
    player.setWalkDirection(walkDirection);
    cam.setLocation(player.getPhysicsLocation());
    }
    }

…What?

Did you create a big stage in Blender, and you’re saying that using larger capsule size makes the movement not smooth?

Also, Is. That. Original. Code. Designed. Completely. By. You. ?

no
but i need a code for making big models import from blender and having smooth and fast running in jmonkey
and when iam taking smaller models its look like a small player running jumping climbig stairs.
i want every thing big with this piece of code

Ok. Thank you.

But I still don’t understand that you’re trying to achieve. Explain me what are you trying to do. You want to make the world bigger or the player smaller? Are you using a default model from jME (such as town.zip)? Explain everything.

But just in case, you can import models from blender and convert them directly to .j3o in the SDK. Later you can open them in SceneComposer and scale, move and rotate them.

These two things have nothing to do with one another.

Game dev is hard. Get good.

Or surround the whole code and click the “Preformatted Text” icon (or do Ctrl+Shift+C)

well it takes about 4 days giving that model a good feauture like buildings rooms cafe stairs
then i import that model in jmonkey and convert it in j3o .
then i made size of the i dont know what to call that i think size of invisible player big
but its not picking speed looking of graphics is ok
but with big size iam unable to get fast movement of the invisible player

also my jmonkey installer is not running its showing configuring installer after that nothing
i think my antivirus blocking it but i cannot disbale my antivirus
where is the error log whats the problem

why anyone not answering

modeling is done totaly in blender

The problem is that you have admitted you have virtually zero experience and your intention is to plagiarize existing code - and now you’re in the unfortunate situation of having to know what you are doing - but unwilling to do the work to resolve it.

We all had to learn how to code. The same rules apply here as they do on stackoverflow and pretty much every other programming-based website. Show that you have made valid effort and research, and we will be more than willing to help. Even more so if you are a beginner. But what you are doing is just plain lazy.

I’m also going to close this topic because it really isn’t helping you or the community.

11 Likes