Commit Graph

640 Commits (master)

Author SHA1 Message Date
aurailus 4e3f48b867 - Moved camera constructor to create method
- Removed yaw and pitch properties from camera create method
- Removed movement code from camera
- Added setYaw and setPitch to camera class
- Created Player class which holds camera class
- Player position and yaw/pitch are synced with camera
- Movement code moved to player class
- Added collision in player class
- Added gravity and friction to player
- Created Ray class
- Used Ray class to get what block player is looking at
- Show currently looked at block in DebugGui
- Changed DebugGUI class to be more concise and show more information
- Added a crosshair to the game, temporarily in GameInstance class
2018-12-30 19:18:42 -08:00
aurailus 9922d498e0 Fixed error caused by Refactor 2018-12-28 18:56:54 -08:00
aurailus b0ee113811 Updated the FPS Histogram and reorganize some files. 2018-12-28 18:51:47 -08:00
aurailus 9c3aac4789 Moved debug text to DebugGui object, added FPS histogram.
Entities now have Texture field, currently only respected for GuiEntities.
2018-12-28 15:58:05 -08:00
aurailus 6406a0350f World methods to get player position and blocks at global pos.
- TextBuilder supports newlines
2018-12-26 23:59:00 -08:00
aurailus 68edae3fcb Added GUI shaders to the repository. 2018-12-26 00:10:59 -08:00
aurailus ffdcf3d828 Created a visual text mesh generator.
Created TextBuilder class
Created HudText class, extends Entity
Added HudText objects to GameInstance to show FPS
Removed some debug text from misc classes
2018-12-25 23:20:15 -08:00
aurailus d55f8a78f5 Abstracted the Shader class to allow for different types of shaders.
Added a GUIEntity class (Currently empty) and modified GameInstance
to begin to allow rendering GUIEntities to the screen.
2018-12-22 00:38:57 -08:00
aurailus ef079a2c55 Added a cap to how many finished tasks can be completed based on time. 2018-12-21 13:16:21 -08:00
aurailus caeda8c680 Converted both of the BiThreadQueue implementations to BiThreadPools in world. 2018-12-20 23:41:57 -08:00
aurailus 6da513a52c Dont generate meshes for empty BlockChunks, and don't push empty meshes. 2018-12-20 18:03:54 -08:00
aurailus 5f6c663003 Converted World's use of glm::vec3* to glm::vec3 to allow proper checks. 2018-12-19 21:15:05 -08:00
aurailus a62cadb408 Removed the GameInstance::genChunks & Added World::genChunk 2018-12-19 00:53:07 -08:00
aurailus 9812d6adcf LuaParser rewrite and zeus.register_block Lua API.
- Using SOL2 instead of LuaC
- Updated file.lua to include some block definitions.
2018-12-18 17:32:55 -08:00
aurailus 67b3a5086e LuaParser class which loads a Lua File.
LuaApiInterface header that is overrided by Lua api functions
l_Average class to test LuaApiInterface
2018-12-17 20:05:00 -08:00
aurailus e57718f257 GameInstance object, Renderer object, cleaned up Main. 2018-12-17 14:24:58 -08:00
aurailus 5a366093cd Clean up file structure, standardize naming conventions, remove cute. 2018-12-17 13:11:00 -08:00
aurailus 5221797d0a BlockDef Class and BlockModel::Square convenience function
- Made BlockDef class
- Made BlockAtlas reference BlockDefs
- Made static BlockModel::Square method for creating cube BlockMeshes.
- Played with some lua interpretation, commented out.
2018-12-17 13:04:25 -08:00
aurailus c96e612a9f MultiThread chunk mesh generation.
Removed BlockChunk property from MeshChunk
MeshChunk::build() now takes vectors for the indices and vertices instead of doing it itself
World class now MultiThreads generation of MeshChunks using the BiQueueThreadPool spec developed by Aurailus (not conforming)
World::ThreadData object for simplifying communication between threads
2018-12-16 21:42:21 -08:00
aurailus 9605fb14f8 Reimplement basic culling on MeshGenerator 2018-12-16 00:11:13 -08:00
aurailus 9f53d17fc0 Remove some comments and commit MeshChunk.cpp (accident) 2018-12-16 00:04:55 -08:00
aurailus 188f6ff20e First World Class Implementation
- Added PerlinNoise.(cpp/hpp) to repository.
- New BlockChunk class for storing block info
- New MeshChunk class, extends Entity and has a `build` method for building a mesh
- World Class that encapsulates some world logic
- ArrayTrans3D class for converting vectors to ints in chunks
- Rewrote some code in Main to use the World class
- MeshGenerator now uses a blockChunk and a blockAtlas
- MeshGenerator is not doing any culling in this commit
- Changed addFaces to use a glm::vec3
- BlockAtlas now has a `model` variable containing a BlockModel
- Changed the window title to be more descriptive
- Changed references of 'atlas' to 'textureAtlas'
2018-12-15 23:55:36 -08:00
aurailus d0c006d660 Simple Optimizations to the Mesh Generator
- Add basic visibility testing to the mesh generator.
- MeshGenerator::addFaces takes references instead of pointers.
- MeshGenerator: Increase the reserve count.
- Add MeshGenerator::outOfRange function.
- Added Boost as dependency.
- Tweaked window mouse capturing to allow window movement.
2018-12-14 16:12:04 -08:00
aurailus 15b4e241ee give the test BlockModel all 6 faces 2018-12-07 22:13:27 -08:00
aurailus 04edfb3601 Refactored Timer class and made Texture Atlas load missing texture. 2018-12-07 13:55:59 -08:00
aurailus 7ac460ee28 Add Zeus Textures to git. 2018-12-07 13:43:37 -08:00
aurailus 0698bb3dd6 - Created a Texture Atlas class
- Added a secondary load method to texture that accepts a byte[]
- Disable multisampling as it causes a problem with the atlas
- Added TODO to fix the multisampling problem later
2018-12-07 13:39:27 -08:00
aurailus ee20219bf1 - Update timers, add elapsedInMs to timer
- Added some textures
2018-12-06 00:09:25 -08:00
aurailus b3fb9e961f - Cleaned up code using CLion inspection. 2018-12-05 23:07:00 -08:00
aurailus ba4e8c6431 - Added vector constructor for Mesh
- Removed MeshData type and made MeshGenerator::build require pointers to vectors
- Removed addBlockModel, added addFaces, properly handle BlockModels in MeshGenerator
- Added cleanup method & deconstructor to MeshPart
2018-12-05 22:36:01 -08:00
aurailus a01bdedda3 - Fix MeshGenerator addBlockModel method to use normals.
- Fix double-remove segfault in Main.cpp because of BlockModel
2018-12-05 21:42:16 -08:00
aurailus 74b98e4b39 - Prevent invalid memory addressing in the MeshPart construct method. 2018-12-05 20:59:12 -08:00
aurailus aa837305ce - Vertex Class with Pos, Normal, and TexCoord attributes
- BlockModel class that contains vector of MeshParts
- MeshPart class that contains Vertices and Indices
- MeshVertexIter & MeshIndexIter classes for MeshPart
2018-12-05 20:10:16 -08:00
aurailus 629c44c775 Organization 2018-12-02 18:19:37 -08:00
aurailus 537a242a5c Generic add_face function in MeshGenerator 2018-12-01 23:07:36 -08:00
aurailus 10351c5269 Mesh Generator Class 2018-12-01 18:06:24 -08:00
aurailus ad936ba4fb Texture support, creative esque flying instead of cam-angle flying. 2018-11-30 14:42:43 -08:00
aurailus a5f05974c5 Camera Class with freecam mouse and WASD movement 2018-11-28 23:32:51 -08:00
aurailus 5f4751a27e Window Class, Shader Class, Read Shaders from file 2018-11-26 17:52:44 -08:00
aurailus 22224ee367 Mesh Class, Entity Class, Render loop that allows for multiple entities to be rendered at once. 2018-11-26 11:41:02 -08:00