The Daily Click ::. Forums ::. Klik Coding Help ::. Fast Scrolling?
 

Post Reply  Post Oekaki 
 

Posted By Message

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
3rd June, 2004 at 15:28:48 -

I'm working on a new platform engine focusing on speed. The player can move anywhere from 6 to 15 pixels per TGF event loop (3 + 3 * Speed), with all collision detection and movement done in fastloops. I am currently using the following scrolling method:
Always set Y position of "Scroller" to Y position of "Player"; If player is facing right + scroller's X position < Player's X position + 100, add 6 to scroller's x position; If player is facing left + scroller's X position > Player's X position - 100, subtract 6 from scroller's x position.
The player sprite (actually made up of 5 diff active objects) shimmers like crazy when the screen scrolls, but it's fine when it moves without scrolling. How can I fix this?

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

Klikmaster

Master of all things Klik

Registered
  08/07/2002
Points
  2599

Has Donated, Thank You!You've Been Circy'd!VIP MemberPS3 Owner
3rd June, 2004 at 18:06:25 -

If you use always conditions to set the body parts together, you might want to change it so that you set the positions on the fastloop, otherwise the objects will drift apart slightly

 
n/a

Kramy



Registered
  08/06/2002
Points
  1888
3rd June, 2004 at 18:07:25 -

If it's just one piece shimmering, try positioning the pieces from a central something.(invisible block?)

Then they might all shimmer at once, hiding the shimmering....but if not, maybe one of the scrolling methods from my Scrolling Methods download could help?

Edit: Shameless plug. http://www.create-games.com/download.asp?id=4407

Image Edited by the Author.

 
Kramy

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
3rd June, 2004 at 18:38:40 -

No, I move all pieces at once in the fastloops. The arms and feet move when walking, but keep the same relative positions when jumping. By shimmer, I mean the active objects flicker; they appear to move back and forth fast enough to make both "instances" semitransparent. Just the hands seem to flicker at low speeds, but all the character's active objects flicker at once at higher speeds. This flickering only happens when the frame scrolls. I tried the platform scroll (look further in the direction you're facing), a simple center at (0,0) from the torso, and a platform scroll where the scrolling object is moved in the x movement fastloop, the screen is centered, and the frame redrawn, but it still shimmers.

Image Edited by the Author.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames

Noyb



Registered
  31/05/2004
Points
  1117

VIP Member
3rd June, 2004 at 19:08:45 -

Oops. I just realized that it only flickered when walking, not when jumping (the same loops handle horizontal movement for both.) I looked through my code, and, sure enough, for some idiotic reason I told TGF to only move the parts if the character WASN'T walking. D'oh. It works now...except for slopes. Thanks for your help.

Image Edited by the Author.

 
"Omg. Where did they get the idea to not use army guys? Are they taking drugs?" --Tim Schafer on originality in videogames
   

Post Reply



 



Advertisement

Worth A Click