Quick Jump Daily Digest
Thank you for your interest in the Quick Jump Daily Digest. Get notified of all new content on QJ in our free Daily Digest. To subscribe, enter your email address below and click the subscribe button.
Moving Sprite Demo |
Listed in: Homebrew Applications, Homebrew Demos Tags: psp homebrews, yeldarb
Yeldarb has just provided some source code he has developed for the PSP. It's an arrow that one can
move around the screen. This requires an
external image, in this case 'arrow.png' and depends on the graphics.h header.
This program loads in a "sprite"
(in this case it's just a simple arrow icon). I have made four frames
of the sprite and put them all on the same image. The code splits
these into separate "images" in an array. Basically, it's a
way to get frames out of a single image (that way you don't have to
mess with a ton of different image files).
The different
frames in this case are different rotations of the arrow sprite. You
can control the arrow with the arrow buttons. Turn the trail of
arrows on and off with the triangle button. Left trigger slows down
the speed, right trigger slows it up. "X" is the gas
button.
Basically, by studying this source code (which,
admittedly, is very simple) you will know how to make a sprite travel
around the screen (bound by the edges), how to erase the image on
subsequent frames, how to control speed, and how to pseudo-rotate a
sprite.
Download: [Moving Sprite Source]
| This story sucks? This story rocks! |
|
|












Comments
sorry for my bad english.
Reply
Can't wait to see it in action
W@@T
Reply
can somebody help me??!
Reply
Reply
So this isn't a 'great' codesnippet, especially since it's basic c programming...
Reply
Sprite: Its what the psp was made for.
Reply
Reply
Reply
Reply