Proto commits in trillek-team/tec

These 34 commits are when the Protocol Buffers files have changed:

Commit:569298d
Author:Meisaka Yukara
Committer:Meisaka Yukara

Animation control methods, and other small fixes Adds the "rs_anim" console command to test animation. MD5Mesh got some debugging and will now parse files with inner ordered lists i.e. "flags" MD5 normals calculation was also adjusted slightly, removing area bias. Post-process shader can now correctly access position data.

The documentation is generated from this commit.

Commit:5c36a35
Author:Meisaka Yukara
Committer:Meisaka Yukara

Fix some of the silliness

Commit:0812fdb
Author:Meisaka Yukara
Committer:Meisaka Yukara

RenderSystem refactor part 3 Adds shader type infrence, which looks up all the uniforms and attributes the shader uses, engine sampler channels are typically set to a constant, so this new system looks up those binding constants from a list and sets them the first time a shader is used. Adds in-engine shader include pre-processing, with debug line correctness this includes changes to the Render config file to specify what can be included. * Adds RenderSystem commands to the console, additionally all console commands now take a std::string instead of whatever the hell they were doing before. * Added "options" to the RenderSystem, enabling runtime switching of core shaders, and toggling debug view on/off via command. * Add Emission to the GBuffer * Converted the FinalPass to a shader, this also handles emissive. * Add a parameter texture to the floor * Changed Material "activation", now the render system binds material textures directly, providing a default in case a shader needs it. * View and Model render transforms moved to quaternion + position. * The lighting bounds function was making the radius too big, fixed!

Commit:a881de5
Author:Meisaka Yukara
Committer:Meisaka Yukara

RenderSystem refactor part 2, and some PR feedback This commit includes changes to the components.proto file, while reading how transforms were used and loaded, I felt that some good default values were required, and that most of the transform classes could be expressed differently. Most notibly is Orientation, where the value type is now "Quaternion", this also drops the angle notation, and instead allows 3 element quaternions. Position was not changed directly, but split conceptually into "local" and "world" positions, where local would be used for things like renderable or physics offsets, and world would be used for entities in the simulation "world", which in a space game might be expressed differently. i.e. double vs float, or local+sector vs local. for now the data types are left the same. These changes also make moving to proto3 more viable. Rendering of meshes got another big change, meshes are now loaded into multi-use vertex buffers, each *Renderable* should not own a VBO! VBOs are now managed by the render system in a more internalized way. RenderItem was redone to maintain the binding between a Renderable and it's per-instance materials, this will likely require some refinement. This is still VBO per mesh, which is not ideal, but leads into multiple MeshFile per VBO.

Commit:0737daf
Author:Meisaka Yukara
Committer:Meisaka Yukara

Vertex data refactor This reworks how vertex attributes and their data are handled. Vertex data can now be uploaded to the GPU in a few different formats, these formats have some support code to describe them in a more data-driven way. Having multiple formats allows providing only data that is actually required, instead of excess fields of zeros. Additionally, some formats pack the data more efficiently, which can save significantly on VRAM, and may improve performance in some cases. The shader load protocol was changed to proto3 style, this doesn't really change much, it's just practice or proof of concept.

Commit:9f7c7fe
Author:Meisaka Yukara
Committer:Meisaka Yukara

RenderSystem refactor, part 1 Adds proto file for shaders, this is used to load the shaders from a json file rather than baking all the file names into the main code. This will be used in a later commit to add graphics options that could be set at run or start time, such as quality levels or features. This also prompted me to touch up the CMake files a little. I know it says RenderSystem, but I also added some basic shutdown stuff to the SoundSystem while I was debugging something with sound. * The OBJ loader no longer requires mtllib and usemtl to function, these are optional according to the specs. * Generate the checker pattern vs loading an unwieldy file. * Moved color data in the VertexData, this will be redone * Inverse of screen size so the shaders don't have to divide so much. * GBuffer debugging via shader instead of broken blits. * Clean up of VertexBufferObject, ELEMENT_ARRAY_BUFFER is part of VAO state! Various changes for reverse depth depth buffer, this places the far field at 0, which in a floating point buffer means more precision over the entire range. This requires the clip_control extension, otherwise has no effect on quality. Stencil lighting was kind of borked, so it's been disabled for now, will see about a proper fix after a few other things get taken care of.

Commit:ac1276a
Author:Adam Martin
Committer:GitHub

