157 Commits

Author SHA1 Message Date
17e0714913 Resized and improved tile textures 2021-01-04 01:13:14 +03:00
6f82d1d8b8 Fixed some minor bugs 2021-01-03 23:19:23 +03:00
e7433c90e2 Closest chunks models are now updated first 2021-01-03 16:05:47 +03:00
daba418361 Hopefully fixed #8 by enforcing only one change per tile per tick
- TickerCoordinator.pendingChanges is now a HashSet
- TickerCoordinator now makes some best-effort checks to make sure the
world does not change during evaluation phase
- Extracted Cached{Block,Tile}Change
  - these classes implement hashCode() and equals() based on the
location of the block/tile they affect, thus ensuring that only one per
block/tile remain in the aforementioned set
- Similarly extracted PacketAffect{Block,Tile,Entity}
- Renamed a bunch of packets
2021-01-03 13:21:47 +03:00
cc031529a1 Added OpenSimplex2 and a fancy world generator 2021-01-02 20:48:29 +03:00
ea56b642ee Fixed PacketSendEntity
- Moved PacketSendEntity to correct package (.common.world.entity)
- Temporarily added position, velocity and direction to EntityData
read/write methods

- Increased view distance to 150 m
- Squashed visible area vertically (to load less underground and air
chunks)
2021-01-02 17:06:55 +03:00
16c89b963e Fixed test generator not populating chunks that were loaded from disk 2021-01-02 11:26:06 +03:00
8c6794e7da Merge branch 'master' into multichunk
Conflicts:
	src/main/java/ru/windcorp/progressia/server/ServerThread.java
2021-01-02 10:34:47 +03:00
7a9e03f700 Added generation hint persistence 2021-01-02 10:26:34 +03:00
65820040ce Added FPS and TPS display averaging 2021-01-02 00:37:12 +03:00
01645f5c6e Documented and prettified CrashReports 2021-01-02 00:08:32 +03:00
06f4b4637d Added world generation hints, altered ChunkIO slightly, fixed some bugs
- A custom Object can be appended to any ChunkData to save its
generation status
  - Handled by WorldGenerator
  - Persistent
  - Used to determine whether a chunk is ready to be sent to client
- ChunkIO now requires an IOConext
- ChunkIO now requires Data{In,Out}putStreams (as a combination of
Data{In,Out}put and {In,Out}putStream)
- Fixed some minor bugs
2021-01-01 23:06:32 +03:00
bedc9fc729 Enhanced crash report interface
- CrashReports.report now throws an exception instead of invoking System.exit()
  - Reduced chance of deadlocks
  - Improved code readability
- added CrashReports.crash to handle exceptions thrown by report() in top-level catch blocks
2021-01-01 22:32:07 +03:00
00773d4f8b
Fixed compilation on JDK 8 2021-01-01 20:25:47 +03:00
77599e857d Introduced WorldGenerators 2020-12-31 15:36:21 +03:00
6e6701d2e5 Merge branch 'multichunk' 2020-12-30 14:49:59 +03:00
2947e9acff Add world persistence because I can
This is terribly inefficient both storage- and TPS-wise.
Enable/disable with ru.windcorp.progressia.test.TestWorldDiskIO.ENABLE
2020-12-30 14:47:43 +03:00
ef928b382f Implemented TestChunkCodec and removed chunk generation from client 2020-12-30 14:22:34 +03:00
saval559362
2ccba64687 Fixed a bug with the build 2020-12-30 12:46:56 +03:00
c9087e7215 Spread chunk updates over several frames
- At most 1 chunk is updated (previously known as 'buildModel') every
frame
- 3x3x3 chunks closest to the player are updated in real-time without
the aforementioned limit
2020-12-30 00:29:25 +03:00
saval559362
2960ea0b23 Added binary dependencies to installers 2020-12-30 00:05:33 +03:00
saval559362
6bae69ff04 Added build scripts 2020-12-29 22:22:46 +03:00
5d570a810b Fixed chunk load radius and removed debug leftovers 2020-12-29 16:56:15 +03:00
b44540999b Entities are now transferred from server to client
- Entities are no longer internally bound to chunks
- Entity visibility for a player is now unique for each entity
  - Entities are send/revoked just like chunks by EntityManager
