Right now you can outrun the single zombie no problem since he slows down as he gets closer. I think the way it is right now (it will need tweaking when there is more than 1 enemy) is fine, you can outrun the zombies but they always look like they will catch you.Robin wrote:Three things:
- Now I'm not sure what the issue was. Wasn't it the initial position of the enemy weird?
- You could change the if-statement to if not CheckCollision(player, enemy) then. It works the same, but you're less likely to get odd looks from others. Perhaps if you rename the function to hasCollision or isCollision or so it will make more sense?
- The enemy speed doesn't have an upper limit: the further they are away, the faster they will go. Off the top of my head, that will probably mean that:
- You can't outrun the zombies. Ever.
- Any horde will end up in one jumbling mess, since the ones at the back move faster than the ones in front.
The issue is this:
When dragging my "game folder" (the one containing main.lua etc.) onto the love shortcut it works fine, the exact way it was coded.
If I package the game as a ".love" the enemy oddly approaches from the left instead of the right? Though after some testing this doesn't happen every time, I think only times where the .love file has a name like "zombie_test_long_name.love" instead of just something like "zombie.love".
Solution?:
I was thinking that giving the player an ACTUAL starting value might help. Basically a freeze time since right now start position could be different every time (depending on the load time)
Another thing I found was that if I copy and paste the game folder (to create "game - copy"" and drag the COPY onto the love shortcut the same issue occurs, though after changing the name of the folder from "game - copy" to something smaller like "random" it works fine again. It's so weird lol
On an unrelated side-node: I almost lost this whole post since my internet "cut-out" luckily the back button let me copy it...