85 Commits

Author SHA1 Message Date
372f173723 Introduced ChunkData and WorldDataListeners
- Added ChunkDataListener and WorldDataListener
- Moved chunk render update requests to clientside ChunkDataListeners
- Moved ChunkRender and ChunkLogic initialization into WDListeners
2020-11-20 23:54:32 +03:00
7f381c7a1f Updated block selection display and added block placing
- Packaged everything related to block selection into Selection class
- Selection box is a bit less obnoxious
- Added the ability to place Test:Stone blocks





- This is technically a Minecraft clone now. I don't know how to feel
about this tbh
2020-11-20 11:50:24 +03:00
a7eb90865f Merge branch 'crashreports' 2020-11-19 19:11:30 +03:00
afa1234ddd Fixed English in messages 2020-11-19 18:59:41 +03:00
996a244649 Added uncaught exception handler 2020-11-19 18:27:44 +03:00
c5ae4e5ab9 Fixed falling through blocks 2020-11-19 17:51:45 +03:00
cf18da8350 Added block breaking and refactored Controls
- Blocks can be broken by pointing at them at pressing LMB
- Rewritten ControlTriggers
- Rewritten KeyMatcher
- CollisionPathComputer now has a 0.5 margin
2020-11-17 22:53:56 +03:00
56eaec522f Renamed NamespacedRegistry and added NamespacedFactoryRegistry
- NamespacedRegistry moved to NamespacedInstanceRegistry
- Added NamespacedFactoryRegistry
2020-11-17 16:49:31 +03:00
5d7cfdb3bc Refactored Namespaced stuff
- Namespaced now takes full ID in constructor
  - Changed the rest of source accordingly
- Moved everything related to Namespaced into .util.namespaced package
- Errors are now reported with IllegalIdException instead of IAE
- Error checking is optimized
- NamespacedUtil exposes more of its requirements
- Added StringUtil.splitAt
- Added ArrayUtil.isSorted
2020-11-17 12:46:33 +03:00
b51b3a4d80 Blocks looked at are now highlighted 2020-11-16 18:02:41 +03:00
ec6181aaa8 Crash reports handle invalid format strings properly 2020-11-15 23:11:46 +03:00
ccda1eff74 Merge remote-tracking branch 'origin/master' into crashreports 2020-11-15 22:41:57 +03:00
b987412670 Added StringUtil.replaceAll 2020-11-15 21:11:07 +03:00
f2e28161a8 Added human player model
- Extracted NPedModel out of QuadripedModel
  - Both are now configurable
- Added HumanoidModel
- Added human model
- Changed NPedModel animation logic
- Added a few skins including first sketch of Pyotr by WarDreg
- Decreased walking speed
2020-11-15 20:58:17 +03:00
38a8a885c8 Updated build.gradle to make build artifacts easily runnable 2020-11-14 21:58:48 +03:00
c1194b7601 Introduced crash reports 2020-11-14 20:41:58 +03:00
154cc0a3b8 Added gravity and refactored player controls
- Added gravity (still testing)
  - Two modes: realistic (9.8 m/s^2) and Minecraft (32 m/s^2)
  - Switch with G
    - Changing (0; 0; 0) rebound to H
- Added walking controls
  - Minecraft-style
  - WIP
- LayerTestGUI now displays dev options
- Added Units
2020-11-14 13:49:35 +03:00
9c894215f8 Added collisions with world 2020-11-13 21:45:05 +03:00
0dd5e6d3da Increased encapsulation of AABBs and added TranslatedAABB
- Interface of AABB (getOrigin(), getSize() and getWall(int)) now
extracted into AABBoid interface
  - Same with Walls
  - Collection<Wall> getWalls() replaced with Wall getWall(int)
- Added TranslatedAABB extends AABBoid
- CollisionClock replaced with direct reference to WorldData
- Reorganized tmp code in LayerWorld, so as to decrease cRiNgE_ levels
2020-11-12 23:13:41 +03:00
a425af01d8 Merge remote-tracking branch 'origin/master' into crashreports 2020-11-10 01:29:29 +03:00
0017ecc5a7 Refactored CrashReportGenerator to avoid deadlocks and clarify code 2020-11-10 01:25:42 +03:00
88d5170fe5 Added CompoundColliderModel 2020-11-08 20:22:32 +03:00
09af026137 Implemented first version of collider
- Entities now can have an AABB collision model
- Collisions of pairs of entities are handled properly
- Added debug display of AABBs
2020-11-08 18:26:33 +03:00
1daec9a4df Untangled some of the mess with movement controls in LayerWorld
Now entity getVelocity() method matches actual velocity for player
entities.