- LocalPlayer no longer stores an entity; instead it stores entity ID
and looks up the entity on demand
2020-12-29 16:40:37 +03:00
cde854346c First implementation of dynamic chunk loading. Super buggy, WIP 2020-12-28 11:26:44 +03:00
eaea6fdad9 Refactored Packets and most TickerTasks 2020-12-26 18:02:17 +03:00
fd0269f913 Added the concept of visible chunks and entities 2020-12-26 15:25:28 +03:00
c6677ec8fd Added ChunkMap and ChunkSet 2020-12-25 18:12:14 +03:00
b6dd925c60 Tweaked dirt and stone textures 2020-12-22 20:23:11 +03:00
f921acf317 Added generic implementations of of Chunk and World classes
Also fixed a whole bunch of missing Override annotations
2020-12-22 19:33:27 +03:00
a582727cc0 Changed worldgen and made some minor changes in code 2020-12-22 10:57:39 +03:00
WarDref
fc48928c66 Changed textures to 24x24 2020-12-20 18:46:31 +03:00
e7b5ed3df4 Added Player server class
- Removed CommsChannel Roles
  - Replaced with Client class hierarchy on the server
- Added ClientPlayer
- Added Player (a new server class holding all objects related to a
player)
  - Player class in common renamed to PlayerData
  - Added PlayerManager for the server
2020-12-20 18:05:10 +03:00
be1c1ab9ab Merge remote-tracking branch 'origin/master' into multichunk 2020-12-19 22:03:51 +03:00
32ba0c78e5 Added chunk transfer concept
- Added PacketLoadChunk
- Added ChunkIO to handle converting ChunkData to/from bytes
- Client no longer generates chunks by default
  - It still does generate them on request by server
- DataBuffer now exposes InputStream and OutputStream
2020-12-19 20:53:43 +03:00
c0e527e388 Added StackTrace Provider 2020-12-19 20:14:31 +03:00
8977f460ca OMG THE FOOL I WAS
- Faces are now grouped by texture primitive they use
  - Massive FPS increase
- TexturePrimitive receive an additional unique ID immediately upon
instantiation
2020-12-18 00:59:58 +03:00
cd6e6d7d9c Texture coords are now precomputed in VBOs
Also optimized GLSL code and started using LOC in RenderPrograms
2020-12-18 00:30:22 +03:00
7cc4fcbffc Added dynamic text, fixed issues related to low FPS
- Hacked dynamic (quickly changing) text support into Typeface
  - No formatting for now
  - Requires a proper rewrite later
- Added DynamicLabel to display dynamic text
- Movement friction and player controls no longer depend on framerate
- Added FPS and TPS display
2020-12-17 00:25:39 +03:00
bfdb22f357 Added OpenGL buffers cleanup
- Now OpenGL buffers are being cleaned when GL objects are disposed
- Fixed a bug when garbage collector ignore OpenGL objects
2020-12-16 18:38:23 +03:00
bfd5c02b0c Added repeating tasks to TaskQueue 2020-12-16 17:05:12 +03:00
0a8db1cd02 Fixed crashes when using multiple chunks. FPS is still terrible though 2020-12-16 11:36:21 +03:00
4fa3592c98 Reworked tiles
- Now each block possesses its own set of 6 tile stacks; two tile stacks
occupy each block boundary
  - As consequence, top tiles of block (0;0;0) are now different from
bottom tiles of block (0;0;1)
- Tiles are now stored in and managed with TileStacks
- TileLocations were removed in favor of TileReferences
- Added tile tags to address individual tiles within TS in a way that
persists thru tile insertions are removals (used internally)
- Reworked TickContexts:
  - Changed and expanded interfaces significantly
  - Added TSTickContext
  - Replaced Mutable*TickContexts with TickContextMutable
- Split AddOrRemoveTile into two separate actions
- Renamed EdgeTileLogic to HangingTileLogic
- Moved tmp_generate into TestContent
- Removed Forwarding*TickContexts for now
- Fixed TileTriggeredUpdate triggering ticks instead of updates
- Fixed an error message in Ticker
2020-12-14 21:48:55 +03:00
89e24b05c0 Grass tiles in unsuitable locations now disappear slowly 2020-12-01 23:49:55 +03:00
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