*Mysterious* gaps

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
PartyCow
Prole
Posts: 18
Joined: Sat Nov 17, 2012 3:12 pm

*Mysterious* gaps

Post by PartyCow »

Hey people.

I'm doing some 'procedurally generated' stuff to make it look like you are constantly moving forward.
Although it for some reason generates improperly after making the startup screen, creating a gap inbetween every pillar.

No clue why it does this, so help appriciated.

(Imagine there's an image here, but instead of me putting it here, you can just run the .love)
Attachments
main.love
(572.39 KiB) Downloaded 160 times
User avatar
artofwork
Citizen
Posts: 91
Joined: Mon Sep 15, 2014 1:17 am
Location: East Coast USA

Re: *Mysterious* gaps

Post by artofwork »

You might have not gotten a response yet because your code is not exactly commented well, yes some of your code is commented but it doesn't exactly tell us what your trying to accomplish.

Even the description of the problem your having isn't exactly clear.

Although I can guess, but I got better things to do :P
User avatar
micha
Inner party member
Posts: 1083
Joined: Wed Sep 26, 2012 5:13 pm

Re: *Mysterious* gaps

Post by micha »

I don't have a quick solution for your gap problem, but a general concern. If you fix this, most probably the gaps will disappear, too.

The concern is that you use setX on the physical shapes to move them. What you should try instead is moving the camera. At the moment the collision resolution is not working correctly. The ball is jumping around in a chaotic manner. This is probably caused by moving the barriers instead of moving the camera.

To fix this, keep the barriers in their place and instead move the ball and the camera. That will also make the generation of new barriers easier, because their coordinates are absolute.
PartyCow
Prole
Posts: 18
Joined: Sat Nov 17, 2012 3:12 pm

Re: *Mysterious* gaps

Post by PartyCow »

Fixed by using cameras, basicly works the same, but works now. No clue what were wrong earlier.
Post Reply

Who is online

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