Commit Graph
100 Commits
Author SHA1 Message Date
OLEGSHA f4311fb27c Created a bare-bones implementation of the final planet generator
- Added Planet generator
  - Uses temporary generation algorithms
- Added Surface generator
- Added FloatRangeMap
2021-03-15 18:54:53 +03:00
OLEGSHA abd8d9eebb Moved some functionality into WorldGenerator
- WorldGenerators now suggest a spawn location
- WorldGenerators are no longer responsible for adding chunks
2021-02-28 23:31:57 +03:00
OLEGSHA a9a21ce664 Moved planet generation code to its own package 2021-02-28 23:03:23 +03:00
OLEGSHA bd5a1fa04e Added rotating AABBs through lots of pain and suffering
- Collision models now rotate to match entity's general up direction
- Extracted rotation logic from RelRelation into AxisRotations
- Test:PlanetGravityModel is now properly centered
- Fixed some small bugs
2021-02-28 22:55:51 +03:00
OLEGSHA 2d55d4db51 Added a cubic gravity model and fixed some stuff
- Added TestPlanetGenerator and a corresponding gravity model
- Fixed gravity-triggered camera rotation
2021-02-22 15:38:14 +03:00
OLEGSHA d438d2aa14 Linked GravityModel to a WorldGenerator and added GM comms transfer
- WorldData no longer acquires a GravityModel automatically
- On the server, GravityModel is specified by WorldGenerator
- On the client, GravityModel is received from the server via a
PacketSetGravityModel
2021-02-07 01:01:37 +03:00
OLEGSHA d3c5011063 Replaced AbsFace with RelFace or BlockFace where appropriate
- Added BlockFace - a *Face superclass
- Refactored and optimized Rel{Relation, Face}
- Replaced most AbsFace references with BlockFace or RelFace
- Chunks now have an up direction
  - Determined by GravityModel's discrete up
  - Static; cannot change unless chunk is reloaded
  - Chunk models are now rendered rotated accordingly
- Fixed some minor bugs that were somehow revealed by these changes
- Moved TileLogicGrass to .test, where it belongs
- Disabled grass despawn until a new worldgen is implemented
2021-02-07 00:45:43 +03:00
OLEGSHA 10d271059c Added RelRelation and RelFace; added discrete up vector to GravityModel 2021-02-02 18:49:55 +03:00
OLEGSHA acef9d32df Changed packages for relations, renamed Face to ShapePart
- Added BlockRelation as an abstract superclass to existing relations
  - Must be given an absolute "up" direction before use
- Moved AbsFace, AbsRelation and BlockRelation to .world.rels
- Renamed Face to ShapePart to reduce confusion with AbsFace
2021-02-01 19:14:49 +03:00
OLEGSHA 848178b343 Renamed BlockFace and BlockRelation to AbsFace and AbsRelation
- Renamed BlockFace to AbsFace
- Renamed BlockRelation to AbsRelation
- Renamed AbsFace constants using the following scheme:
  POS_X, NEG_Y, etc.
2021-02-01 17:25:07 +03:00
OLEGSHA b1666fa4b9 Fixed a bunch of issues with gravity and implemented gravity changes
Also added DebugGraphics and made VectorUtil comply with the general Vec
contract
2021-01-31 23:34:24 +03:00
OLEGSHA f9717be412 Switched to using looking-at vectors instead of Euler angles
Also fixed camera jittering and added some vector functions
2021-01-29 23:19:22 +03:00
OLEGSHA 553837f207 GravityModels now take position into account
- Also documented GravityModel
2021-01-25 22:06:34 +03:00
OLEGSHA 8c5493f78e Added GravityModels, removed gravity switch
- Added GravityModel
  - can specify gravity varying by location and time
  - Added GravityModelRegistry
  - Stored in WorldData
- Removed Minecraft gravity mode
2021-01-25 21:35:46 +03:00
OLEGSHA fc85eb5658 Removed accidentally committed local build.gradle 2021-01-25 10:46:02 +03:00
OLEGSHA 260562310a Refactored CROs, removed internal chunk borders. Documented CROs.
- Refactored CROs
- Renamed CROOpaqueCube to CROSurface (including relevant interfaces)
- Optimized CROS
  - CROS now takes neighbor chunks into account