Add user concept to server and move things around into lifecycle events (#212) * Add user concept to server and move things around into lifecycle events * Improve lifecycle flow * Make serveral methods const. * Restore position on load from save game. * Fixed simulation using index assignment on map causing false results. * Added clang format instructions to README as well as RTFD link. * Updated user to remove entity and instead store entity state * OnJoin the user's entity is now created and added to the world. * Added username input to connect window * On invalid login disconnect the client. Co-authored-by: Meisaka Yukara <Meisaka.Yukara@gmail.com>

Commit:8aa9948
Author:Meisaka Yukara
Committer:GitHub

Rework of network API and Server Lua events (#203) * Refactoring server networking and lua bindings - Lua print now supports multiple arguments - finishes adding LuaSystem call functions - Lua called for connect/disconnect events - adds TCP no_delay - ServerMessage header binary serialization - ServerMessage body length reduced for debugging - Endpoint tracking - Cleanup/Fix server protopack loading - Refactor server logging * Clean up messaging, start on async client * Async client and messaging experiment * Convert to new messaging system * client more Async (wip) * message API cleaned up a bit * added a test suite * client-server-connection expanded and renamed to run after other tests * fixes and tests multipart message decoding * Some cleanup after merge * Some changes based on feedback and review

Commit:81f1888
Author:Adam Martin
Committer:GitHub

Begin work on save system (#199) * Begin work on save system Fixed issue where in tests FilePath::PATH_SEPARATOR was not being set correctly. * Applying PR feedback Change underlying data type to list to preserve pointers when doing add/remove/update.

Commit:8d55d9a
Author:Adam Martin
Committer:GitHub

Add a basic chat command event and pass the command/args to lua handler (#201) Updated assets to have example event handler

Commit:b3f780c
Author:Meisaka Yukara
Committer:GitHub

Make the VM keyboard send the correct codes (#193)

Commit:e33a4c0
Author:Meisaka Yukara
Committer:GitHub

FPS mouse input, UI fixes, and Movement Netcode updates (#188) * comments!, movement smoothing, FPS input, some net sync fixes, UI fixes and additions Adds headers to CMake generated projects so they show up in IDEs changes game-state-queue into separate client and server implementation Adds tracking for netsync info and puts it on the UI Spelling and Code style adjustments throughout "Fixes" two race conditions Adds cursor capture (mouse lock), and turns the mouse look into a toggle that uses it Changes motion handling to be a bit smoother. Motion is still missing proper restitution/extrapolation Adds timestamps to state updates, this might be useful later Fixes dragging things on the UI, it actually works now Terminals no longer steal focus when mouse look is toggled Adds (possibly helpful) comments * A better fix for input and mouse capture * Further adjustments and fixes to prediction * named constants and some clean up

Commit:7602c11
Author:Adam Martin
Committer:GitHub

Add DCPU back to available CPUs (#171) Add DCPU back to available CPUs Updated assets commit id

Commit:38c441e
Author:Adam Martin
Committer:Miles Rout

Added game class to encapsulate the game related code Working to remove test-data.cpp Removed offsets from transform component as they are a render model space concern Renderable now has it's own transform offset components to handle model space transforms. Finishing up some to dos Moved computer devices to proto file Some more todos

Commit:3aa9eb0
Author:Adam Martin
Committer:GitHub

Improve build (#131) Formatting and language correctness Began client prediction modeling Minor optimization and removal of a potential race condition Added command id to all commands to check results from server against prediction on client Compiles and removes a submodule (spdlog) Also killed hundreds of warnings. Bump cmake version Disabled artifact packaging and deploying for the time being.

Commit:5481c06
Author:Adam Martin
Committer:GitHub

Bring upstream current with various changes (#117) * Simplified context creation in OS * Reduced SoundSystem CPU usage Fixed selene commit. Tweaked appveyor to use Visual Studio 2017 and new vcpkg build step. * Formatting and better naming Renamed CommandList to EventList and removed EntityUpdated event. * Added server-side client command handling * vcpkg builds protobuf as DLLs therefore we need 1 MSVC specific flag * Changed how appveyor caches vcpkg to just cache a zip of the built libraries * Revert appveyor cache changes * Cleaned up test-data.cpp and added components to server-side clients When connecting to a server it now sends a message with entity components that represent other clients. RenderSystem and PhysicsSystem now use EntityCreated events to create their components. Updated assets commit * Client now sends orientation to the server Reduced input lag but off-syncing update rates between server and client. This solution is only temporary as it has jitters, but it will allow moving forward in development. * Changed packaging for appveyor to package up DLLs and assets * Fixing packaging and adding deployment to appveyor * Fixed github release access token and tied vcpkg caching to vcpkg_cache.txt changes * Fixed typo in appveyor.yml * Enabled gravity and adjusted player mass and velocity Fixed lookup for player position/orientation during ray casting for mouse picking. Added default scale of 1 for entity model matrix. Server now handles creating and destroying of non-client entities. * Server main.cpp loads 1000.json as a hacked in floor Updated assets so client doesn't load 1000.json * Fixed OBJ loader not loading UVs correctly Fixed a possible race condition crash in PhysicsSystem. * Separated event processing from interpolation in GameStateQueue::Interpolate The server doesn't do interpolation therefore it just needs to process events. Updated assets. * That shouldn't have made it in reverted * Test new appveyor vcpkg support * Cleaned up appveyor.yml

Commit:2c88980
Author:Adam Martin
Committer:Miles Rout

New build system The idea is to move include/ and src/ to common, to line it up with the client/ and server/ directories, and then create CMakeLists.txt files in each of those directories. The current build system is monolithic and assumes one CMakeLists.txt in the toplevel directory. Each directory produces one executable or library. We will now use the visual c++ package manager https://github.com/microsoft/vcpkg . Then its a simple ".\vcpkg install glm glew glfw3 openal-soft asio " etc. Removed selene

Commit:41dd4a8
Author:Adam Martin
Committer:Adam Martin

Simulation interpolation now works more smoothly and works on a queue of server states Added GameState protobuf. Entity state can now be set in the simulation via the command method SetEntityState. Entity state updates are now sent to the server and GameStateUpdate messages are sent to all clients at a fixed rate.

Commit:4bc8aff
Author:Adam Martin

Merge branch 'feature/networking' into develop Updated assets.

Commit:24fabca
Author:Adam Martin
Committer:Adam Martin

Added VComputerSystem component saving and loading to proto Some minor formatting as well including reducing test_data.cpp. Also a bad design decision has VComputerSystem updating a texture. This needs to happen in the main thread due to GL context, so, for this commit, VComputerSystem is updated during the main loop and not in Simulation. Updated assets

Commit:b1aea57
Author:Luis Panadero Guardeño
Committer:Luis Panadero Guardeño

Override of lua print and loading an script - Fix some stuff broke on merge - WIP - Using own fork of Selene - print only accepts a single parameter.

Commit:02f61e9
Author:Luis Panadero Guardeño
Committer:Luis Panadero Guardeño

Merge branch 'develop' of github.com:trillek-team/tec into feature/lua Conflicts: README.md include/types.hpp proto/components.pb.cc proto/components.pb.h proto/components.proto

Commit:8f15d1f
Author:Luis Panadero Guardeño

Refactor of types.hpp We use proto::Component enum values as TypeID value. This make more easy to follow the track to all, and make more simple to register new component types. The price is that .protfile component name must be the same that the struct/class name. Also, we now have a runtime map of type ID to const char* . This is necesarry to map stuff to Lua.

Commit:45f8aef
Author:Luis Panadero Guardeño
Committer:Luis Panadero Guardeño

Stub of Lua system-component-resource - Lua script component loading - Entity tree now displays the component type name correctly - LuaSystem should run the 'onUpdate' function on LuaScript TODO: - Write and submit a path to Selene to implement a LoadString and use it to load the script to the lua state. - See where a onIinit and onDestroy should be called - See how bind Entity(entity_id) as "this" object on Lua - Bind a "print" function that calls log-info() - Implement a way to clean lua state when the script file is changed

Commit:2040ee9
Author:Adam Martin

Entities are each saved to their own file Updated assets.

Commit:4db5c40
Author:Adam Martin
Committer:Adam Martin

Added the ability to set an offset for position and rotation These can be used for center of mass or graphical offsets. Removed scale from view calculations as it isn't meaningful there. Physics now uses a copy constructor when updating position and orientation to ensure offsets are copied forward without having to pollute physics with knowledge of the offsets. Updated assets.

Commit:08d9979
Author:Adam Martin

Added directional lights Updated assets.

Commit:0c72906
Author:Adam Martin
Committer:Adam Martin

Deferred lighting initial implementation of GBuffer and PointLight Added RGB reflection editing. Increased default screen size to 1024,768. Added shaders to test_data.cpp for deferred lighting. Updated assets to deferred branch (changed to using my fork of assets for travis-ci builds).

Commit:0ac5ca9
Author:Adam Martin

AudioSource component nows has a volume property Updated assets

Commit:b46e499
Author:Adam Martin

Fleshed out component saving/loading for AudioSource Cleaned up test_data.cpp with a few template functions. Ogg files can now be dropped onto the client for loading. Various fixes such as size checks and map key checks.

Commit:ccf4edf
Author:Adam Martin

Added velocity component

Commit:9e02cf7
Author:Adam Martin

Added CollisionBody component to proto Updated assets accordingly.

Commit:5bc2410
Author:Adam Martin

Added View and Scale components to the proto file Updated assets accordingly.

Commit:6601672
Author:Adam Martin
Committer:Adam Martin

Position and Orientation now load/save to a protobuf message Updated assets to use new proto save file.