MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
 Post subject: Scrolling?
PostPosted: Sat 14 Apr, 2007 9:31 pm 
Offline
Regular Member
User avatar

Joined: Wed 06 Dec, 2006 2:20 am
Posts: 81
Location: Tokyo, Kanto, Japan
I have a question about xLib. I understand how to scroll the screen but, it seems to have trouble scrolling farther than 7 x 11. I am trying to make a platformer but I can't go to other parts of the map and I can't get CreateTileMap to draw one part of a larger matrix.

Any suggestions or advice?

Thanks,
ProphetsDementia

(P.S. My new project is called Kaze no Tsuraga (pronounced Ka-say NO Sue-ra-ga) AKA Tsuraga of the Wind.)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 15 Apr, 2007 3:56 am 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
Make sure you have a variable that is used for the changing of the screen, where you change your X_Offset and/or Y_Offset.
Code:
real(2,Matrice_Name,X_Offset,Y_Offset,MapWidth,MapHeight,ScreenStartX,
ScreenEndX,ScreenStartY,ScreenEndY,mPIC_Num,Tile_Method,Tile_Size,Map_UpdateLCD


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 15 Apr, 2007 8:10 am 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
If you want smooth scrolling you'll have some more work to do.. Do you need smooth scrolling? I'm not 100% sure how it works though..

anyway, you should have checks to see that you don't start at a negative place and that you won't 'go over the edge' at the right and bottom sides.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sun 15 Apr, 2007 7:58 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
Smooth scrolling is not something I would incorporate into basic.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Mon 16 Apr, 2007 3:00 pm 
Offline
Calc King

Joined: Sat 05 Aug, 2006 7:22 am
Posts: 1513
neither would I, but it is ProphetsDementia's project


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Aug, 2007 4:21 am 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
Location: Through the Aura
Smoothscrolling can be done decently with xlib, actually. Just buffer your tilemap into pics first. The main problem is that displaying and scrolling very large (i.e., screen-sized) sprites is somewhat buggy at the moment.

Yes, your friendly neighborhood dysfunction is back. Sort of.

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Aug, 2007 3:00 pm 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
dysfunction wrote:
Yes, your friendly neighborhood dysfunction is back. Sort of.

Good to see you are back, and you are right..Check out the SS from this sub forum, and you will find a pic of tr1p1ea showing a girl from FF which is smooth scrolling I believe (if it is not you could do 2 pixel scrolling).


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Aug, 2007 3:39 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
Image

Theres the screenie :).

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu 30 Aug, 2007 5:55 pm 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
Location: Through the Aura
Actually I never got around to asking you, tr1p, but one thing has been bugging me. When scrolling sprites with overwrite logic, why is it necessary to clear the screen each frame before drawing the sprites to prevent weird lines from showing up?

Also, I need to get around to giving you code to demonstrate the whole stuff-only-appearing-off-the-edge-of-the-screen-when-aligned-when-scrolling-horizontally -with-ld-logic thing. Let me upgrade to the latest version and make sure it still happens...

Also while I'm sort of on the subject, I've got one more feature request (poor tr1p). With some sprite libraries (including, iirc, the original xlib), when you moved a sprite partially off the screen it would wrap back around on the other side. Would it be possible to have that as an option? It would be very useful for repetitive scrolling backgrounds. That way you would only have to be displaying a single 96x64 sprite, rather than 2 (if only scrolling vertically or horizontally) or 4 (if scrolling BOTH vertically and horizontally).

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 31 Aug, 2007 12:58 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
The 'wrapping horizontally' wasnt wrapping at all, it was due to the fact that the sprite routine wasnt a clipped one. If you look carefully you will notice that if you go off the right edge, it will appear 1-pexil further down on the left when it wraps. This is actually a problem and the sole reason why we have 'clipped' sprite routines since if you were to move off the bottom-right edge, you would overwrite memory that you shouldnt when it wraps down.

_________________
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 31 Aug, 2007 3:09 pm 
Offline
Calc Master
User avatar

Joined: Wed 22 Dec, 2004 3:07 am
Posts: 1454
Location: Through the Aura
Ah, I see. And actually, strike my last about scrolling screen-sized sprites being buggy. The issue doesn't seem to appear anymore.

_________________
Image


"You're very clever, young man, but it's turtles all the way down!"


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri 31 Aug, 2007 8:59 pm 
Offline
Calc King
User avatar

Joined: Mon 20 Dec, 2004 6:47 pm
Posts: 2286
Location: Quebec (Canada)
darn I am almost tempted to post this pic on my forum, but I'm sure invisionfree will claim it's porn and delete my board <_<

_________________
ImageImage
Bandcamp|FB|Youtube|Twitter


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Sat 01 Sep, 2007 1:40 am 
Offline
Calc King
User avatar

Joined: Sat 18 Dec, 2004 6:46 am
Posts: 2932
DJ Omnimaga wrote:
darn I am almost tempted to post this pic on my forum, but I'm sure invisionfree will claim it's porn and delete my board <_<

Nah, but it would be a nice avatar ;)..


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


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:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt