Commit Graph

455 Commits (master)

Author SHA1 Message Date
Nicole Collings d56d6f890a Update to sol3, vec3 customization, C++ 17 now required. 2020-07-23 18:54:11 -07:00
Nicole Collings c7c2e38c38 Clean up vector library, standardize parameter orders, conform to docs. 2020-07-22 00:46:06 -07:00
Nicole Collings c00ee72529 Fix a few bugs from the previous commit. 2020-07-21 19:57:21 -07:00
Nicole Collings a5e57716ee Rewrite inventory networking, player networking, tools.
+ Made wield and hand lists.
+ Made tool props & block defenses.
+ Crazyblocks mod to test various API features.
2020-07-21 19:33:26 -07:00
Nicole Collings ecaf1fb90c Some minor updates and consistency to Stream classes. 2020-07-19 15:06:12 -07:00
Nicole Collings 680469da44 Small Timer update. 2020-07-16 19:51:06 -07:00
Nicole Collings b3c52031c4 Optimizations, Asynchronous MapGen packets. 2020-07-16 19:38:25 -07:00
Nicole Collings c1752efc1d SPEED (Mapgen Remake Complete) 2020-07-16 12:10:40 -07:00
Nicole Collings 868cfe6339 Inline NoiseSample get, re-implement structures (no partials yet) 2020-07-16 10:51:24 -07:00
Nicole Collings 2ecbe11ecc MapGen rewrite pt. 2 - removed DensityBehavior code & default to true 2020-07-15 23:28:20 -07:00
Nicole Collings 3c560c8ca2 MapGen rewrite pt. 1 - has DensityBehavior code. 2020-07-15 23:25:39 -07:00
Nicole Collings 4b3a3b36bc Move src/util/net to src/net, src/server to src/net/server. 2020-07-06 20:00:00 -07:00
Nicole Collings 4ac862956f Fix an issue 2020-07-06 19:09:05 -07:00
Nicole Collings f15e10677b Fix some throws to use runtime_error 2020-07-06 18:35:29 -07:00
Nicole Collings 4ed852255d Optimize *all* of the imports across *every single file*.. damn. 2020-07-06 18:34:59 -07:00
Nicole Collings 2380c7ea31 Add a mutex to Chunk, safeguard all existing reads/writes.
* Clean up more imports.
* Create FileManipulator class.
2020-07-06 14:00:46 -07:00
Nicole Collings ad169fbb1e Optimize more imports 2020-06-24 17:11:15 -07:00
Nicole Collings 72d0b8d697 Optimize several imports 2020-06-24 16:35:01 -07:00
Nicole Collings eaa9aecb8f Tweaks to naming 2020-06-23 20:27:18 -07:00
Nicole Collings 48c7a38763 Optimize Chunk packets severely. 2020-06-22 21:40:55 -07:00
Nicole Collings d268654259 Optimize Chunk serialization format slightly. 2020-06-22 18:27:27 -07:00
Nicole Collings b272721fed Reimplement Biomes 2020-06-21 18:01:35 -07:00
Nicole Collings 7cdd9bc270 Clean up BlockChunk 2020-06-21 12:52:13 -07:00
Nicole Collings e60f197c7e Clean up Chunk 2020-06-21 12:50:43 -07:00
Nicole Collings 5063288b30 Fix a noexcept issue 2020-06-20 23:43:57 -07:00
Nicole Collings ab09cde351 Fix some Codacy issues 2020-06-20 23:41:02 -07:00
Nicole Collings d38b81705f Added Vector functionality, remove venus parser, add new blocks.
- Add colored lights to default for testing
- Add vector divide function
- Remove Venus Parser
2020-06-20 23:36:13 -07:00
Nicole Collings 41bb678eec Globally cascading sunlight x3 2020-06-16 22:36:12 -07:00
Nicole Collings 9dfa361833 Fix blocklight propogation issue non-issue 2020-06-16 15:53:37 -07:00
Nicole Collings f5b29e0219 Rename some shaders. 2020-06-05 18:34:53 -07:00
Nicole Collings e51de627a2 Not working geometry shader. 2020-06-05 16:47:43 -07:00
Nicole Collings aa624464e0 Attempting to propogate light downwards 2020-05-28 16:53:23 -07:00
Nicole Collings 0bfe269308 Split lighting functionality and block functionality 2020-05-26 17:16:56 -07:00
Nicole Collings f8da40b229 WIP sunlight handling. 2020-05-26 16:54:26 -07:00
Nicole Collings 571453843e Add sunlight generation - wip implementation, does not pass MapBlocks.
* Added light_propagates block definition parameter.
* Improved BlockLight propagation and rendering.
* Change index order to improve caching.
2020-05-22 13:21:08 -07:00
Nicole Collings b50732ec5e Many improvements with lighting, gfx, and stability
- Add curvature shader effect to blocks (not entities yetTM)
- Make fromStr with an empty string return Air instead of Invalid
- Make the player start with an empty hand instead of with stone
- Update chunks on lighting changes!
- Fix dirty chunk rendering!
- Fix segfault when getting non-existent inventory list.
2020-05-13 20:43:31 -07:00
Nicole Collings 49b45d1b9e COLORED LIGHTING~ 2020-05-12 17:16:11 -07:00
Nicole Collings 4d49aee57c Hot wheel implementation, scroll wheel keys, better error handling 2020-05-10 17:53:37 -07:00
Nicole Collings 83dc74004e Refactor LuaKeybindHandler, Error catching on keybinds and callbacks.
* Hotwheel implementation pt 1
2020-05-07 17:21:56 -07:00
Nicole Collings 6add7becb4 Begin Hotwheel, InventoryLists can specify the amt of slots they display 2020-04-22 17:48:34 -07:00
Nicole Collings 83287cebf1 Add multiple GuiInventoryList callbacks, fix crash on resize. 2020-04-17 17:48:24 -07:00
Nicole Collings 0359ada6b3 Fix race conditions in *Streams, fix deserializer SegFault. 2020-04-17 17:19:01 -07:00
Nicole Collings b9b3db77fd Fix client-side segfault with uninitialized values. 2020-04-16 22:59:30 -07:00
Nicole Collings af78490c7e UI Elements with Live manipulation & garbage collection 🦀 2020-04-15 13:09:13 -07:00
Nicole Collings fdd5ae307f Do something, not working 2020-04-14 20:35:19 -07:00
Nicole Collings 49d9ad73ae Remove SerialGuiElement, use LuaGuiElement in GuiBuilder 2020-04-13 18:10:39 -07:00
Nicole Collings afa1b5621d LocalGuiElement 2020-04-13 16:33:15 -07:00
Nicole Collings d80fdccde4 Create a Metatable for UI elements. 2020-04-11 16:15:41 -07:00
Nicole Collings f0aee0d952 Fix the assertions in the AnimationState, optimize code. 2020-04-06 19:17:16 -07:00
Nicole Collings a59e1d2a82 Various shit. 2020-04-06 17:18:57 -07:00
Nicole Collings 4febca7ef8 Lua Defined structures - WIP, New UI Library, move Base from mods~
Refactor GUIBuilder and MenuSandbox
Added outlined textures
2020-03-25 18:27:05 -07:00
Nicole Collings 6579255b70 Fully functional Any type with SOO, thanks Hopson's server for helping! 2020-03-24 13:16:26 -07:00
Nicole Collings 9a46f2077d Improved Any type. 2020-03-24 12:00:23 -07:00
Nicole Collings 3ed1aad854 Any type. 2020-03-23 22:40:19 -07:00
Nicole Collings 2baf847828 Create PacketView, a more efficient packet handler.
* Include higher level functions in the vector library.
* Optimize more includes.
* Add outlined textures to repo and switch the graphics.
2020-03-15 14:26:39 -07:00
Nicole Collings 0a41147846 Amazing new vector library, safeties on arbitrary fn calls.
* Vectors have a full set of mathematic operations now.
* Vectors are indexed using 1, 2, 3 instead of xyz.
* Now using a Capital V for shorthand constructor.
* More safety on vector operators.
2020-03-06 18:07:22 -08:00
Nicole Collings 7886dc8097 Clean up NoiseSample class & MapGen, allow heightmap and volume noise. 2020-03-05 15:31:32 -08:00
Nicole Collings af9c38abf3 * Add double-press space fly toggle
* Clean GuiComponent interactions
2020-03-04 19:20:44 -08:00
Nicole Collings 24991f4590 Add ability to parent entity rotations, WIP. 2020-03-03 21:45:22 -08:00
Nicole Collings 8bd2e404cd Server-side inventory functionality! **yay** 2020-03-01 14:33:47 -08:00
Nicole Collings 26e770b1bd Refactor and clean GuiComponent 2020-03-01 12:57:53 -08:00
Nicole Collings 5cd56de9d0 Parent implemetation for Server/Local InventoryList shared methods 2020-02-28 19:12:37 -08:00
Nicole Collings 7c0e1cefd7 Client can no longer interact with unloaded inventory lists
* Rename InventoryList to ServerInventoryList
2020-02-28 18:44:01 -08:00
Jordan Snelling 37f20b9978 Fix windows build
Signed-off-by: Nicole Collings <100Toby1@gmail.com>
2020-02-28 18:19:46 -08:00
Nicole Collings c1dc594d54 SSEs will get deleted when deleted on the server, ortho model shading.
* register_on supports place & break, not after_* yet
* fixed a potential segfault loading an invalid mod
* added @aurailus:item_collection, converted `drop` params to `yields`
2020-02-28 13:03:19 -08:00
Nicole Collings 3093d53ea2 Server-side inventories can be sent to the client for viewing. 2020-02-27 17:23:42 -08:00
Nicole Collings 6b4c866ba7 Fix Codacy issues 2020-02-26 13:42:15 -08:00
Nicole Collings 228e0e4d30 Create server side inventories, callbacks, seperate class & userdatas
* Create LocalInventoryRefs - unfinished
* Create WATCH_INV and UNWATCH_INV packet types
* Add player_join, player_connect, and player_disconnect callbacks
* Begin networked inventory support
2020-02-25 15:14:07 -08:00
Nicole Collings cc7163d61b Add clamping support to the ortho shader
* Biome tint leaves, tweak fluff texture to be less dense
2020-02-21 00:07:13 -08:00
Nicole Collings 96e03db1d6 Optimize player update sending 2020-02-20 22:44:16 -08:00
Nicole Collings 391a90d399 Standarize Gui casing 2020-02-20 16:58:36 -08:00
Nicole Collings 707ccb6a51 Refactor GUI Library 2020-02-20 16:31:37 -08:00
Nicole Collings 1f3acbcce6 RIE Keeps vector slack within sane ranges 2020-02-20 11:29:12 -08:00
Nicole Collings a73f5d3030 Made LocalDimension delete distant chunks. Still a mem leak somewhere.
* Cleaned up some imports
* Reorganized some files
2020-02-20 11:23:12 -08:00
Nicole Collings 9c48fb694d Create ClientModHandler, rename Local/ServerDefs to Client/ServerGame 2020-02-19 15:55:48 -08:00
Nicole Collings 3c128c95d6 Add (dis)connect events, add ServerLuaPlayer, create ServerModHandler
* Remove drop callbacks from all blocks
* Create chest inventory background
2020-02-19 15:20:59 -08:00
Nicole Collings 2097d3a954 Remove ServerPlayer, clean up ServerClient 2020-02-17 15:55:39 -08:00
Nicole Collings f27a40abeb Updated CMakeLists 2020-02-17 13:04:19 -08:00
Nicole Collings 7c87b002d2 Generify RIE parsing, implement setBiome 2020-02-14 14:39:39 -08:00
Nicole Collings ee94e691ae BlockChunks now use Run Index Encoding, 80% reduction in mem usage. 2020-02-14 13:04:07 -08:00
Nicole Collings c209b2a372 Fix Low definition Blend Masking, Server deletes far MapBlocks.
* remove* commands in Dimension
* Remove grid from inventory - for testing
2020-02-13 11:36:18 -08:00
Nicole Collings dad2f216fa Implement blend masking, fix block_foliage model hack. 2020-02-12 16:16:10 -08:00
Nicole Collings 32f4a9414c Fix some model errors, add texture atlas debug info. 2020-02-12 14:44:15 -08:00
Nicole Collings 797d9f19a6 Remove hiccups 2020-02-12 14:16:27 -08:00
Nicole Collings f7ea3e6b59 Allow low-def models to be biome tinted 2020-02-12 14:15:27 -08:00
Nicole Collings aee43750f4 Fix a couple mapgen bugs from last commit 2020-02-11 23:19:37 -08:00
Nicole Collings 119b6dfa55 Improve model support, QUINTUPLE map generation speeds. 2020-02-11 19:48:35 -08:00
Nicole Collings 7ba58799e9 Uproot GuiVertex, GuiMesh, GuiEntity, use generic entities.
* Add update method to GUIComponent
* Cursory 'model' GUIType support.
* Fix zeus:default/entity/bee.venus
2020-02-11 16:54:20 -08:00
Nicole Collings a1b68b0501 Add ErrorFormatter, make VenusParser and ServerLuaParser use it.
* Better error formatting with ErrorFormatter.
* Cleaned up VenusParser, made it use std::runtime_errors
* Server logs mods that have been loaded.
* Make NetHandler force exit if it fails to initialize a server.
2020-02-11 14:27:48 -08:00
Nicole Collings d7aea41234 Add VenusParser class, zepha-venus submodule. 2020-02-10 11:20:42 -08:00
Nicole Collings 17380d83fa Change most of the Lua files into Venus files. 2020-02-09 22:58:10 -08:00
Nicole Collings 2338d5b96c Fix GUI model rendering
* Un-hardcode inventory lists
* Begin implementation of the hotwheel
2020-02-06 22:31:08 -08:00
Nicole Collings 0b60d433e6 Implement Schematic struct, fix MeshChunks disappearing. 2020-02-03 15:30:55 -08:00
Nicole Collings b7641e466c Fix orientation of textures on block models 2020-02-03 12:08:25 -08:00
Nicole Collings 3bbae8a371 TODOFix: clean up some todos 2020-02-02 13:13:10 -08:00
Nicole Collings 99d26ed71f TODOFix: Un-hardcode the flying keybind 2020-02-01 16:09:50 -08:00
Nicole Collings 06bbb0ca5f Remove the tumours left by g++ uints and ushorts, as well as Pointer.h 2020-02-01 15:47:18 -08:00
Nicole Collings fb0fd13d4a Chunk Partials, functional tree generation, happy happy happy 2020-01-30 23:53:47 -08:00
Nicole Collings dbcfe5c822 Tweaked the MapGen class to begin adding half-generated chunks.WIP Trees
* Added turbulence to biome noises, and made their sampling 2D.
* Added bees and ravens to test animation library.
* Added TNT to test large scale world destruction (some work needs to be done).
2020-01-30 20:54:18 -08:00
Nicole Collings 8065520c71 Reimplement local server and add a temporary function to start it from the main menu 2020-01-14 16:46:34 -08:00
Nicole Collings 83f6c78056 Change world to 3d noise, Lua animation control. Rabbit entity w/ ai 2020-01-14 16:04:22 -08:00
Nicole Collings acd99ce0c6 Add XYZ axis rotation to entities, fix dropped item rotation 2020-01-12 23:22:23 -08:00
Nicole Collings b8b8957c25 Add most of the libnoise modules to the Lua Api 2020-01-11 13:57:39 -08:00
Nicole Collings 947aa6dda5 Lua libnoise parser, biomes have seperate generation parameters~
* Delete deprecated MapGen stuff
! Entire chunk's biome-gen is defined by bottom left corner.
2020-01-10 17:31:07 -08:00
Nicole Collings 7c54de84fa Clean up the Register* functions, make them all one header file
* Reorganize src/lua
* Add `environment` table to Biome Definitions
2020-01-10 14:58:46 -08:00
Nicole Collings 732a166dab Change naming scheme from interp_pos & set_pos to set_pos & snap_pos 2020-01-09 21:04:31 -08:00
Nicole Collings c0894d46c6 Change naming scheme from interp_pos & set_pos to set_pos & snap_pos 2020-01-09 15:42:04 -08:00
Nicole Collings 5d59e013d2 Synchronized Server side entities! Many integer vectors changed to ivecs 2020-01-08 14:42:14 -08:00
Nicole Collings 72dbfd9cbf Send mods order with a vector 2020-01-07 17:03:41 -08:00
Nicole Collings 57770cb34f Finish Deserializer, remove old serializer, fix numerous std bugs 2020-01-07 16:49:39 -08:00
Nicole Collings 7e06774c21 New Serializer & Deserializer class. All functions use new Serializer 2020-01-07 14:57:44 -08:00
Nicole Collings f82052b5fc Add Local handler for ServerEntities (unfinished) 2020-01-06 19:48:51 -08:00
Nicole Collings ce07aa24b9 Transfer dirty lua entities to client -- no client handling at this time 2020-01-06 00:02:32 -08:00
Nicole Collings 12bfa015fe Add exceptions to server api methods 2019-12-28 22:42:46 -08:00
Nicole Collings 87eaf4058b Lua Entities can be registered on server side, don't transfer yet. 2019-12-28 20:40:29 -08:00
Nicole Collings 4a497ea38d placeStack & splitStack are now secured against enemy invaders
* allow_take, allow_put, on_take, and on_put lua callbacks work.
2019-12-21 21:54:06 -08:00
Nicole Collings fcb46c18e6 Max Stack Size def property
* Index inventories in Lua by 1
2019-12-19 22:55:34 -08:00
Nicole Collings bce33e9bc5 Inventory can have blocks in it! GuiShader supports 3d models.
* Increased contrast in plant_twine.png & plant_fibre.png
2019-12-18 17:12:34 -08:00
Nicole Collings 6830c4adc4 Lua Inventory API
* Split inventory mod into zeus:inventory
* Redo inventory textures
* Add more textures and items to zeus:materials
* Convert zepha.is_server() to zepha.server & zepha.client bools
2019-12-17 17:26:48 -08:00
Nicole Collings 5cf3569629 Inventory stacking, splitting, and placing 2019-12-15 16:51:41 -08:00
Nicole Collings 8167bc4c85 Inventory manipulation 2019-12-15 15:32:35 -08:00
Nicole Collings 3273dcd31b Attempt to get click callbacks on GameGui, not working. 2019-12-13 02:27:52 -08:00
Nicole Collings 270f160164 Refactor Window, Renderer, shaders to clean up code. 2019-12-13 01:59:42 -08:00
Nicole Collings 532a0c3255 Add safeties to subgame indexing & menu mod loading.
* TextureAtlas loadDirectory function can be recursive.
* Re-implement GameGui showMenu.
2019-12-13 00:54:17 -08:00
Nicole Collings e4cc4b788e Fix SIGSEGV 2019-12-12 18:46:57 -08:00
Nicole Collings 3824b06061 Lua button callbacks, menu start_game API 2019-12-12 16:42:46 -08:00
Nicole Collings 8f035fe51d Optimize GuiBuilder slightly. 2019-12-12 14:39:51 -08:00
Nicole Collings aee457fd9b Main menu sandbox & lua defined GUI 2019-12-12 02:13:28 -08:00
Nicole Collings 3aaf649c42 Refactor bottom bar, dynamically search for subgames. 2019-12-11 21:38:20 -08:00
Nicole Collings 407d35c210 GUIImageButton class 2019-12-11 14:20:40 -08:00
Nicole Collings bac6403425 `crop` texture modifier, UI flag hover textures. 2019-12-11 00:41:46 -08:00
Nicole Collings ebff66f1a7 Replace getTextureRef with operator[],delete Def member access functions 2019-12-10 23:12:29 -08:00
Nicole Collings 0143979e12 Obligatory ascii art introduction 2019-12-10 15:44:58 -08:00
Nicole Collings b4b32520e0 Make server launch with subgame argument, move mods to subgames/zeus 2019-12-10 15:14:59 -08:00
Nicole Collings 4065fbf8de Title Screen, GUIComponent insert, click events, hover state wip
* Added getMousePos to Window (should be in InputManager but w/e)
2019-12-10 14:39:45 -08:00
Nicole Collings 647a83b1ce Merge remote-tracking branch 'origin/master' 2019-12-09 21:19:09 -08:00
Nicole Collings 851de85e70 Block collision boxes, Add Step-up functionality to Collidable
* Tweak player speed.
* Make Invalid display.
* Fix some mod bugs.
2019-12-09 21:19:02 -08:00
Jordan Snelling ea2f2ac068 Fix windows build, prevent glm/ext.hpp from
compiling bad min_max extensions
2019-11-24 01:05:50 +00:00
Nicole Collings 21b91a7249 I didn't use pointers for copying 128 1000+ char strings / frame. HELP
* Fixed like 90% of the generation lag in like 10 lines of code.
2019-11-23 13:42:46 -08:00
Nicole Collings 8c3cf3ed40 Map Block Integrity 2019-11-23 02:06:37 -08:00
Nicole Collings 07bf603516 Merge remote-tracking branch 'origin/master' 2019-11-22 01:29:21 -08:00
Nicole Collings 19d6c24541 Fixed server bugs, removed unnecessary TODOs.
- Fixed Server generating excessive MapBlocks.
- Fixed Server not generating when moving.
2019-11-22 01:29:09 -08:00
Nicole Collings ac56c16c0f Rewrite Dimension to use Regions & MapBlocks again 2019-11-22 01:00:29 -08:00
Nicole Collings 49da2ad701 Organized and Optimized TransPos, renamed to Space
- Clean up VecUtils
2019-11-22 00:59:55 -08:00
Nicole Collings 54bfd5f5b4 MapGen generates by the MapBlock. More efficient MapGen algorithm.
* Create parent to Local & Server Dimension to abstract code.
* Improve NoiseSample class.
! Known bug where map doesn't generate when you move.
! Known bug where map will regenerate even if the chunks already exist.
2019-11-20 15:52:29 -08:00
Nicole Collings fa9616b8ac Improve NoiseSample efficiency, fix Serializer::encodeUShortVec 2019-11-20 13:31:35 -08:00
Jordan Snelling 328bf4f2c8 Fix windows build 2019-11-19 21:41:14 +00:00
Nicole Collings a21521cc2d Fix missing biomes 2019-11-19 13:14:28 -08:00
Nicole Collings af8fb9c5a3 Biome tinting, client side biome data 2019-11-18 23:03:51 -08:00
Nicole Collings 2b753121d7 Voronoi disagram - based biomes. 2019-11-13 20:42:25 -08:00