Hi,
Could you upload the .love? Everything looks fine on a quick cursory search, but I have some questions/notes:
- All the functions where you give the camera an x and y position (except :setWorld), those x and y positions are for the center of the camera.
- When is the function love.draw/UpdateScene called?
- What are the values of campos?
Brady- A Camera Library with Parallax Scrolling
Re: Brady- A Camera Library with Parallax Scrolling
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Of course, here it is, and thank you for your help. There are blocks between the rooms and in the platform.lua I get in these coordinations in the campos table.
- Attachments
-
- MV platformer.love
- (1.22 MiB) Downloaded 165 times
Re: Brady- A Camera Library with Parallax Scrolling
Hey- I think the error might be related to STI- try updating to the newest version.
The newest version of STI requires you change your map type. I'm fairly certain this is the source of the error. If it still occurs upon updating, let me know.
The newest version of STI requires you change your map type. I'm fairly certain this is the source of the error. If it still occurs upon updating, let me know.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
I updated (STI and Tiled too) but the problem still occur. I'm not sure what you meant by "map type" but I tried every layer format and nothing changed.
Re: Brady- A Camera Library with Parallax Scrolling
Could you upload the newest .love?
Thanks
Thanks
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Nothing changed really beside sti and the map file, but here it is.
- Attachments
-
- MV platformer.love
- (1.22 MiB) Downloaded 134 times
Re: Brady- A Camera Library with Parallax Scrolling
Hey, I can't seem to figure out what the problem is. Sorry.
Give me some time to look over it some more.
Give me some time to look over it some more.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Alright, I figured out the problem:
STI is using canvases to draw the map. This is good for speed, but not so good for the camera. If you comment out lines 760 and 774 of STI/map.lua, it will work.
*edit: Added a basic working example
STI is using canvases to draw the map. This is good for speed, but not so good for the camera. If you comment out lines 760 and 774 of STI/map.lua, it will work.
*edit: Added a basic working example
- Attachments
-
- BWE.love
- (35.54 KiB) Downloaded 161 times
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Re: Brady- A Camera Library with Parallax Scrolling
Thank you for your help. Shouldn't cam:adjustscale put the camera's picture on the whole window? I wroted poorly and I'm so sorry for that but the problem was the blue rectangle from the first picture is not the whole picture on the screen
Re: Brady- A Camera Library with Parallax Scrolling
No, what you have is working how it should in terms of that. Check out the documentation for camera.new.
Also, :adjustScale keeps the scaling of the camera within the world boundaries.
Also, :adjustScale keeps the scaling of the camera within the world boundaries.
GitHub | MLib - Math and shape intersections library | Walt - Animation library | Brady - Camera library with parallax scrolling | Vim-love-docs - Help files and syntax coloring for Vim
Who is online
Users browsing this forum: No registered users and 2 guests