-
Notifications
You must be signed in to change notification settings - Fork 555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Diamond iso #925
Open
airza
wants to merge
18
commits into
craftyjs:develop
Choose a base branch
from
airza:diamondIso
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Diamond iso #925
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Since we changed the method signature of Crafty.load, we should warn when people try to use the old syntax.
This adds a new grunt task `grunt api-server` that will serve the api documentation directly from `api.json`. Use `grunt view-api` to build the docs and then view them in your default browser. This copies over some scripts from the craftyjs.com repo, but perhaps there's a better way to share them.
…onal placement of tiles with intelligent Z calculation is now in place. Also methods for choosing tile based on pixel and pixels based on tile work better.
We had inconsistent conventions regarding @param and @returns tags - In some places, the description of the param/return value was continued across multiple lines - In many other places, the description of the method as a whole was place directly after such tags While the latter outnumbered the former, I think its useful to be able to have longer param/return descriptions split across multiple lines. So to allow this while not breaking the docs, this fixes all incidences of the second style. (This is probably also more readable when looking directly at the source.)
I went through and fixed a large number of small issues in our documentation. This includes typos, formatting problems, and some places where docs were obviously wrong or missing.
- Fixes a rounding issue when calculating the sign of negative fractions - Triggers NewDirection in the frame where the direction changes, instead of the next frame - Renames NewRotation to NewAngularDirection and fixes the same issues - Adds/fixes related tests
Add some in-line documentaiton, and tweak the wording of the API docs for the Motion component
Instead of adjusting the speed based on the frame rate, try to saty in sync with the game clock by using frame.dt. Note that speeds are in pixels per second. This is a breaking change, because it changes how we interpret speeds. (Pixels per second instead of pixels per frame.)
"Jumpway" is probably a bit confusing, even though it kind of makes sense in the context of Twoway and Fourway.
I don't think I squashed the commits right :s |
Okay, now the documentation at least isn't lying anymore. |
I pulled the latest changes, tested against the game I have in development. Doesn't break centerAt, has documentation, and adds new functionality! |
Is there anything I need to do in order to get this merged in? Haven't had the time recently to look at the newsgroup. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I think the documentation might need fixing, but you can do lots of cool new things. In particular, pathfinding (there is kind of an inefficient part of it that is O(n) in the size of the grid instead of O(1) though.). It checks for both empty tiles on the lower part of the grid as well as objects with the component "Obstacle" (There might be some way this can better conform with the rest of the library, but since 2d collision and grid collision don't work the same I wasn't sure.
Also, i made the simplifiying assumption that grids would be 1 ground level and 1 upper level for the purposes of placement and pathfinding - most of the code probably works in 3D for placement but that gets into some deep issues if we have no rotation method.
I've tested it a lot on my game in development, but that game doesn't really try to move the grid or do anything different than the square tiles.