8x16 and whatever else unreg wants to know
Moderator: Moderators
When you're "camera" moves the screen, once you hit the nametable, how will you scroll to the right more? To do that, you must set the main nametable to be the one you're scrolled onto all the way, because to scroll across it more, it has to be the main table since you can't scroll anymore if you set the scroll to the max.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
I dont want to scroll to the right of NameTable 1 right now.3gengames wrote:Then how do you scroll to the right of that nametable?
oooh well I just used bunnyboy's graphic from this page. Just copied it over from there to my web account server... You can make gif's. Try the gimp!3gengames wrote:I wish I could make gif's, as it'd be way easier to show than tell.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
3gengames, thank you.
---
For sbc,
I have clc right before sbc... but since -C is the Borrow it seems, to me, that it is really ¬C. So my idea is to sec instead. (I'm trying to clear the borrow.) What do yall think?
---
For sbc,
Code: Select all
Operation: A - M - -C -> A
Note: -C = Borrow
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Praise God!! The screen scrolls right when our lady travels right close to the edge of the screen!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Thank you so much tepples and 3gengames and tokumaru and booker and Kasumi and Bregalad and Shiru!
I also have a question to ask: How do I make it so that the screen scrollls over the same speed as our lady travels? Right now she reaches the right side of the screen before she makes it to the end of NameTable 1.
I also have a question to ask: How do I make it so that the screen scrollls over the same speed as our lady travels? Right now she reaches the right side of the screen before she makes it to the end of NameTable 1.
Last edited by unregistered on Sun Aug 28, 2011 9:11 pm, edited 1 time in total.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
Ok I created a byte called "Camera". Now there's 2 variables that are similar to Camera: oX and scroll. I should move both the screen and the character by Camera, right? Should Camera be 16bits so it can keep track of what nametable it is on? Here is good camera discussion.tepples wrote:Make a game object called the "camera" and fix the scroll position relative to it.
Your camera coordinates should be 16-bit. /since your game only scrolls horizontally, you only need a "CameraX" variable, because "CameraY" would always be 0.
You should make the camera follow the player using whatever logic you see fit. Some games move the camera by the same amount as the player every frame, others move it only if the player has gone past a certain point. No matter what rules you use, the camera must always follow the player.
The coordinates of the camera can be directly used to set the scroll, you don't need more variables for that. Another important thing is that the coordinates of the sprites must be calculated by subtracting the coordinates of the objects by the coordinates of the camera. With scrolling, object coordinates can no longer be used directly as sprite coordinates, because they are relative to the level and not the screen. That subtraction does the convertion from level coordinates to screen coordinates.
You should make the camera follow the player using whatever logic you see fit. Some games move the camera by the same amount as the player every frame, others move it only if the player has gone past a certain point. No matter what rules you use, the camera must always follow the player.
The coordinates of the camera can be directly used to set the scroll, you don't need more variables for that. Another important thing is that the coordinates of the sprites must be calculated by subtracting the coordinates of the objects by the coordinates of the camera. With scrolling, object coordinates can no longer be used directly as sprite coordinates, because they are relative to the level and not the screen. That subtraction does the convertion from level coordinates to screen coordinates.
-
- Posts: 1318
- Joined: Thu Apr 23, 2009 11:21 pm
- Location: cypress, texas
tokumaru, thank you!tokumaru wrote:Your camera coordinates should be 16-bit. /since your game only scrolls horizontally, you only need a "CameraX" variable, because "CameraY" would always be 0.
You should make the camera follow the player using whatever logic you see fit. Some games move the camera by the same amount as the player every frame, others move it only if the player has gone past a certain point. No matter what rules you use, the camera must always follow the player.
The coordinates of the camera can be directly used to set the scroll, you don't need more variables for that. Another important thing is that the coordinates of the sprites must be calculated by subtracting the coordinates of the objects by the coordinates of the camera. With scrolling, object coordinates can no longer be used directly as sprite coordinates, because they are relative to the level and not the screen. That subtraction does the convertion from level coordinates to screen coordinates.