Gamefeel changes
This commit is contained in:
parent
92ec47f9fd
commit
075f1e892a
@ -57,20 +57,7 @@
|
|||||||
"TARGETABLE",
|
"TARGETABLE",
|
||||||
"CAN_EQUIP"
|
"CAN_EQUIP"
|
||||||
],
|
],
|
||||||
"visualAttributes" : [
|
"visualAttributes" : [],
|
||||||
{
|
|
||||||
"attributeId" : "hair",
|
|
||||||
"variants" : [
|
|
||||||
{
|
|
||||||
"id" : "hairshort1",
|
|
||||||
"model" : "Models/hairshort1.fbx",
|
|
||||||
"meshes" : [
|
|
||||||
"Hair"
|
|
||||||
]
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"movementSystems" : [
|
"movementSystems" : [
|
||||||
{
|
{
|
||||||
"type" : "GROUND",
|
"type" : "GROUND",
|
||||||
|
|||||||
172
assets/Data/creatures/human2.json
Normal file
172
assets/Data/creatures/human2.json
Normal 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" : []
|
||||||
|
}
|
||||||
BIN
assets/Textures/Ground/tileableSlabstone.png
Normal file
BIN
assets/Textures/Ground/tileableSlabstone.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 1.2 MiB |
@ -171,6 +171,8 @@ public class LoadingThread extends Thread {
|
|||||||
|
|
||||||
//initialize the basic graphical entities of the world (skybox, camera)
|
//initialize the basic graphical entities of the world (skybox, camera)
|
||||||
initWorldBaseGraphicalEntities();
|
initWorldBaseGraphicalEntities();
|
||||||
|
//init game specific stuff (ie different skybox colors)
|
||||||
|
initGameGraphicalEntities();
|
||||||
|
|
||||||
|
|
||||||
while(Globals.clientConnection.getClientProtocol().isLoading()){
|
while(Globals.clientConnection.getClientProtocol().isLoading()){
|
||||||
@ -258,6 +260,8 @@ public class LoadingThread extends Thread {
|
|||||||
|
|
||||||
//initialize the basic graphical entities of the world (skybox, camera)
|
//initialize the basic graphical entities of the world (skybox, camera)
|
||||||
initWorldBaseGraphicalEntities();
|
initWorldBaseGraphicalEntities();
|
||||||
|
//init arena specific stuff (ie different skybox colors)
|
||||||
|
initArenaGraphicalEntities();
|
||||||
|
|
||||||
creatingRandomEntities();
|
creatingRandomEntities();
|
||||||
|
|
||||||
@ -475,6 +479,33 @@ public class LoadingThread extends Thread {
|
|||||||
System.out.println("Draw Cell Manager ready");
|
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(){
|
static void initWorldBaseGraphicalEntities(){
|
||||||
@ -487,15 +518,6 @@ public class LoadingThread extends Thread {
|
|||||||
Globals.skybox = EntityUtils.spawnDrawableEntity(AssetDataStrings.ASSET_STRING_SKYBOX_BASIC);
|
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
|
Player Camera
|
||||||
|
|||||||
@ -448,12 +448,12 @@ public class GroundMovementTree {
|
|||||||
break;
|
break;
|
||||||
case IDLE:
|
case IDLE:
|
||||||
// body.clearForces();
|
// body.clearForces();
|
||||||
// if(entityActor != null){
|
if(entityActor != null){
|
||||||
// if(!entityActor.isPlayingAnimation() || !entityActor.getCurrentAnimation().equals(Animation.ANIMATION_IDLE_1)){
|
String animationToPlay = determineCorrectAnimation();
|
||||||
// entityActor.playAnimation(Animation.ANIMATION_IDLE_1);
|
if(entityActor.isPlayingAnimation() && entityActor.isPlayingAnimation(animationToPlay)){
|
||||||
// entityActor.incrementAnimationTime(0.01);
|
entityActor.stopAnimation(animationToPlay);
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
// if(Globals.collisionEngine.gravityCheck(Globals.commonWorldData, parent)){
|
// 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)));
|
// position.set(Globals.collisionEngine.suggestMovementPosition(Globals.commonWorldData,parent,new Vector3f(position.x,position.y - 9.8f,position.z)));
|
||||||
// }
|
// }
|
||||||
|
|||||||
@ -13,6 +13,7 @@ import electrosphere.main.Globals;
|
|||||||
import electrosphere.renderer.Mesh;
|
import electrosphere.renderer.Mesh;
|
||||||
import electrosphere.renderer.Model;
|
import electrosphere.renderer.Model;
|
||||||
import electrosphere.renderer.ModelUtils;
|
import electrosphere.renderer.ModelUtils;
|
||||||
|
import electrosphere.renderer.RenderUtils;
|
||||||
import electrosphere.renderer.ShaderProgram;
|
import electrosphere.renderer.ShaderProgram;
|
||||||
import electrosphere.renderer.texture.Texture;
|
import electrosphere.renderer.texture.Texture;
|
||||||
import electrosphere.util.Utilities;
|
import electrosphere.util.Utilities;
|
||||||
@ -38,8 +39,8 @@ public class DrawCell {
|
|||||||
|
|
||||||
CollisionObject physicsObject;
|
CollisionObject physicsObject;
|
||||||
|
|
||||||
static Texture groundTextureOne = new Texture("/Textures/Ground/GrassTileable.png");
|
static Texture groundTextureOne = new Texture("/Textures/Ground/tileableSlabstone.png");
|
||||||
static Texture groundTextureTwo = new Texture("/Textures/Ground/Dirt1.png");
|
static Texture groundTextureTwo = new Texture("/Textures/Ground/tileableSlabstone.png");
|
||||||
static Texture groundTextureThree = new Texture("/Textures/Ground/Dirt1.png");
|
static Texture groundTextureThree = new Texture("/Textures/Ground/Dirt1.png");
|
||||||
static Texture groundTextureFour = 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){
|
if(modelEntity != null){
|
||||||
Globals.entityManager.deregisterEntity(modelEntity);
|
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);
|
Mesh terrainMesh = terrainModel.meshes.get(0);
|
||||||
terrainMesh.useTextureList = true;
|
terrainMesh.useTextureList = true;
|
||||||
terrainMesh.textureList.add(groundTextureOne);
|
terrainMesh.textureList.add(groundTextureOne);
|
||||||
|
|||||||
@ -364,8 +364,8 @@ public class Globals {
|
|||||||
materialDefault.set_diffuse("Textures/default_diffuse.png");
|
materialDefault.set_diffuse("Textures/default_diffuse.png");
|
||||||
materialDefault.set_specular("Textures/default_specular.png");
|
materialDefault.set_specular("Textures/default_specular.png");
|
||||||
//create default lights
|
//create default lights
|
||||||
assetManager.registerModelToSpecificString(ModelUtils.createBitmapDisplay(), AssetDataStrings.ASSET_STRING_BITMAP_FONT);
|
assetManager.registerModelToSpecificString(RenderUtils.createBitmapDisplay(), AssetDataStrings.ASSET_STRING_BITMAP_FONT);
|
||||||
assetManager.registerModelToSpecificString(ModelUtils.createBitmapCharacter(), AssetDataStrings.BITMAP_CHARACTER_MODEL);
|
assetManager.registerModelToSpecificString(RenderUtils.createBitmapCharacter(), AssetDataStrings.BITMAP_CHARACTER_MODEL);
|
||||||
RawFontMap fontMap = FileUtils.loadObjectFromAssetPath("Textures/Fonts/myFontMap.json", RawFontMap.class);
|
RawFontMap fontMap = FileUtils.loadObjectFromAssetPath("Textures/Fonts/myFontMap.json", RawFontMap.class);
|
||||||
FontUtils.setFontDataMap(fontMap);
|
FontUtils.setFontDataMap(fontMap);
|
||||||
//particle billboard model
|
//particle billboard model
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -77,6 +77,18 @@ public class Actor {
|
|||||||
public boolean isPlayingAnimation(){
|
public boolean isPlayingAnimation(){
|
||||||
return animationQueue.size() > 0;
|
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(){
|
// public String getCurrentAnimation(){
|
||||||
// return animation;
|
// return animation;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user