-
Notifications
You must be signed in to change notification settings - Fork 13
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
Fix 107 Merge River Deltas into Tilemaps #433
base: pcen/use-tilemaps
Are you sure you want to change the base?
Fix 107 Merge River Deltas into Tilemaps #433
Conversation
…t trying to keep diff small
add Camera2D test drawing units in word coordinates wip simplify unit sprite test demo - AnimationManager could be simpler but trying to keep diff small enable pixel snapping - removes world seams render roads in tilemap add logic for drawing rails on tilemap - missing separate layer working rails layer simple abstraction for loading atlas sources add resources and clear cells when empty track net lines changed working rivers separate notion of layer and atlas in MapView add mountains get rid of incorrect y offsets (tiles are already centered) offset is necessary for oversized tiles... add volcanos single terrain overlay add full left skirt to terrain layer detect edges of map in world space fix bad bounds for forest tiles and use full resource tileset wip tile set loader so specific assets can be overwritten in the future add marsh to tilemap terrain overlay layer camera can center on tiles buildings on tilemap remove ported code load goodyhut pcx pixel perfect transforms dedupe code enable Y sort for each tilemap layer kinda working animations wip wip working sprite animations render best defender on top of unit stack significantly faster animation loop when only doing visible tiles draw cursor remove ported code
The way the TileMap renders terrain is terrainTilemap is offset such that it renders the base terrain at the intersection of 4 tiles, so it is offset from tilemap which renders everything else such as hills and forests that fall on a tile. This is done because the terrain that should be rendered on each tile is 4 corners from terrain pcx tiles. I'm not sure how rivers are rendered but it's likely that they could be added as another layer in terrainTilemap? |
I don't think it's really possible to set the offset of a tile in a TileMap - the
The last parameter is passed into the loader, and eventually gets assigned to |
@benskywalker have you or can you check the selection logic against the Java code linked to in #107 ? I think that's the best reference we have. |
I haven't, but I'll get on that once I've got some more dev time |
62c2795
to
4f78192
Compare
This PR will merge the river deltas into tilemaps. It also fixed a problem where the tilemaps branch never showed any rivers. There's still work to be done; currently the deltas will often show up in the ocean or on a land tile. I should check for river directionality, which will be somewhat more complex