Commit Graph

515 Commits

Author SHA1 Message Date
Collin Smith
98bd87ef61 Ported Zombie AI and fixed NPE case where target entity was not Interactable 2019-11-25 03:50:46 -08:00
Collin Smith
947b5974f9 Added debug text for AI status and added state names for Npc AI 2019-11-25 03:26:48 -08:00
Collin Smith
1fa7c20f3b Added support for generated monster entities 2019-11-25 03:19:35 -08:00
Collin Smith
5688752d71 Added AI system along with ported Npc AI 2019-11-25 00:53:10 -08:00
Collin Smith
1f62cf4aca Added MonsterComponent reference in AI, added component mapping to Npc 2019-11-24 22:40:37 -08:00
Collin Smith
83dc4dae68 Adjusted z-order of mobile controls to prevent interaction and blocking of panels 2019-11-24 22:14:35 -08:00
Collin Smith
cb828b100a Prevent touch movement on android 2019-11-24 22:02:28 -08:00
Collin Smith
bff683203d Added AIComponent and implemented Interactor into AIs
Added AIComponent and implemented Interactor into AIs
Added support for NpcMenu along with correct stage placement
2019-11-24 21:54:04 -08:00
Collin Smith
e0bee92925 Added ClientScreen reference within Riiablo class and removed it from Engine and ObjectIterator constructors 2019-11-24 16:41:54 -08:00
Collin Smith
d7ba715fef Added control for debug mode 2019-11-24 16:29:04 -08:00
Collin Smith
cb95b0c8ce Removed unused code and reduced pathing limit to 300 nodes now that raycasting can take over 2019-11-24 03:36:17 -08:00
Collin Smith
bca49f4633 Added WarpInteractor and improved target handling within TouchMovementSystem 2019-11-24 03:15:28 -08:00
Collin Smith
8f147094a7 Refined TouchMovementSystem to work more smoothly near walls
Refined TouchMovementSystem to work more smoothly near walls by turning off pathing and using raycasting and box2d
Replaced gdx-ai raycaster with my own implementation that supports passing size and flags
Exposed MapGraph#getOrCreate(Vector2) -- may move this class and return these to package access later
2019-11-24 02:48:41 -08:00
Collin Smith
d29ed177ca Added support for touch movement and interaction
Added interact system and interactors for object and items
Added minimum bounds to item entities to make them easier to interact with
Committing EntityAdapter -- should have been included a few commits ago
Added ClientScreen to Engine constructor
Committing ClientScreen -- tbd replacement for GameScreen
Added CollisionSystem to update Box2D bodies with current object state
2019-11-23 22:52:40 -08:00
Collin Smith
6cd0777557 Workaround for interactable entities not allowing to be pathed to (since their coords were flagged on map) 2019-11-23 19:22:25 -08:00
Collin Smith
29cbcead58 Made item entities interactable 2019-11-23 18:29:31 -08:00
Collin Smith
917c461e37 Extended PathfindDebugSystem to better support using independently from engine to test path finding
Added support for drawing ellipses with DebugUtils
2019-11-23 17:59:11 -08:00
Collin Smith
407d41c7ba Implemented a JPS path finder (see #63) 2019-11-23 16:58:37 -08:00
Collin Smith
b2d8b7f8b9 Fixed variable names 2019-11-23 02:04:30 -08:00
Collin Smith
1d820b8bb2 Folded NodeRecord into Point2
Renamed IndexAStarPathFinder to AStarPathFinder because it isn't indexed anymore
2019-11-22 23:49:49 -08:00
Collin Smith
42c440618f Minor change to enforce correct heuristic type is assigned to heuristic fields 2019-11-22 22:34:46 -08:00
Collin Smith
99914c2c23 Rewrote path finding related classes to be more tailored to my needs (see #63) 2019-11-22 22:20:53 -08:00
Collin Smith
673463da91 Refactored and moved some things around -- changed node category to byte 2019-11-22 16:17:04 -08:00
Collin Smith
8545fc22fc Replaced node records array with one that is dynamically resized 2019-11-22 16:00:41 -08:00
Collin Smith
a5898b568f Moved graph indexing abstraction to node interface
Moved graph indexing abstraction to node interface
Created clearanced node interface
Simplified IndexedAStarPathfinder
2019-11-22 03:26:15 -08:00
Collin Smith
f7bdd339e4 Added support for item entities
Created ItemLoaderSystem to defer flippy file loading
Item entities are selectable only after their flippy file has been loaded since they have no bbox
Changed implementations from EntityListener to EntityAdapter
2019-11-21 04:11:16 -08:00
Collin Smith
07ec6a9bc1 Relaxed family constraint that all entities should have a COF -- items do not 2019-11-21 03:39:31 -08:00
Collin Smith
354c715261 Fix for shoving NPCs 2019-11-21 02:00:14 -08:00
Collin Smith
2e264abb66 Fixed issue setting flags for multiple rows 2019-11-21 01:58:12 -08:00
Collin Smith
d6f8de3b86 Added support for generating box2d bodies for monster and objects and generalized player entities
Added support for generating box2d bodies for monster and objects and generalized player entities
Added support for object entities to perform a bitwise or with the map tile flags so pathfinding will avoid them
2019-11-21 01:34:56 -08:00
Collin Smith
266eca76ce Deferred disposing to Disposable interface 2019-11-20 05:00:54 -08:00
Collin Smith
24b6a9d3ed Fixed Box2D world generation
Fixed Box2D world generation by subtracting tile offset
Added Box2D debug renderer
Disabled RenderSystem debug subtile flag
2019-11-20 00:16:10 -08:00
Collin Smith
3bd3e5f64e Added debug logging for number of box2d bodies generated 2019-11-19 23:55:50 -08:00
Collin Smith
4e5fbc03d6 Made Box2DPhysicsSystem disposable 2019-11-19 23:32:32 -08:00
Collin Smith
35df3a6b96 Added support for retrieving vector2 view of MapGaphPath iterator
Added support for retrieving vector2 view of MapGaphPath iterator
Changed representation of PathfindComponent to Vector2 from MapGraph.Point2
Deleted old MapGraph racaster
2019-11-19 21:55:56 -08:00
Collin Smith
4d1ecab3f5 Added support for sized path smoothing (see #63)
Added support for sized path smoothing
Removed extra data structures and put references directly into Point2
Added back direction-8 children successors
2019-11-19 20:46:55 -08:00
Collin Smith
40d9b56c33 Increased position lerp tolerance to 0.1 yards -- should help prevent entities getting stuck at waypoints 2019-11-19 16:48:42 -08:00
Collin Smith
b6bf8773a1 Implemented variation of A* that includes support for clearance (see #63)
Added SizeComponent and implemented auto sizing within engine entity creation
2019-11-19 02:07:42 -08:00
Collin Smith
09c4a01b3e Implemented map to store existing paths to prevent object creation 2019-11-19 00:58:50 -08:00
Collin Smith
2298d80cab Reduced static memory usage of MapGraph
Changed rounding method of Map#flags(float,float) to use Map#round(float) instead of casting down to int
Removed indexing and connection links from Point2
Point2 are now indexed using MapGraph#getOrCreate and mapped using an ObjectSet -- using int hash did not seem sufficient
Connections to a given Point2 are lazily generated using a static Array -- it did not make sense to cache this for every node
Cleaned up API and method references (all pathing methods now use MapGraph#searchNodePath as their base method)
Most of these changed are geared to hopefully use the underlying map collision flags array as the graph instead of building a new one
2019-11-18 16:36:24 -08:00
Collin Smith
222fe7077a Added Box2D dependency
Created Box2DComponent to store Box2D body
Created Box2DPhysicsSystem to generate world objects and iterate physics
Created Box2DBodySystem to propagate VelocityComponent to Box2D bodies
2019-11-17 03:08:42 -08:00
Collin Smith
5d077652ea Added getter method for RenderSystem isometric camera 2019-11-15 16:14:49 -08:00
Collin Smith
bdfb83da30 Added pathfinding that includes collision detection with world -- PhysicsSystem still ignores collision 2019-11-15 16:04:08 -08:00
Collin Smith
11fe2682f6 Fixed issue with displaying unloaded texture briefly before new one is loaded 2019-11-15 05:28:02 -08:00
Collin Smith
22d7701647 Fixed changing cof components of an existing animation
Introduced CofComponent.setComponent(int,int) to auto set dirty flags for changed components
AnimationLoaderSystem will now unset load flag for null layers and remove transform and alpha update flags
CofLoaderSystem will now trigger a layer load when a nil component is encountered
2019-11-15 03:53:52 -08:00
Collin Smith
d34964c4ba Increased Warp interaction range to 3 yards 2019-11-15 02:29:17 -08:00
Collin Smith
3c1a8e4933 Added InteractableComponent 2019-11-15 01:24:51 -08:00
Collin Smith
d0e323e320 Added AutoInteractSystem which will automatically hover and sort nearby entities for selection on mobile 2019-11-15 01:22:51 -08:00
Collin Smith
00947ba87d Added ZoneEntrySystem to display zone entry texture when RenderSystem source entity changes zones 2019-11-12 20:13:44 -08:00
Collin Smith
3317794cb5 Added PlayerSystem and Map.Zone tracking
Created ZoneAwareComponent and ZoneUpdate tags
Added factory method to create players within Engine
2019-11-12 19:40:22 -08:00