- Refactored default OptimizedSurface implementations
- Documented some CRO code
2021-01-24 20:48:38 +03:00
OLEGSHA 85edc07c75 Incremented version and corrected whitespace in buildPackages.sh 2021-01-21 18:15:50 +03:00
OLEGSHA a0346bcb9c Changed version string to TechDemo 2021-01-13 21:18:40 +03:00
OLEGSHA ad1d1396df Fixed installation path in Debian packages 2021-01-13 19:00:58 +03:00
OLEGSHA c2d91726a7 Formatted source, added/updated copyright headers
- Also added formatting settings for Eclipse IDE
2021-01-13 14:36:18 +03:00
OLEGSHA 8f3009300f Moved some files around
- Renamed FloatMathUtils to FloatMathUtil
- Renamed TextureUtils to TextureUtil
- Moved .common.io to .common.world.io
2021-01-12 22:21:06 +03:00
OLEGSHA b3ce0ca3c4 Fixed text encoding, texture transparency, labels in debug layer 2021-01-12 21:11:53 +03:00
OLEGSHA 70c213fe0d Added localization, LayerTestGUI hiding and fixed two bugs
- Re-added localization
  - Currently en-US, ru-RU
  - Switch with L
  - Used in LayerTestGUI and the new LayerAbout
- Added LayerAbout
  - Contains game named and version
  - Localized
- TestLayerGUI is hidden by default
  - Switch visiblity with F3
- Fixed alignment of text inside Labels
- Fixed crash reports not showing suppressed exceptions and causes
2021-01-12 00:36:18 +03:00
OLEGSHA 9a9823be0d Merge branch 'Textures' 2021-01-11 22:02:07 +03:00
OLEGSHA a3ac4e8aa0 Added several new tiles and updated Glass texture
- Added Painting to demonstrate "HD" texture support
- Added RoughPaint and DecorativeBricks to decorate a house outside
- Added WhitePaint to create windows
- Added TilesSmall and TilesLarge
- Updated Glass texture to make it brighter and add streaks
2021-01-11 21:58:00 +03:00
OLEGSHA 02ef94a395 Corrected spelling 2021-01-11 11:25:42 +03:00
OLEGSHA 76a6c4a186 Made glass not remove tiles under itself and updated 2 textures
- Glass is no longer solid and is now transparent
- Updated Clock and Wallpaper textures
2021-01-11 00:07:34 +03:00
OLEGSHA d2450c796b Fixed runtime problems, renamed some content and disabled saves
- Made sure texture names had correct case
- Renamed Test:Wood to Test:Log
- Renamed Test:Time to Test:Clock
- Links in crash reports are now clickable from Eclipse
2021-01-10 23:54:12 +03:00
OLEGSHA 73be13734e Merge branch 'master' into Textures 2021-01-10 23:33:22 +03:00
OLEGSHA 9d305890d1 Crash reports now include the stacktrace of .report() 2021-01-10 23:00:49 +03:00
OLEGSHA 920284190c Updated Windows building instructions in README.md 2021-01-10 21:06:43 +03:00
OLEGSHA 8f419b4d02 Rewrote README, wrote building guides and cleaned up
- Updated/prettified README.md
- Wrote extensive building guides
- Removed pictures/
- Removed music samples
- Made sure that git creates run/ when cloning
2021-01-10 20:52:45 +03:00
OLEGSHA a4dd14491d Fixed build scripts
- Eclipse is now able to detect native dependencies correctly
- `buildPackages.sh debian' exits with correct exit code
- Renamed `require*Dependencies' to `request*Dependencies'
2021-01-09 14:14:36 +03:00
OLEGSHA 7a2721c7b3 Fixed missing manifest file in built JARs 2021-01-08 00:44:49 +03:00
OLEGSHA e389d2ad67 Refactored build scripts and removed unused dependencies
- Added the following Gradle tasks:
  - buildLocal (alias for build)
  - buildCrossPlatform (builds with all natives)
  - packageDebian
  - packageWindows
