Added a vehicle to continue improving gameplay.
Note this car model is not the same as the one found jme test.
Added a vehicle to continue improving gameplay.
Note this car model is not the same as the one found jme test.
Completed HUGE milestones.
Added a map. Then screenshot shows that Iām roaming grid row 2 column 3.
Dynamically loads areas. I created a 3x3 grid.
Right now the 9 areas load dynamically.
In the far future they will also shift if I want to create an sandbox game. I donāt want that right now (maaaybe in the future).
Character is at the initial origin area. O represents the character
xxx
xOx
xxx
Character moves to area (1,2).
xOx
xxx
xxx
Grid will shift the character to the center again.
xxx
xOx
xxx
Some time ago I made a feature to add Decals to my levels, but thatās only good for static decoration.
So I used the same technique to attach decals to the scene during game play.
Here is in action with my pet project where I test stuff (not a real game):
Something you can notice is decals donāt just attach on walls (bullet holes and blood splats) but also to animated meshes.
I had to make a hack to make it work, first I copy the necessary vertex buffers (BoneIndex, BoneWeight, BindPosePosition and BindPoseNormal) to the new mesh which I attach it to the node where the animation is and finally I disable Hardware skinning for that particular SkinningControl so it will also update the decal mesh from then on.
The assumption is that just a few animated models will have decals at a time (e.g. injured NPCs) so the performance lost is not that bad (thereās probably a better way but Iām happy with this so far).
Very impressive work! I always wondered if animated decals were possible for things like blood or tatoos, but never managed to get far enough to start working on it. So itās great to hear that it works!
Iām also wondering if this step can be skipped.
I had similar issues when I tried attaching clothing to an animated character. At first it appeared to not work and the clothes would not animate, but when I detached then re-atached the animComposer with a new skinningControl, the animComposer suddenly began animating the clothes and everything worked.
The same thing also happened in the SDK, where newly attached clothing items would not follow the animations until the scene was saved and reloaded.
Hereās the code I calll after I attach a new clothing mesh to my animated models to make it work without changing the hardwareSkinning mode, hopefully this will also work for your procedurally generated decals too:
public void refreshAnimationRig(){
spatial = agent.getSpatial();
animComposer = ((Node) spatial).getControl(AnimComposer.class);
skinningControl = ((Node) spatial).getControl(SkinningControl.class);
dynamicAnimControl = ((Node) spatial).getControl(DynamicAnimControl.class);
armature = null;
if(dynamicAnimControl != null){
armature = dynamicAnimControl.getArmature();
}
else if(skinningControl != null){
armature = skinningControl.getArmature();
}
spatial.removeControl(skinningControl);
//important to recreate a new SkinningControl, and to not use the old one
spatial.addControl(new SkinningControl(armature));
agent.getApp().enqueue(()->{
agent.getAgentSkeleton().reInitializie(); // recreate hitboxes a frame later to avoid crash from doing it before the controls are ready
});
}
Very interesting! I will definitively give it a try. Frankly disabling HW skinning is one of the first things I did when troubleshooting my code I and didnāt even try turning it on after, so this is encouraging me to fix it, Thanks!
ps: A quick test threw a NPE but is possible Iām missing copying the HW specific vertex buffers, I will try more tomorrow.
That was it, I just had to copy the HW* vertex buffers and recreating the skinning control made it work.
Thank you so much for the tip @yaRnMcDonuts
Long time no OpenKeeper (Dungeon Keeper 2 remake) newsā¦ Finally had some time/energy/motivation to dig into my game project and not just the jME and its SDK.
Poorly narrated and hastily recordedā¦ Iāve started implementing the keeper spell casting. And as a proof, here are some imps getting conjured:
This month I continue to optimize and improve my editor.
Iām planning on making a small game to validate my editor, and Iām currently trying to make some skills and some in-game items.
Make a skill that attacks with a sword.
Make the sword-slashing effect for skills
Finally de-coupled the bullet form the character node. Previously if you translated the player, the bullet followed.
In the image you can see that I move to different places while the trajectory of the bullet is unchanged.
Features with this test build:
Can change the bullet model geometry to anything else.
The speed is controlled by a scale float value.
Iām NOT fighting against the JMonkey APIs. I donāt introduce custom functions.
Itās important to note that I was able to gracefully implement this solution because Iāve been studying about rotations. I still have some more study to do about rotations, but Iāll get there.
Super cool!
Created a count down timer.
I think these will be the use cases:
Max time: 3 minutes.
Used tpf variable to stay in sync with framerate.
Turns red when finished.
Gives depth to gameplay.
Improved lighting on the enemy. You can see the yellow tint on his left shoulder representing sun light.
Been working with the movement mechanics. I added walk/run, crouch and diving:
For diving I add a ghost volume where the water is and with a contact listener I switch the movement style.
I only implemented the logic part, not the visuals yet. I plan to apply a simple filter when underwater to turn things blue or whatever, but the catch is that the camera and the movement switch should not happen at the same time, since for the filter I need to consider the camera location as I can swim with my head above the water.
Another limitation I found is that the custom mesh volumes I can create with my level editor when converted to collision shapes are not āsolidā inside (the listener doesnāt detect when Iām fully inside, only when touching the walls).
I believe this happens because I donāt merge the vertices of the custom mesh, which should not be hard to solve, but for now I can use simple box collision shapes and thatās good enough.
Donāt over think it. Just switch turn on the under water effects once the head volume is fully below the water. Trust me the user doesnāt pay too much attention to that as much as us devs do.
I separate this situation into two states:
Above the water: the head volume is above or touching the water mesh.
Below water: the head volume is below, not touching the water mesh.
I kind of have to, because when Iām just above water level I still need to keep the water movement active so I can hop over the edge to get out of the pool, otherwise the normal gravity will push me down as soon as I rise above the surface.
āin the waterā for physics is different than āin the waterā for the camera.
Edit: and itās even more fun with a third person camera. For Mythruna (the latest version not the original) I even took some pains to make sure that the camera is partially āin waterā and half āout of waterā when in third person modeā¦ since itās really easy to drag the camera to be intersecting the water surface.
ā¦when there are waves again, I will have some new issues but it works for now.
I made a super simple proof of concept of this:
I think itās good enough as is, if the water line is crossing the screen it may not be 100% accurate but I donāt find this important enough to make a more complex solution.
Amazing work!
Would you consider your port ready for someone who wants to play DK2 for the first time? if not, how much do you think is left?
Thanks! No, it is not ready for playing. At this stage it is more a technical demo than anything else. Surely we have implemented a lot of features but that doesnāt still make it enjoyable to play. There is so much to do that it is hard to say really. Many of the implemented features also need some fine tuning to be believable.
At this moment I think OpenKeeper has been 10 years in the making. There are some years with no progress at all and the first two years went largely to just figure out the formats and secrets of the original title. And the latter is not even 100% complete