WTF was I thinking when I wrote that code? Past me very stupid.
2020-11-08 12:46:12 +03:00
d5723b9ae6 Refactored crash-report 2020-11-07 21:52:09 +03:00
f92b18e9d5 Merge remote-tracking branch 'origin/master' into crashreports 2020-11-05 17:29:07 +03:00
1c5c91a712 Updated Guava to 30.0 to resolve SNYK-JAVA-COMGOOGLEGUAVA-1015415
Relevant info: https://github.com/google/guava/issues/4011. We never
used it but better prevent this in the future.
2020-11-05 12:33:13 +03:00
044c690d09 Code Review
- Renamed CrashReportGenerator.makeCrashReport to .crash for convenience
- Split .crash into subroutines
- Documented Analyzer and ContextProvider
  - Both are now supposed to have names In Title Case
- CRG.export now assumes PrintStream does not fail and assumes Log can
fail
2020-11-05 12:14:03 +03:00
ddf48c0587 Crash-reports code update 2020-11-04 23:10:07 +03:00
e7e54d0ffd Code review 2020-11-02 17:27:17 +03:00
384b2047ac Init crash reports 2020-11-02 16:30:14 +03:00
b59c4bdc2b Camera now stores last applied position and direction
Also FloatMathUtils now has sin, cos and tan
2020-10-04 19:50:52 +03:00
a9d2a7f6c5 Added stateful objects
Also added entity logic, moved test content to a separate package,
changed ImplementedChangeTracker a bit, added PacketEntityChange, made
entity IDs longs instead of UUIDs, and changed a whole bunch of minor
stuff.

Damn, this took CENTURIES to write. And it's still incomplete and crap.
Like, we've got object allocation all over the place in the tick cycle,
stateful changes are potentially super inefficient and we might have
concurrency problems down the line. AND I'll still have to write 10000
primitive wrappers. Urgh. I don't even feel like writing a coherent
commit message. Screw you, potential future reader of this commit
message.
2020-09-28 22:39:01 +03:00
ccc9d8f3a7 Refactored Camera to use anchors
- Camera now uses anchor objects to obtain position and direction
  - Replaceable at runtime
  - Anchor supplies info about camera modes (switch with F5)
  - Only Entity anchor implemented ATM
- Added PacketSetLocalPlayer
- EntityRenders now produce EntityRenderable
  - Holds reference to EntityData
  - Has getViewPoint() to use with camera anchors
- Added Matrices (like Vectors)
- Added FloatMathUtils for all those pesky math functions that are only
implemented for double. Curse you double!
2020-09-07 10:16:52 +03:00
c613bef8c5 Added face culling state stack and disabled face culling for entities 2020-09-05 23:26:54 +03:00
9dc3154874 Added entities
- Added EntityData, EntityRender and EntityLogic
  - Added QuadripedModel
- Added ComplexTexture to simplify syntax when working with complex
models
- Added the most adorable creature in the universe (as a test feature)
- Camera is now 3rd person (temporary)
  - Direction can now be switched with F5
2020-09-04 21:54:55 +03:00
dc74a419c9 Added logger 2020-09-03 23:40:28 +03:00
aa3cb630fb Fixed LayoutVertical 2020-09-02 09:15:54 +03:00
068f229a45 Added TileLogic 2020-08-31 20:39:35 +03:00
fcf5da731f Fixed buffer position and limit handling in Resource.readAsBytes 2020-08-31 18:39:35 +03:00
6afb7f8f1b Added Resource.readAsBytes to read a resource to a ByteBuffer 2020-08-31 18:32:54 +03:00
3ff074e384 Unified naming schemes for blocks, tiles and registries
- Blocks are now in packages *.world.block
- Tiles are now in packages *.world.tile
- Renamed WorldRenderable to Renderable
- GraphicsInterface now exposes frame counter
  - ...which is now a long
- Removed leftover debug FPS console spam
2020-08-31 15:15:04 +03:00
30e61cf33f Added server and reorganized client
- Added server
  - Managed with ServerState
- Added BlockLogic (no TileLogic yet)
- Added ticking
- Added server-client communication API (only local implemented, no net)
  - Added controls system (not fully implemented)
- Added Client class
  - Contains most game-related references for client: WorldRender,
Camera, ...
  - Managed with ClientState

fjckign finally~
2020-08-30 19:30:32 +03:00
e8f3177266 Added runtime localization change support
- Label.update() now invokes requestReassembly() method
2020-08-30 16:29:22 +03:00
9ec89a80d3 Added fallback language support to localizer 2020-08-30 09:10:27 +03:00
d6d1e710d9 Hotfixed localizator 2020-08-28 22:26:41 +03:00
280ffba4c0 Refactored localization 2020-08-28 22:19:58 +03:00
5fcccf05ca Added localization support 2020-08-28 21:54:53 +03:00
79c7aa91f8 Optimized tile render and added CRO tile support
- CROs now support tiles
  - CROCube refactored
- Test content:
  - Added sand and flower tiles
  - Removed grass blocks, added grass tiles
2020-08-27 20:58:27 +03:00
60fbfa9578 Added tiles. Not yet optimized. 2020-08-27 00:24:11 +03:00