Commit Graph
28 Commits
Author SHA1 Message Date
Gary Tierney 6188c2e751 Add support for dynamic collision detection
This commit implements collision detection using the map files loaded
from the cache, and adds support for modifying the collision matrices at
runtime when the game world is updated.

All checks to see if a tile is reachable should now be done via.
World#traversable, instead of Region#traversable, as the World object
can handle checking tiles across multiple regions.  These are done for
the WalkingQueue and Pathfinder implementations.
2016-12-31 05:14:19 +00:00
Gary Tierney 0672fa2ea0 Fix bitwise negation in CollisionMatrix#clear()
Adds the missing bitwise AND to the clear() method in CollisionMatrix,
so any flags besides the one given are retained.
2016-12-31 02:09:42 +00:00
Gary Tierney 376d36871a Allow registering region listeners globally
Adds the ability to register region listeners with the
RegionRepository, which will register the listener with any existing
regions and cache it for any newly created regions later.
2016-12-31 02:09:42 +00:00
Gary Tierney 6a4625cb32 Refactor map loading code
Refactors the map file loading code by importing existing code from the
Vicis cache editor project.  Adds classes for decoding objects and tiles
for a given map file index. Only the new MapIndex decoder code is used
when loading GameObjects at the moment , which will later be updated.
2016-12-31 02:08:58 +00:00
Gary Tierney 43e522b1ba Update contributors guidelines 2016-03-12 13:39:47 +00:00
Gary Tierney f2aced1bca Add support for projectiles
* Adds support for short-lived entities, which are never added to the
  entity sets of the region they belong in.

* Adds support for checking the number of tiles a Mob occupies.

* Adds a ProjectileBuilder class to simplify creating projectiles.
2016-03-11 20:03:33 +00:00
Gary Tierney 5fe64215f6 Merge branch 'CharlesVaneenoo-useless_condition'
Closes #211
2016-02-12 20:22:43 +00:00
Gary Tierney bea2e61b27 Add a heuristic using euclidean distance for cost 2016-02-09 23:41:15 +00:00
Gary Tierney 1ef364beb8 Fix missing direction in a* traversable call 2016-02-09 23:39:17 +00:00
Gary Tierney 51728168e9 Add developer information section to README 2016-02-06 20:10:20 +00:00
Gary Tierney 4c9fab4fcd Merge branch 'WizardJesse1-patch-11'
Closes #141
2016-01-31 23:37:59 +00:00
Gary Tierney 4874ddaa90 Add travis build config and update .gitignore 2016-01-25 22:26:32 +00:00
Gary Tierney bd63144d53 Fix actions continuing when equipping 2h swords 2015-12-23 23:04:05 +00:00
Gary Tierney 68db45e9d3 Correct the height levels of steps in a path
Makes sure that the steps in a path sent for a "Player Walk" message are
on the same level as the players current position while being processed
in the walking queue.
2015-12-22 03:56:38 +00:00
Gary Tierney ef740b36e0 Fix short circuit logic in ItemDefinitionDecoder
* Replaces an OR, with what should have been an AND while decoding
  unused item definition info.
2015-12-21 04:03:26 +00:00
Gary Tierney 2ee5a7cf7b Call executor.shutdown() to run tasks 2015-10-03 23:31:29 +01:00
Gary Tierney 9abed472e9 Handle errors thrown by SynchronousDecoder tasks
Check for errors thrown execution of any SynchronousDecoder tasks, and
rethrow any ExecutionExceptions as SynchronousDecoderExceptions.
2015-10-03 23:20:05 +01:00
Gary Tierney e9c33534a6 Add .editorconfig file to override IDE defaults
Add rules for enforcing tabs in Java, and spaces in Ruby.

Add a rule to make sure trailing whitespace is trimmed
and that no new final newline is inserted.
2015-09-19 15:18:14 +01:00
Gary Tierney 80be2691ca Remove ItemVerificationHandler test to account for #32 2015-09-13 16:06:20 +01:00
Gary Tierney c65d533288 Add tests around ItemOnObjectVerificationHandler
Add various tests around ItemOnObject messages to verify that a valid
object needs to be given as well as a valid item in order for the
message to be passed down the MessageHandlerChain.
2015-09-13 02:20:37 +01:00
Gary Tierney 15f5d4a36e Change @BeforeClass to @Before to prevent tests failing 2015-09-13 01:46:59 +01:00
Gary Tierney a21b6581d6 Move powermock to bottom of pom, change junit scope to test 2015-09-13 01:46:41 +01:00
Gary Tierney 0c074bd123 Add tests around ObjectActionVerificationHandler
Add a test which verifies an ObjectActionMessage is terminated if its
not within the specified distance of the player.

Additionally add a test which verifies that an ObjectActionMessage is
terminated if there is no object with the given id nearby.
2015-09-13 01:42:12 +01:00
Gary Tierney ef398dc098 Add a test around ChatMessageHandler, update imports
Update the previous ItemOnItemVerificationHandler test to use static
imports of PowerMockito and Assert.
2015-09-13 01:25:00 +01:00
Gary Tierney 82801df436 Add a test around the target of ItemOnItemMessage
Check that the message is terminated() if an ItemOnItemMessage
is received with an invalid target item.
2015-09-13 01:17:41 +01:00
Gary Tierney c9b702bcfb Get ItemOnItemVerificationHandlerTest passing 2015-09-13 01:14:04 +01:00
Gary Tierney a5f8b1f9fd Test messages with an invalid source are terminated 2015-09-13 01:08:11 +01:00
Gary Tierney 7dc45c0281 Add PowerMock JUnit module and Mockito API to pom 2015-09-13 01:07:19 +01:00