Here is a gameplay video on my channel. this game is based on custom game engine made on top on libgdx. In Game Files clearly seen libgdx java. This game has very good and smooth controls, graphics and input system. Made this video for you guys to see. its free demo on steam.
My question is. Jmonkeyengine games based on charactercontroller (Physics based like BetterCharacter contoller) and input system feels like someone forcibly stopping you to not jump fast move. I d’nt know but many games I have seen are like this. so, is this character controller is bad ? For Example Rising World made with Jmonkeengine is the most successful game but now they have changed engine to unity. Rising world also have same issue. If I make my own physics based character will this be fixed ? I am talking about FPS style games here.
I Know JME is far far better than Libgdx for 3D Games. but just want to know about this issue. maybe someone else know about it.
So, you are asking:
“Should I write my whole game engine from scratch just because I don’t like this one class?”
My answer would be “no”.
If you like JME and don’t like BetterCharacterController then write your own character controller. That seems way simpler than writing a whole engine from scratch.
…but maybe that’s just me.
For example, Mythruna uses none of the JME physics stuff.
It depends on how you set the walk direction on the controller. If you do this, you’re gonna forcibly stop the milisecond the user stops pressing forward:
Instead if there is no input you can multiply the requested direction to slowly or quickly decrease to zero:
if(requestedMove) {
requestedDir.set(calculateSomeVectorForDirection());
} else {
requestedDir.multLocal(0.94f); // if 0f then it will stop instantly, if 0.1f then it will deccelerate fast but not instant stop. If higher number then it will takes more time to stop.
}
characterControl.setWalkDirection(requestedDir);
If you are in the air you can check if your characger is on the ground and if not you can mulitply the direction vector also so you have less influence on your characters direction change when in the air. Also if you are in the air you can turn off friction so your character won’t stick to walls if you’re going toward one. You can also crank up friction so your character sticks there.
Also there is a BetterCharacterControl class. I don’t know what’s the difference compared to the CharacterControl class though. I always use the Better one.
Edit: By the way… just because you don’t like the CharacterControl class, you would go about writing a whole new engine? That’s such a huge task. Just roll your own EvenBetterCharacterControl class and you are free to control your character the way you want.
I also tried LibGDX when I was prototyping the domino game using ECS to see if I could do the shuffle of pieces right. in 2D things were very easy, but when I went to 3D things were a lot harder than I wanted because on how GDX renders things by default. I realized that I had to design a really good render system that handle a lot of things more than I wanted to because I was in charge of the drawing of everything (on 2D it’s far easier) and GTLF was too buggy for my liking. You can make a 3d rendering pipeline in LibGDX that may do a better job than JME. But if you want a good enough result JME gets you faster with less trial an error.
Another thing is that you don’t have to to use JME’s default implementation of physics and character controllers when you use it as a framework (No SDK, just the libs). in my Domino game I use LibGDX’s java port of Box2D, and translate the 2D positions to the 3D world using ECS. Using JBullet gave me more headaches because I had to create rotation and translation constraints that may not work well at all. I had better luck with Unity, and even there the result was horrible after weeks of work. I tried 2D physics as well, but it had other sets of issues like rotating every object instead of simply choosing the axes for physics.
I also had trouble with BetterCharacterControl, and a full physics system is really overkill for basic character movement for most games.
So for my game, I wrote a super lightweight character movement system that only uses 2-4 Ray casts per character every frame. And I stagger ray casts every 2-3 frames for characters very far away for further optimization.
And then I only use a full physics system (minie) for complex things like ragdoll effects.
Lets see. Godot 4 is there if I don’t get things right. Because i’m in start. Just experimenting with many things. JME’s performance is good with older hardware your game will be successful. Keep it up. You are our motivation with that project.
jMonkeyEngine is just an SDK with a constellation of APIs. Just pickup what you like. If something sounds off with the Character Control, open a discussion for it.