113 Commits

Author SHA1 Message Date
f8e763c0d6 Fixed #3 - implemented random ticks, refactored Ticking* interfaces
- Random ticks now happen
- Ticking* interfaces now have a single getTickingPolicy method instead
of two doesTick* methods. This makes more sense since an object cannot
both tick randomly and regularly.
- Added Server.stop
- Added some convenience methods related to setting blocks and tiles
- Documented some stuff
2020-12-01 22:37:18 +03:00
377241c529 Removed MICRO SIGN U+00B5 from program source for Windows compatibility 2020-12-01 16:53:04 +03:00
a588b6c2b5 Fixed java 8 compatibility 2020-12-01 12:46:54 +03:00
73f90c69e5 Fixed several problems with Units 2020-12-01 12:27:30 +03:00
3782cf1f88 Added unit registration to Units and Units.get methods
These are just convenience methods: instead of writing
float g = 9.8f * Units.METERS_PER_SECOND_SQUARED;
we can write
float g = Units.get("9.8 m/s^2");
and it'll actually work fast.
2020-12-01 01:28:18 +03:00
4c3f5caae6 Working on #3 - Implemented entity ticking 2020-11-30 23:07:15 +03:00
9dbeeb7e8d Working on #3 - implemented chunk ticking in general and regular ticks 2020-11-28 00:29:40 +03:00
2d322e83bc I've had it with LowOverheadCaches
Benchmarking showed that using LOC gave a whopping 5% speed advantage at
the cost of terrible readability. In the worst case. Decided that having
clear, laconic and Java-style code is worth the drop in performance.
2020-11-27 23:54:41 +03:00
44de6a86f7 Dumped server ticking code into the Mariana Trench and rewritten it
No regrets.

- Pretty much everything related to ticking changed
- Ticking is now capable of running in parallel (other code - not so
much)
- Implemented world updates
- Broke some stuff
2020-11-27 00:56:56 +03:00
6d6e0f6ca4 Added new context providers and fixed bugs
- RAMContextProvider
- JavaVersionContextProvider
- OpenALContextProvider
- ArgsContextProvider 
- LanguageContextProvider
2020-11-24 20:32:45 +03:00
65bb5339c7 Added ALVersion method to AudioManager 2020-11-24 19:23:56 +03:00
64390347a8 Fixed a couple literals in CrashReports 2020-11-24 13:53:53 +03:00
e3315f62a8
Merge pull request #1 from OLEGSHA/audio 2020-11-22 17:25:46 +03:00
2fbb274c31 Fixed AL close action
Added a test for the Audio Engine
Refactored Audio Engine
2020-11-22 14:44:19 +03:00
104d64ff9a Merge branch 'master' into audio 2020-11-22 14:34:03 +03:00
ce2d4297dd Fixed compilation problems and added MultiLOC
(MultiLOC is MultiLowOverheadCache)
2020-11-21 23:51:14 +03:00
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
f3ec9911ae Reworked audio 2020-11-18 23:52:12 +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
ececa9506d Merge remote-tracking branch 'origin/master' into audio 2020-11-10 01:31:53 +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
5c90a8025b Refactored sound update logic
- Audio Listener now uses Camera cache to determine position and
orientation
- SoundManager.update() is not triggered from RenderThread directly
2020-10-06 12:15:58 +03:00