No problem - I would have tried it if I was at home, since it would have takenvery little time with the software I have there, but being away and using a borrowed PC means it would be more hassle than I am willign to get into right now.
Your right that I could do it myself. Somehow the fact that I could download it, in fact that I had allready downloaded it, skipped my mind... Sorry to have bothered you. ;)
An attempt to get multidirectional scrolling as smooth as possible.
Arrow keyes to turn/move.
The frame trims 60 pixels off each direction, reducing the size of the required sprites. Its not much, but every little helps performance.
There are 9 background sprites, each is 420x300 pixels, giving a total scrollable area is 1260x900 pixels.
Sprite locations are only updated when the sprite is on-screen, otherwise it hides.
When running in "programming" mode, its a bit jerky around the edges, but its really smooth in presentation mode - hopefully it will be equally smooth online!
If anyone can make suggestions to optimis the code further, please do.
Comments
You need to be logged in to post comments
Add a Comment
You should make it smooth by using velocity and set x velocity to x velocity times 0.09
(view all replies)Comment Reply
thanks mayhem! ive learned a lot about sidescrolling from u look (link to project).
(view all replies)Comment Reply
excellent, I'm sure this will be the basis for many projects!
(view all replies)Comment Reply
No problem - I would have tried it if I was at home, since it would have takenvery little time with the software I have there, but being away and using a borrowed PC means it would be more hassle than I am willign to get into right now.
(view all replies)Comment Reply
Your right that I could do it myself. Somehow the fact that I could download it, in fact that I had allready downloaded it, skipped my mind... Sorry to have bothered you. ;)
(view all replies)Comment Reply
Could you perhaps download my Rescue ship thing, extract the graphics and see if your scrolling works just as Jerkyless with my background?
(view all replies)Comment Reply
Very smooth. I can see this being part of a lot of games.
(view all replies)Comment Reply
Great Mayhem! Very smooth!
(view all replies)Comment Reply
Left/right arrow keys to rotate, Firward/Back keys to give the illusion of forwards/backwards movement.
(view all replies)Comment Reply
I don't believe it! Makes me wonder what I did that made it so damn jerky. Can it be the image size? *Downloads*
(view all replies)Comment Reply
what do I do??
(view all replies)Comment Reply