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)
*Mysterious* gaps
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
*Mysterious* gaps
- Attachments
-
- main.love
- (572.39 KiB) Downloaded 160 times
Re: *Mysterious* gaps
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
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
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.
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.
Check out my blog on gamedev
Re: *Mysterious* gaps
Fixed by using cameras, basicly works the same, but works now. No clue what were wrong earlier.
Who is online
Users browsing this forum: No registered users and 14 guests