Log In  
Log In  

Cart [#10151#] | Code | 2015-04-23 | No License | Embed

This is just me trying to learn how to use the map data. That tempting "door" at the top doesn't work yet.

P#10152 2015-04-23 11:49 ( Edited 2015-06-08 00:04)

Can you please explain how does collision works.
I been looking at your code but can't figure it out.

P#11149 2015-06-06 12:56 ( Edited 2015-06-06 16:56)

@digitalmonkey: Johnicholas has made a "clear?" function (top of the code) which is used in the update function to check (mget) if the map has a specific sprite (ID 2) at the new position (after button processing). This is done 4 times for all 4 directions in the clear(x,y) function. In the update function the code first checks if the new position in x and y direction is clear (to walk). If not then it tests the new x and y positions separately and applies what is clear (walkable).
I hope that helped.

Happy coding!

P#11173 2015-06-07 20:04 ( Edited 2015-06-08 00:06)

[Please log in to post a comment]

About | Contact | Updates | Terms of Use
Follow Lexaloffle:        
Generated 2019-05-21 08:58 | 0.025s | 4194k | Q:25