Discussions

SmileBASIC Community

ClaytonDarkClay88

11/03/2016 2:09 AM ·Spoilers

Open Closed

I need your help again raimondz. xP

So, I used your camera code you helped me with earlier in a new game. I had two things. 1. How do you code BG collision with the camera? 2. How do I make it so, when I enter a new area, I start at the bottom of the camera and not the top left? If you could help, then thanks! :)

Advertisement

Comment

This post has no comments.

  • The camera that I made before has 4 variables: position x,position y, speed x and speed y. 2. Just change the variable X and Y. Then the camera will jump to that position on the next frame. 1. This is a bit tricky but you need to check all the tiles that will be overlapped by the boundaries of the camera.

    Yeahs0
    Played
  • I don't have the code that I gave you before. If you post the key, then I can write a function to detect collision between the camera and the background.

    Yeahs0
    Played
  • JK23NDJS When you run the game, move all the way up then you'll move to the area with your camera code. I haven't changed the camera yet. I didn't know what to change.

    Yeahs0
    Played
  • Ok, I've downloaded the key. I'll upload the changes tomorrow.

    Yeahs1
    Played
  • Ok, I manage to add limits with the camera and the player will start at the bottom of the map. I used metadata of where the map could be in the map instead of checking collision between the camera and the background because the later is slower. KEY: CE5VK3AJ

    Yeahs1
    Played
  • Also, you must avoid copy-paste. I saw that you did that for the player's actions. You should put those on a function instead. Else it'll be very tedious when you try to add new stuff for the player(Example: talk, open menu, etc).

    Yeahs1
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-EJ9-9E2K-VAR-JXJV

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: