Gamefeel changes

This commit is contained in:
austin 2022-02-16 18:48:22 -05:00
parent 92ec47f9fd
commit 075f1e892a
10 changed files with 1397 additions and 1268 deletions

View File

@ -57,20 +57,7 @@
"TARGETABLE",
"CAN_EQUIP"
],
"visualAttributes" : [
{
"attributeId" : "hair",
"variants" : [
{
"id" : "hairshort1",
"model" : "Models/hairshort1.fbx",
"meshes" : [
"Hair"
]
}
]
}
],
"visualAttributes" : [],
"movementSystems" : [
{
"type" : "GROUND",

View File

@ -0,0 +1,172 @@
{
"creatures" : [
{
"creatureId" : "human",
"hitboxes" : [
{
"type": "hurt",
"bone": "Bone.031",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.012",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.003",
"radius": 0.04
},
{
"type": "hurt",
"bone": "Bone.010",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.001",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone",
"radius": 0.08
},
{
"type": "hurt",
"bone": "Bone.014",
"radius": 0.06
},
{
"type": "hurt",
"bone": "Bone.019",
"radius": 0.04
}
],
"tokens" : [
"BLENDER_TRANSFORM",
"SENTIENT",
"ATTACKER",
"GRAVITY",
"TARGETABLE",
"CAN_EQUIP"
],
"visualAttributes" : [
{
"attributeId" : "hair",
"variants" : [
{
"id" : "hairshort1",
"model" : "Models/hairshort1.fbx",
"meshes" : [
"Hair"
]
}
]
}
],
"movementSystems" : [
{
"type" : "GROUND",
"acceleration" : 1000.0,
"maxVelocity" : 1.0,
"animationStartup" : {
"name" : "Armature|Walk",
"length" : 1,
"loops" : false
},
"animationLoop" : {
"name" : "Armature|Walk",
"length" : 1,
"loops" : false
},
"animationWindDown" : {
"name" : "Armature|Walk",
"length" : 1,
"loops" : false
},
"sprintSystem" : {
"maxVelocity" : 5.8,
"staminaMax" : 500,
"animationStartUp" : {
"name" : "SprintStart",
"length" : 1,
"loops" : false
},
"animationMain" : {
"name" : "Sprint",
"length" : 1,
"loops" : false
}
}
}
],
"rotatorSystem" : {
"rotatorItems" : [
{
"boneName" : "myTorsoBone",
"constraints" : [
{
"followsView" : true,
"followsBone" : false,
"parentBone" : "",
"allowedMargin" : 0.2
}
]
},
{
"boneName" : "myLeftLegBone",
"constraints" : [
{
"followsView" : false,
"followsBone" : true,
"parentBone" : "myTorsoBone",
"allowedMargin" : 0.2
}
]
},
{
"boneName" : "myRightLegBone",
"constraints" : [
{
"followsView" : false,
"followsBone" : true,
"parentBone" : "myTorsoBone",
"allowedMargin" : 0.2
}
]
}
]
},
"collidable" : {
"type" : "CYLINDER",
"dimension1" : 0.1,
"dimension2" : 0.45,
"dimension3" : 0.1,
"offsetX" : 0,
"offsetY" : 0.45,
"offsetZ" : 0
},
"attackMoves" : [
{
"type" : "MELEE_WEAPON_SWING_ONE_HAND",
"animationName" : "Armature|SwingWeapon",
"damageStartFrame" : 30,
"damageEndFrame" : 60
}
],
"healthSystem" : {
"maxHealth" : 100,
"onDamageIFrames" : 30
},
"modelPath" : "Models/baseman.fbx"
}
],
"files" : []
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 MiB

View File

@ -171,6 +171,8 @@ public class LoadingThread extends Thread {
//initialize the basic graphical entities of the world (skybox, camera)
initWorldBaseGraphicalEntities();
//init game specific stuff (ie different skybox colors)
initGameGraphicalEntities();
while(Globals.clientConnection.getClientProtocol().isLoading()){
@ -258,6 +260,8 @@ public class LoadingThread extends Thread {
//initialize the basic graphical entities of the world (skybox, camera)
initWorldBaseGraphicalEntities();
//init arena specific stuff (ie different skybox colors)
initArenaGraphicalEntities();
creatingRandomEntities();
@ -475,6 +479,33 @@ public class LoadingThread extends Thread {
System.out.println("Draw Cell Manager ready");
}
static void initArenaGraphicalEntities(){
Globals.skyboxColors.add(new Vector3f(150,200,250));
Globals.skyboxColors.add(new Vector3f(150,200,250));
Globals.skyboxColors.add(new Vector3f(20,20,20));
Globals.skyboxColors.add(new Vector3f(20,20,20));
Globals.skyboxColors.add(new Vector3f(150,200,250));
Globals.skyboxColors.add(new Vector3f(150,200,250));
Globals.skyboxColors.add(new Vector3f(20,20,20));
Globals.skyboxColors.add(new Vector3f(20,20,20));
}
static void initGameGraphicalEntities(){
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(50,100,150));
}
static void initWorldBaseGraphicalEntities(){
@ -487,15 +518,6 @@ public class LoadingThread extends Thread {
Globals.skybox = EntityUtils.spawnDrawableEntity(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(100,150,200));
Globals.skyboxColors.add(new Vector3f(50,100,150));
Globals.skyboxColors.add(new Vector3f(50,100,150));
/*
Player Camera

View File

@ -448,12 +448,12 @@ public class GroundMovementTree {
break;
case IDLE:
// body.clearForces();
// if(entityActor != null){
// if(!entityActor.isPlayingAnimation() || !entityActor.getCurrentAnimation().equals(Animation.ANIMATION_IDLE_1)){
// entityActor.playAnimation(Animation.ANIMATION_IDLE_1);
// entityActor.incrementAnimationTime(0.01);
// }
// }
if(entityActor != null){
String animationToPlay = determineCorrectAnimation();
if(entityActor.isPlayingAnimation() && entityActor.isPlayingAnimation(animationToPlay)){
entityActor.stopAnimation(animationToPlay);
}
}
// if(Globals.collisionEngine.gravityCheck(Globals.commonWorldData, parent)){
// position.set(Globals.collisionEngine.suggestMovementPosition(Globals.commonWorldData,parent,new Vector3f(position.x,position.y - 9.8f,position.z)));
// }

View File

@ -13,6 +13,7 @@ import electrosphere.main.Globals;
import electrosphere.renderer.Mesh;
import electrosphere.renderer.Model;
import electrosphere.renderer.ModelUtils;
import electrosphere.renderer.RenderUtils;
import electrosphere.renderer.ShaderProgram;
import electrosphere.renderer.texture.Texture;
import electrosphere.util.Utilities;
@ -38,8 +39,8 @@ public class DrawCell {
CollisionObject physicsObject;
static Texture groundTextureOne = new Texture("/Textures/Ground/GrassTileable.png");
static Texture groundTextureTwo = new Texture("/Textures/Ground/Dirt1.png");
static Texture groundTextureOne = new Texture("/Textures/Ground/tileableSlabstone.png");
static Texture groundTextureTwo = new Texture("/Textures/Ground/tileableSlabstone.png");
static Texture groundTextureThree = new Texture("/Textures/Ground/Dirt1.png");
static Texture groundTextureFour = new Texture("/Textures/Ground/Dirt1.png");
@ -93,7 +94,7 @@ public class DrawCell {
if(modelEntity != null){
Globals.entityManager.deregisterEntity(modelEntity);
}
Model terrainModel = ModelUtils.createMinimizedTerrainModelPrecomputedShader(heightmap, texturemap, program, stride);
Model terrainModel = RenderUtils.createMinimizedTerrainModelPrecomputedShader(heightmap, texturemap, program, stride);
Mesh terrainMesh = terrainModel.meshes.get(0);
terrainMesh.useTextureList = true;
terrainMesh.textureList.add(groundTextureOne);

View File

@ -364,8 +364,8 @@ public class Globals {
materialDefault.set_diffuse("Textures/default_diffuse.png");
materialDefault.set_specular("Textures/default_specular.png");
//create default lights
assetManager.registerModelToSpecificString(ModelUtils.createBitmapDisplay(), AssetDataStrings.ASSET_STRING_BITMAP_FONT);
assetManager.registerModelToSpecificString(ModelUtils.createBitmapCharacter(), AssetDataStrings.BITMAP_CHARACTER_MODEL);
assetManager.registerModelToSpecificString(RenderUtils.createBitmapDisplay(), AssetDataStrings.ASSET_STRING_BITMAP_FONT);
assetManager.registerModelToSpecificString(RenderUtils.createBitmapCharacter(), AssetDataStrings.BITMAP_CHARACTER_MODEL);
RawFontMap fontMap = FileUtils.loadObjectFromAssetPath("Textures/Fonts/myFontMap.json", RawFontMap.class);
FontUtils.setFontDataMap(fontMap);
//particle billboard model

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

View File

@ -77,6 +77,18 @@ public class Actor {
public boolean isPlayingAnimation(){
return animationQueue.size() > 0;
}
public void stopAnimation(String animationName){
List<ActorAnimationMask> toRemove = new LinkedList<ActorAnimationMask>();
for(ActorAnimationMask mask : animationQueue){
if(mask.getAnimationName().contains(animationName)){
toRemove.add(mask);
}
}
for(ActorAnimationMask mask : toRemove){
animationQueue.remove(mask);
}
}
// public String getCurrentAnimation(){
// return animation;