QJ.NET | Videos | Forums | iPhone | MMORPG | Nintendo DS | Wii | PlayStation 3 | PSP | Xbox 360 | PC | Downloads | Contact Us
Forums | Gaming News | Videos | Downloads | Today's Posts | Mark Forums Read | Chat | FAQ | Members List | Contact

QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides

Go Back   QJ.net Game Discussion - PSP, Xbox, Wii, PS3, PSP Homebrew, and PSP Guides > Developers Corner > PSP Development, Hacks, and Homebrew > PSP Development Forum
The above video goes away if you are a member and logged in, so log in now!

how do i really animate sometin...??

This is a discussion on how do i really animate sometin...?? within the PSP Development Forum forums, part of the PSP Development, Hacks, and Homebrew category; k i wanna animate something not self but have it move around on its own now i am using lua ...

Reply
 
LinkBack Thread Tools
Old 10-21-2005, 01:13 PM   #1

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Talking how do i really animate sometin...??

k i wanna animate something not self but have it move around on its own now i am using lua and there torturial is really confusing and i want it to be text or pic help would be appreciated

p.s. i figured out my problem and just use infranview to create my picture and i resized it for the psp!!

yea
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 02:53 PM   #2

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Its hard to animate in lua because u have to just keep blitting images to the screen I wish they would have video/ animation support :icon_wink
__________________
F.A.L.O?
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 03:01 PM   #3
 
Join Date: Oct 2005
Posts: 6
Trader Feedback: 0
Default

Quote:
Originally Posted by Twenty 2
Its hard to animate in lua because u have to just keep blitting images to the screen I wish they would have video/ animation support :icon_wink
I don't know how Lua works, but couldn't you just write a function to achieve the animation of an image?

Doesn't seem that hard to me, even while blitting.
yungb is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 03:03 PM   #4

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Still have to blit a bunch of images though...
__________________
F.A.L.O?
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 03:33 PM   #5

Developer
 
slicer4ever's Avatar
 
Join Date: Jul 2005
Location: everywhere
Posts: 3,357
Trader Feedback: 0
Talking

k thanks
__________________
1. Failed....again...
2. http://slicer.gibbocool.com/ stay updated on all my projects
slicer4ever is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 07:15 PM   #6
 
XteticX's Avatar
 
Join Date: Jun 2005
Location: script.lua
Posts: 426
Trader Feedback: 0
Default

No need for multiple images. Why not just blit the image once, and change its value? Make the animation as a function, and have a timer, that way you can specify when where and what you want the image to do. Example:

Code:
sad=Image.load("sad.png")
happy=Image.load("happy.png")
neutral=Image.load("neutral.png")

picture=neutral
timer=0

function animation()
timer=timer+1
   if timer>=2 and timer<=4 then picture=happy
   elseif timer>=5 and timer<=7 then picture=sad end
   if timer>=8 then timer=0 picture=neutral end
end

while true do
   if pad:cross() then animation() end
   screen:blit(300,100,picture,true)
   screen.waitVblankStart()
   screen.flip()
end
I did this rather quick, but you should get the idea. Blit is only called once and refreshed in the loop. Cleen , simple. Good luck on your program.
XteticX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 07:16 PM   #7

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by XteticX
No need for multiple images. Why not just blit the image once, and change its value? Make the animation as a function, and have a timer, that way you can specify when where and what you want the image to do. Example:

Code:
sad=Image.load("sad.png")
happy=Image.load("happy.png")
neutral=Image.load("neutral.png")

picture=neutral
timer=0

function animation()
timer=timer+1
   if timer>=2 and timer<=4 then picture=happy
   elseif timer>=5 and timer<=7 then picture=sad end
   if timer>=8 then timer=0 picture=neutral end
end

while true do
   if pad:cross() then animation() end
   screen:blit(300,100,picture,true)
end
I did this rather quick, but you should get the idea. Blit is only called once and refreshed in the loop. Cleen , simple. Good luck on your program.
O i thought he ment like literaly move across the screen...
__________________
F.A.L.O?
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 07:30 PM   #8
 
XteticX's Avatar
 
Join Date: Jun 2005
Location: script.lua
Posts: 426
Trader Feedback: 0
Default

Quote:
Originally Posted by Twenty 2
O i thought he ment like literaly move across the screen...
Hehe. I read fast so I might of misunderstood. But hey , he can do that too.


Code:
if timer>=2 and timer<=4 then
... then what ever you please.
XteticX is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:28 PM   #9
 
Sir Crx's Avatar
 
Join Date: Jul 2005
Posts: 108
Trader Feedback: 0
Default

If you animate by blitting will it look choppy? Is there a way to avoid that if it does?
Sir Crx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:31 PM   #10

Developer
 
Join Date: Jun 2005
Location: At my house...
Posts: 885
Trader Feedback: 0
Default

Quote:
Originally Posted by Sir Crx
If you animate by blitting will it look choppy? Is there a way to avoid that if it does?
Yeah read xteticx's posts :icon_wink
__________________
F.A.L.O?
Twenty 2 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:37 PM   #11
 
Sir Crx's Avatar
 
Join Date: Jul 2005
Posts: 108
Trader Feedback: 0
Default

No im talking about what you mean. By making something move across the screen. If I wanted to make it look nice, would it have that refresh/choppy look?
Sir Crx is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 10-21-2005, 09:49 PM   #12
 
sumpaintballer41's Avatar
 
Join Date: Jul 2005
Location: Ware, MA
Posts: 868
Trader Feedback: 0
Default

FOr an example of a smooth transition, look no further than PSP air hockey...that menu is loaded using a series of images not a video...It uses 20 images for an approxiamte 3 sec 'video' all that happened was they shaded a picture of 'THIS GAME WAS SCRIPTED IN LUA" and made it darker each photo. Hope this helps
__________________
Cover your eyes and run...
gmansixfo= STEPMANIA LEGEND!!
Halo2 Gamertag~PSPH4X0R

7/17/06
~The Day My PSP Almost Died~
Thank you
GrandTheftAutoJunkie
sumpaintballer41 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply

Tags
animate , sometin

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off



All times are GMT -8. The time now is 04:06 AM.



Use of this Web site constitutes acceptance of the TERMS & CONDITIONS and PRIVACY POLICY
Copyright © 2009, QJ.NET. All Rights Reserved.
Contact Us