Advanced Tile Loader + camera
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Advanced Tile Loader + camera
While I understand the general concept how a "camera" should work, I do not understand how to implement it with Advanced Tile Loader. How to "tie" them together, so that the collision would work and the player's movement would be synchronized with the map's scrolling.
If you're going to reply to my post, consider posting an (preferably working) example - 99.7% of time time, I already know how to implement the feature theoretically! I don't learn very well from references, etc....
- Roland_Yonaba
- Inner party member
- Posts: 1563
- Joined: Tue Jun 21, 2011 6:08 pm
- Location: Ouagadougou (Burkina Faso)
- Contact:
Re: Advanced Tile Loader + camera
Well, a bit of searching can bring you answers.
Did you go through the examples of use for AdvTiled Loader ?
See Desert_Example, watch out global.tx/global.ty variables, and the push(), translate() and pop() methods.
This tutorial on cameras should help, too.
Did you go through the examples of use for AdvTiled Loader ?
See Desert_Example, watch out global.tx/global.ty variables, and the push(), translate() and pop() methods.
This tutorial on cameras should help, too.
Re: Advanced Tile Loader + camera
I did. I can scroll the camera with set keys, but I want it to scroll with the player. That's the point of this thread - I cannot tie them together, the player AND the tilemap.Roland_Yonaba wrote:Well, a bit of searching can bring you answers.
Did you go through the examples of use for AdvTiled Loader ?
See Desert_Example, watch out global.tx/global.ty variables, and the push(), translate() and pop() methods.
This tutorial on cameras should help, too.
If you're going to reply to my post, consider posting an (preferably working) example - 99.7% of time time, I already know how to implement the feature theoretically! I don't learn very well from references, etc....
Re: Advanced Tile Loader + camera
Update the camera position each frame to playerX and playerY.
- dreadkillz
- Party member
- Posts: 223
- Joined: Sun Mar 04, 2012 2:04 pm
- Location: USA
Re: Advanced Tile Loader + camera
There are camera libs that you can check out from searching. If you don't want to use them, check their codes to get an idea of how it works.
Re: Advanced Tile Loader + camera
I got it working... But I have no idea why it works, it seems as if there's something either missing or too much.
Well, if something won't work, I'll ask for help with my code then. For now, I'm okay with this.
Well, if something won't work, I'll ask for help with my code then. For now, I'm okay with this.
If you're going to reply to my post, consider posting an (preferably working) example - 99.7% of time time, I already know how to implement the feature theoretically! I don't learn very well from references, etc....
Who is online
Users browsing this forum: Bing [Bot] and 4 guests