How to use release
The release is a runnable jar file that takes in one input, a lua file to be run.
A framework example is provided in:
git clone https://github.com/qualia91/com.boc_dev.lge_lua_front_end
The file in this repo called game_scene.lua is the one that can be provided as a command line input, like:
java -jar .\lockdown_game_engine-1.0.0.jar <PATH_TO_REPO>/com.boc_dev.lge_lua_front_end/game_scene.lua
Components
Description:
Class: com.boc_dev.lge_model.generated.components.ParticleSpring.java
Fields:
dampingConstant (float):
springConstant (float):
restLength (float):
Description:
Class: com.boc_dev.lge_model.generated.components.Pickable.java
Fields:
active (boolean):
Description:
Class: com.boc_dev.lge_model.generated.components.List.java
Fields:
spacerZ (float): space each object is from the next one in the z axis
indentZ (float): indent of a sub list in the z axis
spacerY (float): space each object is from the next one in the y axis
indentY (float): indent of a sub list in the y axis
Description:
Class: com.boc_dev.lge_model.generated.components.Button.java
Fields:
functionName (String): this will be the name of what function is activated when this button is pressed
active (boolean):
Description:
Class: com.boc_dev.lge_model.generated.components.Timer.java
Fields:
active (boolean):
timeoutFlag (boolean):
functionName (String): this will be the name of what function is ativated when this timer runs out
timeoutLength (long):
repeate (boolean):
startFrame (long):
Description:
Class: com.boc_dev.lge_model.generated.components.MarchingCubeGeneration.java
Fields:
materialID (UUID):
chunkSize (int):
generationRange (int):
Description:
Class: com.boc_dev.lge_model.generated.components.SelectedItems.java
Fields:
pickingHappened (boolean): Flag to tell selection system that a picking event occured and selection needs to clear and update
Description:
Class: com.boc_dev.lge_model.generated.components.Mesh.java
Fields:
vertexPositions (com.boc_dev.maths.objects.vector.Vec3f[]):
materialID (UUID):
index (com.boc_dev.maths.objects.vector.Vec3i):
Description:
Class: com.boc_dev.lge_model.generated.components.TerrainGeneration.java
Fields:
octaves (int):
segmentSize (int):
lacunarity (float):
materialID (UUID):
amplitude (int):
chunkSize (int):
cellSpace (int):
generationRange (int):
Description: Component that gets affected by the rigid body system. It must be under a transform, and thats the one that gets transformed.
Class: com.boc_dev.lge_model.generated.components.Light.java
Fields:
attenuationExponent (float):
coneAngle (float):
attenuationLinear (float):
attenuationConstant (float):
colour (com.boc_dev.maths.objects.vector.Vec3f):
lightingType (LightingType): light type
direction (com.boc_dev.maths.objects.vector.Vec3f):
intensity (float):
Description:
Class: com.boc_dev.lge_model.generated.components.NormalMap.java
Fields:
path (String):
Description:
Class: com.boc_dev.lge_model.generated.components.Collision.java
Fields:
collisionRestitution (float):
Description: Transform of an object. Will affect the objects underneath it.
Class: com.boc_dev.lge_model.generated.components.Transform.java
Fields:
scale (com.boc_dev.maths.objects.vector.Vec3f): scale component of transform
position (com.boc_dev.maths.objects.vector.Vec3f): positon component of transform
rotation (com.boc_dev.maths.objects.QuaternionF): rotation component of transform
Description:
Class: com.boc_dev.lge_model.generated.components.ViscousDrag.java
Fields:
coefficientOfDrag (float):
Description: Component that gets affected by the rigid body system. It must be under a transform, and thats the one that gets transformed.
Class: com.boc_dev.lge_model.generated.components.RigidBody.java
Fields:
mass (double): Mass in kg's of entity.
linearMomentum (com.boc_dev.maths.objects.vector.Vec3d): linearMomentum of entity.
rigidBodyType (RigidBodyObjectType): Type of rigid body.
angularMomentum (com.boc_dev.maths.objects.vector.Vec3d): angularMomentum of entity
dimensions (com.boc_dev.maths.objects.vector.Vec3d): Dimensions of entity.
Description:
Class: com.boc_dev.lge_model.generated.components.Texture.java
Fields:
path (String):
Description: Skybox used in scene.
Class: com.boc_dev.lge_model.generated.components.SkyBox.java
Fields:
skyboxType (SkyboxType): Type of geometry used to make sykbox. Can be CUBE or SPHERE
distance (float): Distance the skybox is rendered at
texture (String): Texture of the skybox
Description: Object that enables user control to a transform it is under.
Class: com.boc_dev.lge_model.generated.components.Controllable.java
Fields:
sensitivity (float): rotation speed
enableLook (boolean): Can rotate object
speed (float): translate speed
enableMove (boolean): Can translate object
Description:
Class: com.boc_dev.lge_model.generated.components.Script.java
Fields:
script (String): Lua Script file. This is searched for within
Description:
Class: com.boc_dev.lge_model.generated.components.ParticleBody.java
Fields:
mass (float):
velocity (com.boc_dev.maths.objects.vector.Vec3d):
Description:
Class: com.boc_dev.lge_model.generated.components.TerrainChunk.java
Fields:
materialID (UUID):
origin (com.boc_dev.maths.objects.vector.Vec3f):
grid (float[][]):
cellSpace (double):
index (com.boc_dev.maths.objects.vector.Vec2i):
Description:
Class: com.boc_dev.lge_model.generated.components.Selectable.java
Fields:
selectedMaterialUUID (UUID):
selected (boolean):
unselectedMaterialUUID (UUID):
Description:
Class: com.boc_dev.lge_model.generated.components.WaterGeneration.java
Fields:
chunkSize (int):
cellSpace (int):
height (int):
Description: Impulse given from player.
Class: com.boc_dev.lge_model.generated.components.Impulse.java
Fields:
linearVelocityImpulse (com.boc_dev.maths.objects.vector.Vec3d): linear velocity impulse of entity
angularVelocityImpulse (com.boc_dev.maths.objects.vector.Vec3d): angular velocity impulse of entity
Description:
Class: com.boc_dev.lge_model.generated.components.Camera.java
Fields:
width (int):
cameraObjectType (CameraObjectType):
far (float):
near (float):
CameraProjectionType (CameraProjectionType):
height (int):
fov (float):
Description:
Class: com.boc_dev.lge_model.generated.components.Geometry.java
Fields:
localTransformation (com.boc_dev.maths.objects.matrix.Matrix4f):
material (UUID):
modelFile (String):
Description:
Class: com.boc_dev.lge_model.generated.components.WaterChunk.java
Fields:
cellSpace (int):
grid (float[][]):
Description: Object that enables user control to a transform it is under via linear and angular momentum impulses.
Class: com.boc_dev.lge_model.generated.components.ImpulseControllable.java
Fields:
angularSpeed (float): Rotation speed.
enableRotate (boolean): Can rotate object.
linearSpeed (float): Translate speed.
enableMove (boolean): Can translate object.
Description: Component to enable gravity on transform object above.
Class: com.boc_dev.lge_model.generated.components.Gravity.java
Fields:
simple (boolean): If simple gravity is true, each object is accelerated towards negative z axis. If false, it uses universal law of gravitation
G (float): Gravitational
Description:
Class: com.boc_dev.lge_model.generated.components.Material.java
Fields:
specularColour (com.boc_dev.maths.objects.vector.Vec3f):
diffuseColour (com.boc_dev.maths.objects.vector.Vec3f):
reflectance (float):
shininess (float):
Description:
Class: com.boc_dev.lge_model.generated.components.Boid.java
Fields:
velocity (com.boc_dev.maths.objects.vector.Vec3f):
minSpeed (float):
lengthAwayGroupSquared (float):
lengthAwayMinSquared (float):
antiCollideScale (float):
perceivedCenterScale (float):
velocityMatchScale (float):
boundScale (float):
speed (float):
radius (float):
goal (com.boc_dev.maths.objects.vector.Vec3f):
Description:
Class: com.boc_dev.lge_model.generated.components.Text.java
Fields:
fontAlignment (FontAlignment):
fontSize (float):
fontName (String):
text (String):
Enumerations
Description: Type of object used for the skybox.
Class: com.boc_dev.lge_model.generated.enums.SkyboxType.java
Values:
- SPHERE
- CUBE
Description: Type of rigid body created, used in rigid body sim to generate the moment of inertia tensor.
Class: com.boc_dev.lge_model.generated.enums.RigidBodyObjectType.java
Values:
- CUBOID
- SPHERE
- SPHERE_INNER
- NONE
Description: Camera type. Primary is the one used as the main camera. FBO is a secondary camera that can be used to create textures to be rendered to an object.
Class: com.boc_dev.lge_model.generated.enums.CameraObjectType.java
Values:
- PRIMARY
- FBO
Description: Type of projection matrix used for camera. Perspective produces a normal 3D camera view, orthographic produces a 2D view.
Class: com.boc_dev.lge_model.generated.enums.CameraProjectionType.java
Values:
- PERSPECTIVE
- ORTHOGRAPHIC
Description: Direction in which a list positions the objects within it.
Class: com.boc_dev.lge_model.generated.enums.Orientation.java
Values:
- HORIZONTAL
- VERTICLE
Description: Type of light create in the graphics engine.
Class: com.boc_dev.lge_model.generated.enums.LightingType.java
Values:
- POINT
- SPOT
- DIRECTIONAL
Description: Used to set allignment of text.
Class: com.boc_dev.lge_model.generated.enums.FontAlignment.java
Values:
- BEGIN
- END
- CENTER
Description: Shape used to define how it responds to a collision with another collision shape.
Class: com.boc_dev.lge_model.generated.enums.CollisionShape.java
Values:
- SPEHER
- CUBOID
How to develop
You will need all the following repo's to get the game engine working:com.nick.wood.game_engine.core: https://github.com/Qualia91/com.boc_dev.lge_core
com.nick.wood.game_engine.event_bus: https://github.com/Qualia91/com.boc_dev.event_bus
com.nick.wood.game_engine.examples: https://github.com/Qualia91/com.boc_dev.lge_examples
com.nick.wood.game_engine.gcs_model: https://github.com/Qualia91/com.boc_dev.lge_model
com.nick.wood.game_engine.systems: https://github.com/Qualia91/com.boc_dev.lge_systems
com.nick.wood.lge_scripting: https://github.com/Qualia91/com.boc_dev.lge_scripting
com.nick.wood.graphics_library: https://github.com/Qualia91/com.boc_dev.graphics_library
com.nick.wood.maths: https://github.com/Qualia91/com.boc_dev.maths
com.nick.wood.physics_library: https://github.com/Qualia91/com.boc_dev.physics_library
com.nick.wood.lge_scripts: https://github.com/Qualia91/com.boc_dev.lge_scripts
com.nick.wood.lge_lua_front_end: https://github.com/Qualia91/com.boc_dev.lge_lua_front_end
game_engine_build: https://github.com/Qualia91/lockdown_game_engine
Clone script below should do the trick:git clone https://github.com/qualia91/com.boc_dev.lge_core
git clone https://github.com/qualia91/com.boc_dev.event_bus
git clone https://github.com/qualia91/com.boc_dev.lge_examples
git clone https://github.com/qualia91/com.boc_dev.lge_model
git clone https://github.com/qualia91/com.boc_dev.lge_systems
git clone https://github.com/qualia91/com.boc_dev.lge_scripting
git clone https://github.com/qualia91/com.boc_dev.graphics_library
git clone https://github.com/qualia91/com.boc_dev.maths
git clone https://github.com/qualia91/com.boc_dev.physics_library
git clone https://github.com/qualia91/lockdown_game_engine
git clone https://github.com/qualia91/com.boc_dev.lge_scripts
git clone https://github.com/qualia91/com.boc_dev.lge_lua_front_end
then you will need to navigate to com.boc_dev.lge_model\def and run generation.lua in lua to generate the java classes that define the model.
Lua Scripting Update: Due to the maven dist of lua not being compatible with java modules, i have included a module ready dist of lua in com.boc_dev.lge_scripting/lib. To add this to your local maven repo, simple double click the maven_repo_builder.cmd file in that dir.
Then look to com.boc_dev.lge_examples for how to use it!
If you are using IDEA with this game engine, you may struggle with it not finding some dll's. this seems to be a bug with idea and maven, and i have no idea how to fix it other than downloading the necessary dlls from the lwjgl website and putting them in AppData\Local\Temp\lwjgl\3.2.3-build-13
If anyone knows more about this, please let me know!