This is very nice (although I wish more people would add 16:9 ratios)!
There is one issue though, and I think I know how to fix it. Your movement collision seems to merge both axis, making it so that if you are colliding on one direction, you can't move on any axis (I call it the 'sticky wall effect'). I assume you are checking like this in your movement code:
if(no_collision_x && no_collision_y)
What you need to do is make 2 if statements:
This way, movement won't be so difficult for the player.
I could not read your code, so this may not be how you check, but I reccomend you check out kevglass' tutorial on TileMaps
, in which he covers collision logic way better than I ever could
Thanks for the feedback.
I explain to you. The world is a toroid world, see "image", so first we have "two rects" to go to the same point and there is no borders.
Each tile have the collision issue. I detect a collision using a group of 2x2 tiles
(If there is a collision with
any of the entities
inside of them) and the tile where we go
, if it is walkable or not
. So first, I do a movement, then I detect the collision (tile colission or entity collision), if there is a collision, I undo the movement.
Your idea sounds great, but there will be 2 "ticks" rather than one (I will think about it). I use Graphics2D as library and it is too slow, I know, so I can not put more than a HD resolution because the framerate goes down of 60 fps and I love 16:9 ratio.
I am not a programmer, I am just a mathematician student, and I'm trying to improve this game little by little. As I said in description, the graphics are provisional, I think I will do it in the end. I prefer improve the performance and the fun, and then, I'll put my own graphics.