Commit Graph

640 Commits (master)

Author SHA1 Message Date
aurailus 16ff339a2b Add flowers, Pad Texture Atlas, Move block break code to Player class 2019-04-02 20:58:20 -07:00
aurailus e50ad18663 Added fog to the shader, added keybinds to toggle UI
* F1 Toggles all UI
* F3 Toggles Debug Menu (Except FPS)
Added visible property to Entity class
Decrease Viginette intensity
2019-04-01 23:05:16 -07:00
aurailus 6fe900eb29 Rewrite Map Generation using LibNoise! 2019-04-01 23:03:36 -07:00
aurailus 7ba75bb805 Implement Local Generation Depth 2019-04-01 14:15:15 -07:00
aurailus 03acd95e7c Rewrite LocalWorld Class
* MeshGenStream class to Mesh Chunks
* WorldInterpolationStream class to client-side-gen chunks (wip)
* Clean up attemptMeshChunk, adjacentChunkExists, and getAdjacentsCull
* Remove handleMeshGenQueue and handleChunkGenQueue
* Rewrite LocalWorld Update method to use Streams
* Delete WorldThreadDefs
* Seperate chunk functions into ChunkVec class
* Seperate Vec3Compare function into Vec3Compare class
* VecUtils class to get cardinal directions
2019-03-30 00:48:02 -07:00
aurailus fc6ba195c3 Commit some Missing Files 2019-03-19 23:55:45 -07:00
aurailus 5d87863cb8 Replace Perlin noise with Simplex Noise, Optimize NoiseSampler class. 2019-03-19 23:53:24 -07:00
aurailus 4a195a96cb Server debug information, distance sorted generation, faster meshing. 2019-03-15 23:22:53 -07:00
aurailus e85451abfe Misc World Graphical Tweaks
* Brighten the world in the vertex shader a little bit
* Set the clear color to be brighter
* Cap the player's yaw value
* Add a viginette
2019-03-07 22:45:58 -08:00
aurailus b66ca8284b Server Side Chunk Generation
* Server World Class
* WorldGenStream class to handle multithreaded map generation
* ServerPlayer stores active chunk boundaries

* BlockChunk stores position
* Renamed client World to LocalWorld
* Disabled client side Generation
* ServerConnection stores chunk packets to be used by the GameScene,
  which gives them to the world (change later?)

* Reenabled "BlockChunk Packet Encoding" test in tests/BlockChunk.cpp
2019-03-07 17:43:05 -08:00
aurailus 3bba3adf66 Rename World to LocalWorld 2019-03-05 16:54:09 -08:00
aurailus ec1b4ee4ec Show VRAM usage on debug menu 2019-03-04 22:33:50 -08:00
aurailus 314e1ce33e Converted PacketType & PacketChannel const ints into enums. 2019-03-04 18:16:19 -08:00
aurailus 96ea94eee1 Updated DebugGUI to show culled chunks proportion.
* Added setMax function to histogram
2019-03-04 15:22:15 -08:00
aurailus 2c035ecc57 Frustum Culling
* Frustum class for Frustum Calculations
* FrustumAABB class for Axis Aligned Bounding Boxes
* FrustumPlane classes for defining the planes
* Cleaned up Ray class
* Converted Camera properties to variables
* Only render chunks if inside of Frustum
2019-03-03 23:43:53 -08:00
aurailus 67f8440647 Preparing for Frustum Culling
* Moved matrix related code to the camera
* Made GUI Elements and the Perspective / Ortho matrices resize on
  buffer (window) resizing.
2019-03-02 17:24:15 -08:00
aurailus 012bea39e9 New Map Generation
* Interpolation Class
* noise folder with NoiseParams, NoiseSampler, and NoiseSample classes
* MapGenJobs are in a seperate file
* Rewrite of MapGen class.
2019-03-01 17:16:02 -08:00
aurailus 7fb6bdc8ee BlockChunk no longer uses a pointer to it's data. 2019-02-13 17:39:39 -08:00
aurailus 98387e9571 New Map Generation class using 3D Perlin noise - First commit
* Changed World thread vars a bit to balance performance with output.
2019-02-13 17:23:53 -08:00
aurailus 7318a6b895 Improve Crosshair Texture and add a Draw Calls histogram to the GUI
* Allow histograms to have dynamic max values
* Change ArrayTrans3D to use a reference for indAssignVec
2019-02-13 17:23:08 -08:00
aurailus 08a231ad2e Refactor of the DebugGui
* Rewrite GUI shader to allow colored rectangles
* Histograms have overwrite mode to make it easier to read them
* White histogram textures
* Mesh Gen and Map Gen histograms
* More distinct and easy to read Debug Gui
2019-02-10 19:40:12 -08:00
aurailus 0574547f61 Add some tests 2019-02-10 00:29:15 -08:00
aurailus 3c14ca14da Support window resize, Histogram class.
* Resize buffers when the window resizes.
* Histogram class for displaying per-frame data.
* Histogram can either push data to the left when new data arrives
  (false) or Overwrite with a moving insertion point (true) based on the
  editInPlace variable.
2019-02-10 00:28:39 -08:00
aurailus df0e74b3e7 Client Positions are shown using crosshairs on all other clients!
* Server Regurgitates player location info to all clients
* PlayerEntity class for representing other Players on the server
* Temporary ServerEntity rendering code in GameScene
2019-02-08 15:35:59 -08:00
aurailus a0cd2c554b Overhaul Server & ServerConnection classes
* Handle packet events properly on both classes
* PacketType & PacketChannel class
* ServerPeer & ServerPlayer classes for storing info on the server
* ConnectionList class to organize ServerPlayers and ServerPeers
2019-02-08 00:25:45 -08:00
aurailus 0706a8b457 Seperate Serialization from Packet class into its own class.
Speed up serialization with cheaty of methods which will need to be
  reviewed when communicating to systems of different architectures.
