problem with offset or something else idk help please?

General discussion about LÖVE, Lua, game development, puns, and unicorns.
Post Reply
User avatar
anavsky
Prole
Posts: 1
Joined: Mon Sep 09, 2019 3:24 am

problem with offset or something else idk help please?

Post by anavsky » Mon Sep 09, 2019 3:37 am

Hi guys

This is my first game ever, my friend and I did it in a gamejam a year ago and I decided to finish since we couldn't make it work. My friend did most of the code, but now I'm making it. The goal is to make Peter (the fish) collect starfish. When Peter is in the same position of the starfish, you get a point and the starfish moves to a random location

After trying for so long to make that happen, I manage to get the starfish to move when Peter touches it by changing some values in his offset, however, now Peter can't get to the corner of the screen.

If I put the offset of Peter back to the values my friend set, the starfish will only move if Peter doesn't actually touch it.

Here's how the game is now.
peter.love
Any tips, please?

steVeRoll
Party member
Posts: 102
Joined: Sun Feb 14, 2016 1:13 pm

Re: problem with offset or something else idk help please?

Post by steVeRoll » Tue Sep 10, 2019 7:36 pm

Hi and welcome to the forums!
It seems there was a problem when you uploaded the file. I only see the attachment's name, but not the file itself.
Could you try uploading the file again? We will be able to help you if you send your code.

User avatar
raidho36
Party member
Posts: 1858
Joined: Mon Jun 17, 2013 12:00 pm

Re: problem with offset or something else idk help please?

Post by raidho36 » Tue Sep 10, 2019 10:54 pm

Seems like your problem is that the starfish is allowed to spawn outside of reachable area. Currently your coordinates are limited by the size of the screen (presumably); simply limit the coordinates where the starfish is allowed to spawn to be within reachable area.

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 5 guests