- Gradle no longer downloads or packages natives for wrong platforms
(unless buildCrossPlatform or require*Dependencies is run)
- Gradle should no longer complain about deprecated features
- buildPackages.sh is now a lot more robust
- Removed the following dependencies:
  - Apache Commons Math
  - Everything in LWJGL except OpenGL/AL, GLFW, STB and core
2021-01-08 00:33:53 +03:00
OLEGSHA eb82c96390 Lots of small tweaks
- Added text outlining
- Shrunk and moved compass bar (it no longer pretends to be a hotbar)
- Changed cross to match text proportions
- Refactored TileRenderSimple into TileRender{Opaque,Transparent}Surface
  - Also renamed OpaqueTile into OpaqueSurface
- Added about and version info
2021-01-07 18:26:54 +03:00
OLEGSHA e467d00877 Probably fixed that GUI freeze that WarGreg reported 2021-01-07 16:51:34 +03:00
OLEGSHA 1bba20504d Set up crash reporting for Guava's EventBuses
- Added GuavaEventBusHijacker to access an inexplicably package-private
constructor in EventBus
- Added and utilized ReportingEventBus that reports caught exceptions
2021-01-07 00:13:18 +03:00
OLEGSHA c919ffc8ce Multiple blocks and tiles can now be placed
- Different blocks can now be placed
  - Select block with (vertical) mouse wheel scrolling when block
placing is active
  - All blocks except Test:Air are available
- Different tiles can now be placed
  - Select tile with (vertical) mouse wheel scrolling when tile placing
is active
  - Switch between placing blocks and tiles with middle mouse button,
horizontal mouse scrolling or Shift + (vertical) mouse scrolling
- Changed Test GUI text color to white to increase readability on blocks
2021-01-06 23:25:05 +03:00
OLEGSHA 339e11d3ac Fixed several miscellaneous bugs
- Recolored Test:Stones to better match granite textures
- Selection box restored
- Controls no longer get stuck after player entity is reloaded
- Moved test spawn location a little down so chunks would load
conveniently
- Moved test spawn variable into TestContent
2021-01-06 21:44:54 +03:00
OLEGSHA 890dd16ec6 Added DynamicStrings to minimize String.format invocations in GUI 2021-01-06 21:26:19 +03:00
OLEGSHA 008e8b33a5 Added color multiplier stack to shaders, fixed dynamic font colors
- ShapeFragment.glsl now declares uniformColorMultiplier, which is used
as an additional fragment color multiplier (independent from VBAs)
  - Managed with a new stack by ShapeRenderHelper
- Fixed dynamic font colors
2021-01-05 19:08:53 +03:00
OLEGSHA d197c0a73e Colors are now always Vec4, ARGB ints are only wrappers 2021-01-05 18:51:44 +03:00
OLEGSHA a6c1b914c1 Fixed and re-optimized static labels 2021-01-05 17:45:28 +03:00
OLEGSHA 18bac9d2b5 Fixed dynamic labels, broke font colors and static label optimization 2021-01-05 17:12:02 +03:00
OLEGSHA 7b417d612d Oops, forgot to move snow layers 1 km up 2021-01-05 17:07:20 +03:00
OLEGSHA 524e79008f Removed some leftover debug content 2021-01-04 21:57:54 +03:00
OLEGSHA 2ce11b5d01 Added granite & snow, updated dirt texture
- Added granite (monolith, cracked and gravel variants)
  - Generates as a random combination of the variants instead of stone
on mountain cliffs
- Added snow (opaque, half and quarter variants)
  - Generates at altitudes above 1500 m
  - Distribution is bad atm, not fixing until proper worldgen is
introduced
- Reduced cliff areas
- Hotfixed texture flickering
- Changed dirt texture
2021-01-04 21:55:54 +03:00
OLEGSHA 5157a675af Hotfixed collision drag, still needs a lot of testing 2021-01-04 11:46:16 +03:00
OLEGSHA 17e0714913 Resized and improved tile textures 2021-01-04 01:13:14 +03:00
OLEGSHA 6f82d1d8b8 Fixed some minor bugs 2021-01-03 23:19:23 +03:00
OLEGSHA e7433c90e2 Closest chunks models are now updated first 2021-01-03 16:05:47 +03:00
OLEGSHA 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
OLEGSHA cc031529a1 Added OpenSimplex2 and a fancy world generator 2021-01-02 20:48:29 +03:00
OLEGSHA 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
OLEGSHA 16c89b963e Fixed test generator not populating chunks that were loaded from disk 2021-01-02 11:26:06 +03:00
OLEGSHA 8c6794e7da Merge branch 'master' into multichunk
Conflicts:
	src/main/java/ru/windcorp/progressia/server/ServerThread.java
