Commit Graph

150 Commits

Author SHA1 Message Date
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
Collin Smith
5cc2aa55c6 Integrated path finding into Entity
Integrated path finding into Entity
Changed API a bit to accommodate reusing GraphPath
Introduced DiagonalHeuristic -- will need better one later on to include all 16 directions
2019-02-18 01:23:26 -08:00
Collin Smith
9e0df071f2 Improved path finding algorithm to A* 2019-02-18 00:47:50 -08:00
Collin Smith
95d61fc4d7 Added extremely basic path-finding algorithm
Added extremely basic path-finding algorithm
Added accessor to Zone.flags
2019-02-17 18:50:14 -08:00
Collin Smith
98348bd652 Added support for BitmapFont symbol padding
Added padding to FontTBL.BitmapFont to fix issue where some symbols were bleeding adjacent symbols
2019-02-16 15:43:07 -08:00
Collin Smith
0676660f44 Added support for StaticEntity labels
Added support for StaticEntity labels
Refactored entity labels/names into Entity class -- needs optimization
Fixed issue where changing Label text wouldn't resize Label itself
Fixed issue where left padding on Label background Drawable was ignored
2019-02-16 15:34:36 -08:00
Collin Smith
1d1cf585b5 Disabled item bounds debug 2019-02-16 15:21:51 -08:00
Collin Smith
6337b86cf6 Added TODO note for customizing colors 2019-02-16 14:52:35 -08:00
Collin Smith
ece4016b7c Refactored color names
Refactored color names since they are used globally
2019-02-16 14:25:09 -08:00
Collin Smith
2ba6542728 Refactored modal color names
Refactored modal colors to say what transparency they are
Added modal background to EscapePanel
2019-02-16 14:19:03 -08:00
Collin Smith
3829c34c24 Added basic entity cursor focusing
Added basic entity cursor focusing using backing animation bounds and MapRenderer
Added background drawable support to Label widget
Improved ColorDrawable padding calculations such that min width/height is a sum of respective padding
Disabled some mouse debugging features in MapRenderer
2019-02-16 01:26:51 -08:00
Collin Smith
247e62ff2b Improved object order rendering
Made MapRenderer aware of entities and made them render behind walls better
Fixed issue where animations were playing too quickly
2019-02-15 21:11:59 -08:00
Collin Smith
3348098ace Added support for poppads
MapRenderer will now properly hide tiles whose mainIndexes intersect with current position poppads
Entity dirty components debug message will print string representation of flags instead of raw int
2019-02-15 15:55:45 -08:00
Collin Smith
c765da42c9 Updated MapBuilder screenshot 2019-02-15 02:11:56 -08:00
Collin Smith
1d781c5b8f Improved entity path debug rendering
Included reference to source DS1.Object in StaticEntity and Monster classes
Added reference to DS1.Path in DS1.Object owner (assumes 1 path per object)
Moved path debug rendering to Entity from MapRenderer
Added Entity.drawDebugPath(ShapeRenderer)
2019-02-15 02:09:17 -08:00
Collin Smith
dda1c4b47d Added debug rendering for DS1 paths
Added rendering of DS1 paths -- need to associate with NPC
2019-02-14 02:17:08 -08:00
Collin Smith
babde9ff6e Added dynamic (monster/npc) entities
Added Monster class generated from DS1 objects -- belong to Map Zones and render per-tile -- optimization needed
Refactored DS1 object generation to Entity class as static method to create type 1 or 2 entities
Updated screenshot with dynamic entities
Removed type from StaticEntity constructor (already included with Objects.Entry)
Added Excel classes for monstats and monstats2 -- optimizations can be made later
2019-02-13 17:41:55 -08:00
Collin Smith
103c0b4b0d Updated screenshot with static entities 2019-02-13 02:46:18 -08:00