Commit Graph

117 Commits

Author SHA1 Message Date
Collin Smith
aba07a0dca Created speech.txt table to map sound id to string tbl key
Created speech.txt table to map sound id to string tbl key
Added more generic Files.loadInternal to load internal tables
2019-03-04 18:59:38 -08:00
Collin Smith
815f390f6c Added NPC dialog box support
Added NPC dialog box support
Added customized implementation of LibGDX scrollpane
Adjusted MapListener to cancel dialog and ignore input temporarily
Changed padding of BorderedPaletteIndexedDrawable
Adjusted BorderedPaletteIndexedDrawable background bounds to be slightly smaller than border bounds
Added fontformal11 to Diablo.font
2019-03-04 16:24:45 -08:00
Collin Smith
0a382d10b5 Added bordered drawable 2019-03-04 01:16:22 -08:00
Collin Smith
7adf37f091 Changed GL clear color to black (from blue) 2019-03-04 00:03:18 -08:00
Collin Smith
4f6966b900 Defined colors for item backgrounds 2019-03-03 23:57:28 -08:00
Collin Smith
32d1761e77 Updated to use newer TextField implementation 2019-03-03 21:19:54 -08:00
Collin Smith
5c76e939ab Implemented proper I18N lookup of names
Implemented proper I18N lookup of names using string TBL
Added StringTBLs.lookup(String)
Added namestr column to ItemEntry
2019-03-03 20:56:28 -08:00
Collin Smith
42d4f7f4dd Adjusted background offsets for neck, rring, lring 2019-03-03 17:52:52 -08:00
Collin Smith
0ce15351ed Disabled bounds and path debugging by default 2019-03-03 17:45:56 -08:00
Collin Smith
38242c6b7a Performance optimizations with MapRenderer
Performance optimizations with MapRenderer to roofs, shadows and wall layers
Extended min zoom level to GameScreen
2019-03-03 17:30:45 -08:00
Collin Smith
c657c1e3e0 Added support for item details label
Added support for item details label
Changed constructor of ItemGrid to GameScreen from Player
2019-03-03 17:11:10 -08:00
Collin Smith
fc35851f0f Added some extra debugging for GameScreen hit check 2019-03-03 15:34:08 -08:00
Collin Smith
78edbb2899 Fixed issue with MapListener touchability and different panels
MapListener will only receive input if nothing touchable is hit
2019-03-03 15:26:29 -08:00
Collin Smith
b23eb9c30b Fixed gloves background image offset 2019-03-03 04:42:58 -08:00
Collin Smith
c80a57ab09 Fixed some NpcMenu behavior with the cancellation callback
Attempted change on cancel callback behavior -- only called when upnav
Introduced some parent functions in NpcMenu to help with determining submenus
Changed menus to NpcMenu (I don't imagine the need for the generalization right now)
2019-03-03 02:29:26 -08:00
Collin Smith
008730d2c9 Added NPC menus
Added NPC menus with submenu support
Fixed issue with cursor movement stopping when touching certain actors
Changed some debug fonts to use consolas12
Changed MapListener implementation to work using client updates instead of InputListener
Fixed MapListener input flow with menus and entity targeting
Introduced Entity.getLabelOffset to replace setting label position manually per implementation
2019-03-03 02:11:43 -08:00
Collin Smith
162862771c NPCs will now stop when interacted with and look at player 2019-03-02 14:40:53 -08:00
Collin Smith
d23b151149 MapListener will no longer react if cursor is over a stage component 2019-03-02 14:30:52 -08:00
Collin Smith
0bba0ccb16 Fixed label world to screen coords
Added MapRenderer.projectScaled which is the same as Camera.project, except uses camera viewport width and height
Labels will now output using screen coordinates and clamp to window bounds
2019-03-02 03:29:17 -08:00
Collin Smith
9102c4ba19 Disabled some debugging on unselectable entities 2019-03-02 03:11:35 -08:00
Collin Smith
a656ae4182 Committing notes on how to handle tree tiles 2019-03-02 02:04:55 -08:00
Collin Smith
42c6073261 Added cache for entire viewbuffer when rendering entities
Added cache for entire viewbuffer when rendering entities to avoid calculating them twice
2019-03-02 01:48:52 -08:00
Collin Smith
eaabd43669 Improved Animation bounds calculation and debugging 2019-03-02 01:06:50 -08:00
Collin Smith
4d7b37e386 Disabled player weapon state debugging 2019-03-01 23:31:21 -08:00
Collin Smith
d3dbdb06bd Greatly improved MapRenderer and implemented basic entity interaction
MapRenderer will now renderer more closely to the game itself
Background layer and foreground layers are now interwoven so entities will render behind correct objects,walls,etc
Shadow abstracted from animation rendering to render separately
Animation class now maintains a box that is representative of all its current layers (COF bbox is inaccurate)
Added getBox(int) to DC and began process to change implementation behavior of how animation boxes should be retrieved
Added className to Entity and Map.Zon to constituent classes
Changed how Labels are implemented in Entity
Added drawShadow method to Entity
Fixed Entity BBox checking to check for more accurate Animation BBox
Added Entity interaction range and interaction methods
Updated Entity API in Monster and StaticEntity
Added some i18n support
Added Waypoint support to StaticEntity
Fixed DS1 shadow layer
Added support for default orientation to DS1.Cell
Changed visibility of Map.Zone.map and Map.Zone.level
Added copyShadows to Map.Preset
Added Map.flags methods to retrieve flags of a specified subtile in world-space
Added MapGraphPath.isEmpty
Implemented Label support to MapListener and GameScreen
Added entity target support to MapListener
Implemented improved MapListener API to GameScreen
Added interact support to AI
Added basic greeting to Npc AI on interaction
2019-03-01 23:26:47 -08:00
Collin Smith
7ec02be171 Changed play(String,boolean) behavior to return id of audio file, 0 if not found 2019-03-01 23:05:52 -08:00
Collin Smith
ca9c9be8df Disabled GL depth test 2019-03-01 23:04:59 -08:00
Collin Smith
cb39a53ee8 Added consolas12 2019-03-01 23:04:25 -08:00
Collin Smith
1bbfd0b02e Added V-Sync Cvar toggle 2019-03-01 23:03:59 -08:00
Collin Smith
70c5a5ecb5 Added support for ds1 object selection
Added support for ds1 object selection
Added additional contains methods with Vector2 (Vector3 to be removed soon)
Added MapListener which will be the primary controller for map elements
Disabled entity over updates with MapRenderer (handled by MapListener)
Increased visibility of StaticEntity fields to public
2019-02-24 04:18:49 -08:00
Collin Smith
0016dda7da Changed rounding behavior of positions
Changed rounding behavior of position from casting down to Math.round
This has helped smooth pathing and prevent some on-the-fly pathing bugs
2019-02-23 15:41:58 -08:00
Collin Smith
e9b2d6f2fb Added some Android-specific config improvements
Disabled some unneeded features
Added status bar toggle cvar (need to resize screen)
2019-02-23 15:12:57 -08:00
Collin Smith
0e7c0f8fb9 Fixed entity starting direction
Fixed entity starting direction
Changed default angle for Player entities to -PI/2
Entities will no longer update angles to target if target is zero
Re-enabled animation speeds for walk animations
2019-02-23 14:44:27 -08:00
Collin Smith
18acef4791 Rewrote direction lookup algorithms
Rewrote direction lookup algorithms using a specialized branchless search
2019-02-23 13:47:35 -08:00
Collin Smith
5adbd55103 Added sound to button select
Added sound to button select
Disabled debug mode
2019-02-23 03:21:19 -08:00
Collin Smith
5d6a140b54 Rewrote Direction utility class for accuracy
Rewrote Direction utility class to relate directions based on tile instead of unit circle
MapRenderer will not longer update angles of objects that have no target set
2019-02-23 03:09:31 -08:00
Collin Smith
edc4166a8d Added Idle AI (default AI)
Added Idle AI (default AI) -- does nothing
Changed default angle for entities to align with correct default direction
2019-02-22 22:11:47 -08:00
Collin Smith
f1fb2e69b2 Fixed Animation shadow blend mode 2019-02-22 21:20:53 -08:00
Collin Smith
d4116eaa06 Temporary fix to movement animation speed -- doesn't take velocity into account 2019-02-22 19:40:01 -08:00
Collin Smith
3e9f0a9d29 Implemented ray-casting-based movement for touchpad controls
Implemented ray-casting-based movement for touchpad controls
Works great in open spaces, some issues with wall detection and following
2019-02-22 16:12:56 -08:00
Collin Smith
d480d2566b Integrated basic NPC AI
Added basic AI support along with NPC AI which uses built in paths/actions
NPCs will choose a random path after each arrival after their action finishes
Added support for per-entity run/walk speed along with a toggle
Added Map as a param for static/monster Entity creation along with Map.Zone
Fixed some debug drawing for entity paths
2019-02-22 00:37:44 -08:00
Collin Smith
aae12329c1 Fixed issue where render bounds rect was incorrect color 2019-02-21 18:28:29 -08:00
Collin Smith
f17278b87b Fix for anim family with differing number of directions crashing on Layer.load(int) 2019-02-21 18:26:24 -08:00
Collin Smith
8bbaec639b Added max steps parameter to path generation
Added max steps parameter to path generation to avoid some behavior on Android with 1 unit walls
Android movement should be reimplemented as raycasting to help with moving near walls
2019-02-21 17:16:36 -08:00
Collin Smith
bc4f1f83b8 Fixed issue where preset objects weren't being loaded to correct location 2019-02-21 16:55:27 -08:00
Collin Smith
8cfe8f9090 NPC paths now show action index at points 2019-02-21 00:35:06 -08:00
Collin Smith
27976a3712 Repo cleanup 2019-02-21 00:20:31 -08:00
Collin Smith
c33e18d8a6 Disabled updateTask for Android
Disabled updateTask because it's causing Android to hang -- likely some concurrency issue?
2019-02-20 22:41:08 -08:00
Collin Smith
679984b9b5 Rewrote MapRenderer, added interpolated movement, and added path finding with collision detection
Removed gdx-ai dependency and replaced GraphPath with my own implementation
Refactored Entity.updatePath to Entity.setPath
Removed src position from path (first element is now first target)
MapPather works in real-time -- improvements to be made
Disabled updateTask in client to use update(float) entity method instead
Added floating point position support to MapRenderer camera
Rewrote MapRenderer with optimizations for 60%+ FPS improvement!
Fixed numerous performance hogs and made optimizations (more to come)
Fixed issue where render bounds was calculated before zoom applied
Frame time on Android (GN5) down from 25ms to 10ms
Frame time on PC seeing similar results (now 0.17ms from about 0.45)
Implemented gdx-ai path finder for testing
Repo cleanup
Added support for path finding metrics for debugging purposes
Disabled some Entity debug messages
Implemented path smoothing on generated paths
Created MapGraph.MapGraphPath
MapRenderer will now render path as lines between points
Entity will clear path once final target reached
Added angle and animation support to Entity pathing
Entities will now change to run animation and set direction to target angle
Implemented basic touchpad support with new movement system
Replaced MapRenderer and MapViewer and removed any existing dependencies
Removed code comments from older revisions
MapRenderer.drawDebug changes projection matrix automatically
Added debug support for path smoothing
Added back networking to player movements
Removed old MapPather and references
Deleted Entity.move() as it's now irrelevant
2019-02-20 21:44:30 -08:00
Collin Smith
46423e10f7 Disabled path finder movement (new branch)
Disabled path finder movement on this branch
Bug fixes to path finder along with distance limiter
Incorporated persistent path into MapViewer/Entity
2019-02-18 14:25:55 -08:00