2021-01-02 10:34:47 +03:00
OLEGSHA 7a9e03f700 Added generation hint persistence 2021-01-02 10:26:34 +03:00
OLEGSHA 65820040ce Added FPS and TPS display averaging 2021-01-02 00:37:12 +03:00
OLEGSHA 01645f5c6e Documented and prettified CrashReports 2021-01-02 00:08:32 +03:00
OLEGSHA 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
OLEGSHA 00773d4f8b Fixed compilation on JDK 8 2021-01-01 20:25:47 +03:00
OLEGSHA 77599e857d Introduced WorldGenerators 2020-12-31 15:36:21 +03:00
OLEGSHA 6e6701d2e5 Merge branch 'multichunk' 2020-12-30 14:49:59 +03:00
OLEGSHA 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
OLEGSHA ef928b382f Implemented TestChunkCodec and removed chunk generation from client 2020-12-30 14:22:34 +03:00
OLEGSHA 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
OLEGSHA 5d570a810b Fixed chunk load radius and removed debug leftovers 2020-12-29 16:56:15 +03:00
OLEGSHA 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
OLEGSHA cde854346c First implementation of dynamic chunk loading. Super buggy, WIP 2020-12-28 11:26:44 +03:00
OLEGSHA eaea6fdad9 Refactored Packets and most TickerTasks 2020-12-26 18:02:17 +03:00
OLEGSHA fd0269f913 Added the concept of visible chunks and entities 2020-12-26 15:25:28 +03:00
OLEGSHA c6677ec8fd Added ChunkMap and ChunkSet 2020-12-25 18:12:14 +03:00
OLEGSHA b6dd925c60 Tweaked dirt and stone textures 2020-12-22 20:23:11 +03:00
OLEGSHA 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
OLEGSHA a582727cc0 Changed worldgen and made some minor changes in code 2020-12-22 10:57:39 +03:00
OLEGSHA 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
OLEGSHA be1c1ab9ab Merge remote-tracking branch 'origin/master' into multichunk 2020-12-19 22:03:51 +03:00
OLEGSHA 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
OLEGSHA 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
OLEGSHA 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
OLEGSHA 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
OLEGSHA bfd5c02b0c Added repeating tasks to TaskQueue 2020-12-16 17:05:12 +03:00
OLEGSHA 0a8db1cd02 Fixed crashes when using multiple chunks. FPS is still terrible though 2020-12-16 11:36:21 +03:00
OLEGSHA 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
OLEGSHA 89e24b05c0 Grass tiles in unsuitable locations now disappear slowly 2020-12-01 23:49:55 +03:00
OLEGSHA 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
OLEGSHA 377241c529 Removed MICRO SIGN U+00B5 from program source for Windows compatibility 2020-12-01 16:53:04 +03:00
OLEGSHA 73f90c69e5 Fixed several problems with Units 2020-12-01 12:27:30 +03:00
OLEGSHA 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
OLEGSHA 4c3f5caae6 Working on #3 - Implemented entity ticking 2020-11-30 23:07:15 +03:00
OLEGSHA 9dbeeb7e8d Working on #3 - implemented chunk ticking in general and regular ticks 2020-11-28 00:29:40 +03:00
OLEGSHA 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
OLEGSHA 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
OLEGSHA 64390347a8 Fixed a couple literals in CrashReports 2020-11-24 13:53:53 +03:00
OLEGSHA e3315f62a8 Merge pull request #1 from OLEGSHA/audio 2020-11-22 17:25:46 +03:00
OLEGSHA ce2d4297dd Fixed compilation problems and added MultiLOC
(MultiLOC is MultiLowOverheadCache)
2020-11-21 23:51:14 +03:00
OLEGSHA 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
OLEGSHA 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
OLEGSHA a7eb90865f Merge branch 'crashreports' 2020-11-19 19:11:30 +03:00