Page 1 of 1
*Mysterious* gaps
Posted: Wed Oct 08, 2014 5:55 pm
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)
Re: *Mysterious* gaps
Posted: Thu Oct 09, 2014 5:05 pm
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
Re: *Mysterious* gaps
Posted: Thu Oct 09, 2014 6:29 pm
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.
Re: *Mysterious* gaps
Posted: Fri Oct 10, 2014 8:03 am
by PartyCow
Fixed by using cameras, basicly works the same, but works now. No clue what were wrong earlier.