egordorichev / LastTry

:deciduous_tree: LastTry is open-source game written in Java, using LibGDX library and inspired by Terraria :deciduous_tree:
MIT License
119 stars 17 forks source link

Movement fixes + improvements / Tiny DroppedItem changes #78

Closed Col-E closed 7 years ago

Col-E commented 7 years ago

Whats Changed:

Whats Fixed:

Bloopers:

I messed up these movement fixes a bunch of times. Here's a few of them:

Col-E commented 7 years ago

Do not merge yet. A few more things need fixing.

Edit: As of c959c71: Feel free to merge

egordorichev commented 7 years ago

Big thanks! Movement is always triky ;) One thing i found in changed files, is that the spawn command description tells: "spawns in an entity". Thats totaly fine, but the code ask Enemies class to do that. Probably, Enemies should becomd creatures and handle CreatureWithAI. Thats my error. Sorry. Will update that system, when will be back.

Col-E commented 7 years ago

Movement sure is a real pain to get just right. Spent pretty much all day trying to fix these bugs. But now I can finally close https://github.com/egordorichev/LastTry/issues/75

Col-E commented 7 years ago

The one disappointing thing is that the fix makes going up steps kinda jarring now. The easy solution would be to have a camera that lags a little bit behind and moves into position rather than constantly being perfectly centered at the player. Kinda like a sonic the hedgehog game.

This better solution will be way more painful. Look at how Terraria's looks.

egordorichev commented 7 years ago

That can be done easily. Camera moves werid because of int / floats.

Col-E commented 7 years ago

The issue is the camera modification is the easy fix. An even better movement implementation would be the best option.

Col-E commented 7 years ago

Working on smoothing out motion while keeping the fixes in place.

Smoothing is working out nice, but now I can't move in tight places anymore. Looking for a compromise.

Edit: Got smoothing and kept the fixes in place vs. current non-smooth step

egordorichev commented 7 years ago

Finaly, i'm here!