2019-02-07 19:52:47 -08:00
aurailus 201d70f291 GameGui Class to encapsulate crosshair initialization code. 2019-02-05 22:58:10 -08:00
aurailus ec458cb16f Add Test Cases for NetHandler 2019-02-05 22:57:32 -08:00
aurailus 61c78d6b79 NetHandler class to abstract ENet C ugliness.
* Remove some old Boost:Asio based network code.
2019-02-04 23:22:31 -08:00
aurailus dd95f9017d Begin switching to ENet instead of ASIO
* Undo using GLOBs in Makefiles
2019-02-04 16:39:52 -08:00
aurailus d191f926ef Testing, cleaner makefiles
* Makefiles use GLOBs and Libraries to have better organization
* Zeus directory renamed to src
* New test directory for unit tests
* Using Catch2 for unit tests
* Added unit tests to BlockChunk serialization
2019-02-01 16:12:37 -08:00
aurailus c3c9e357f9 Fixed 2 long time invalidread errors found by Valgrind causing SIGSEGVs 2019-01-30 15:45:00 -08:00
aurailus a89efe9dcb New MapGen class for server-client map synchronization. 2019-01-29 16:41:59 -08:00
aurailus 3fc3d84bb4 Functionality to serialize a BlockChunk into a compressed string & back 2019-01-27 14:13:40 -08:00
aurailus 5de395f793 Commit ServerClient class 2019-01-23 00:28:14 -08:00
aurailus 0b038364e5 Created ConnMan object for server to make it easier to program.
* Updated ServerConnection Authentication call to supply name 'Aurailus'
* Packet::deserialize now returns a pointer
* Move most of the packet handling code from Server to ConnMan
2019-01-22 23:29:32 -08:00
aurailus 4346f45c1c Completely reorganize file structure, delete unused imports,
clean all imports, surpress useless CLion warnings, clean code
2019-01-22 17:08:06 -08:00
aurailus 5ebf737f20 Fix error in previous commit 2019-01-21 23:23:50 -08:00
aurailus 67a326b6b4 Crosschunk culling by delaying meshgen until adjacent blockChunks exist.
* Added a culls method to the BlockDef (faster than getting the model)
* Create ServerConnection class. Needs refactor
2019-01-21 23:05:50 -08:00
aurailus 99d3c93ece Added visible and culls properties, added TallGrass variants.
* Added visible and culls properties to node definitions in lua.
* Added solid property to node definitions in lua.
* Added 5 variants of tallgrass (which are not solid and do not cull).
* Made air non-solid.
* Made leaves not cull.
* Made world generation generate tallgrass.
2019-01-12 14:38:09 -08:00
aurailus d50cc1c072 More networking code implementation
Move connection code from Client.cpp to ServerConnection.cpp
GameScene connects to the server and sets player position based on it.
Server 'authenticates' client from (currently unused) token before giving it data.
Packets now support encoding floats and strings.
Server now acknowledges port argument.
ServerPlayer class for keeping track of client Player entities.
2019-01-11 23:16:10 -08:00
aurailus 0639c3b655 Add handlePacket function to server and commit ClientConnection class 2019-01-11 08:18:14 -08:00
aurailus c608e2336d UDP Networking first commit + Bugfixes & Cleanup
New stuff:
* Client will fork and exec a given path with the "server" argument if supplied.
* Packet class to help transfer data between client and server.
* New Server class which accepts handshake from client
* GameScene now attempts to connect to a server and ends if it fails.

Fixes:
* Changed deltaTime to double on Player class
* SceneManager defaults Scene to nullptr to fix seg fault.
* Moved some code to DebugGui and out of GameScene.
* World class stores per-frame updates for chunks and meshes.
* Scene emits warning if a derived class doesn't override all methods.
* GameScene overrides cleanup
* Created MenuScene to test having multiple scenes.
* Moved commented code out of Main
2019-01-10 23:33:36 -08:00
aurailus a681301ac6 Clean up some TODOs created by last commit.
* Moved renderer->update to the Client class
* Changed all references of delta in the player class to a double.
* Delete vertices from MeshPart when deleting the object.
2019-01-08 00:20:45 -08:00
aurailus 9378296c5d Scene Interface!
* SceneManager class allows swapping between scenes easily.
* Scene interface to provide methods for the SceneManager to interact with scenes.
* GameInstance turned into GameScene (derived from Scene)
2019-01-07 00:07:41 -08:00
aurailus a40c85905a Clean up code for portability and server initialization
* Practically move all non-commented code from main.cpp
* Create Client.cpp/h class and move logic out of main.cpp
* Create default constructor for Renderer
* Fix definition of default:stone
* Change GameInstance:update() to use a double instead of a GLfloat
2019-01-06 23:31:13 -08:00
aurailus edbe03d76c Create more blockmodels in the lua file.
Retexture grass and stone.
2019-01-02 19:12:15 -08:00
aurailus 27504c8449 Rewrite MeshPart to use vectors. Made l_register_block use LUA models. 2019-01-02 16:22:22 -08:00
aurailus eb096f1a7a Update Lua Api C++ code to make it more extendable.
Added register_blockmodel to the api, unfinished.
2019-01-02 01:34:32 -08:00
aurailus 2d9a00d0ef - Add mouseIsDown function to Window class
- Add setBlock method to world
- Add remeshChunk function to world for when a chunk is modified
- Made left click remove pointed block
2018-12-30 19:48:30 -08:00