It is currently Mon Nov 20, 2017 7:50 pm

All times are UTC - 7 hours





Post new topic Reply to topic  [ 1386 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19, 20, 21 ... 93  Next
Author Message
 Post subject:
PostPosted: Sat Aug 27, 2011 4:26 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
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.


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 4:52 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
Image
In my head the top left of the screen/camera can make it to 255. Then wouldn't almost all of NameTable 1 be shown?


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 4:53 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
Then how do you scroll to the right of that nametable? By setting it as the main one, resetting your scroll, and then scrolling right again. I wish I could make gif's, as it'd be way easier to show than tell. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 5:06 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
3gengames wrote:
Then how do you scroll to the right of that nametable?

I dont want to scroll to the right of NameTable 1 right now.

3gengames wrote:
I wish I could make gif's, as it'd be way easier to show than tell. :)

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! :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 5:18 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
Okay, as long as you don't need to scroll to the right of the 2nd nametable, it should be fine then. :)


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 6:18 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
Ah ha! Ok, thanks 3gengames! :D


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 27, 2011 6:20 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
unregistered wrote:
Ah ha! Ok, thanks 3gengames! :D


Yep, and I have failed at making that GIF, heh. And same goes for the bottom, as long as you don't need to scroll past there, you're fine. :) Good luck.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2011 3:14 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
3gengames, thank you. :)
---

For sbc,
Code:
Operation: A - M - -C -> A
Note: -C = Borrow


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?


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2011 3:27 pm 
Offline
Formerly 65024U

Joined: Sat Mar 27, 2010 12:57 pm
Posts: 2257
Set subtract. Clear Add.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2011 3:30 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
3gengames wrote:
Set subtract. Clear Add.

Rock (yes)! :D Thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2011 5:12 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
Praise God!! :D 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! :D

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.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 28, 2011 5:31 pm 
Offline

Joined: Sun Sep 19, 2004 11:12 pm
Posts: 19237
Location: NE Indiana, USA (NTSC)
Make a game object called the "camera" and fix the scroll position relative to it.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2011 12:59 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
tepples wrote:
Make a game object called the "camera" and fix the scroll position relative to it.


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. :)


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2011 1:30 pm 
Offline
User avatar

Joined: Sat Feb 12, 2005 9:43 pm
Posts: 10116
Location: Rio de Janeiro - Brazil
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.


Top
 Profile  
 
 Post subject:
PostPosted: Mon Aug 29, 2011 2:28 pm 
Offline
User avatar

Joined: Thu Apr 23, 2009 11:21 pm
Posts: 803
Location: cypress, texas
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.


tokumaru, thank you! :D


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1386 posts ]  Go to page Previous  1 ... 15, 16, 17, 18, 19, 20, 21 ... 93  Next

All times are UTC - 7 hours


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group