forums.ps2dev.org Forum Index forums.ps2dev.org
Homebrew PS2, PSP & PS3 Development Discussions
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Slide image from x, y -> x2, y2

 
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development
View previous topic :: View next topic  
Author Message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Thu Apr 03, 2008 7:05 am    Post subject: Slide image from x, y -> x2, y2 Reply with quote

Hi,

I have searched everywhere, but cant find any thread about it.

How do i slide an image from 1 point (x, y) to another (x2, y2) ?
It has to be SLIDING.
I known how to blit images, etc.

Tnx in advance !


Last edited by Question_dev on Thu Apr 03, 2008 8:02 am; edited 1 time in total
Back to top
View user's profile Send private message
hibbyware



Joined: 28 Mar 2007
Posts: 78

PostPosted: Thu Apr 03, 2008 7:23 am    Post subject: Reply with quote

You don't know how to do that?

If not then you are seriously in the wrong forum,
Back to top
View user's profile Send private message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Thu Apr 03, 2008 7:36 am    Post subject: Reply with quote

Haha, 2nd april, funny. . . NOT

Sorry, but i'm a beginner. I've learned c a bit, and now i'm trying to code this, but can't figure it out. .

Tnx in advance
Back to top
View user's profile Send private message
hibbyware



Joined: 28 Mar 2007
Posts: 78

PostPosted: Thu Apr 03, 2008 7:42 am    Post subject: Reply with quote

I think that's the point your missing this is not a beginners help forum,

These type of questions are just cluttering up the section and it makes it harder to find informaton,
Back to top
View user's profile Send private message
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Apr 03, 2008 7:53 am    Post subject: Reply with quote

Maybe noobs are fed of answers like "get lost!" and coders are sick of questions like "how can i compute the mean of three numbers?"
proposal: can't admins put a "PSP-Noob questions" area?? Maybe this way complex questions will not be lost in a sea of nonsenses.....
Back to top
View user's profile Send private message
Question_dev



Joined: 24 Aug 2007
Posts: 88

PostPosted: Thu Apr 03, 2008 8:01 am    Post subject: Reply with quote

Just give me a tip so i can figure it out by myself.
Back to top
View user's profile Send private message
Pirata Nervo



Joined: 09 Oct 2007
Posts: 409

PostPosted: Thu Apr 03, 2008 8:07 am    Post subject: Reply with quote

You always need a tip
_________________

Upgrade your PSP
Back to top
View user's profile Send private message
jo3_sum



Joined: 30 Jan 2008
Posts: 17

PostPosted: Thu Apr 03, 2008 8:18 am    Post subject: Reply with quote

Question_dev wrote:
Just give me a tip so i can figure it out by myself.


heres a tip:
know exactly what you want and you try figuring out how that will work.
Back to top
View user's profile Send private message Visit poster's website AIM Address Yahoo Messenger MSN Messenger
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Apr 03, 2008 8:23 am    Post subject: Reply with quote

xi,yi = initial coords
xf, yf = final coords
x, y = current coords
Code:

float speed = 0.01;
float k;
for (k = 0; k<=1; k+=speed){
  x = (int) (xi*(1-k)+xf*(k));
  y = (int) (yi*(1-k)+yf*(k));
// ...blit image at x,y...
}


...not to say that to do a GOOD animation code, this is only a bare hint...

PS: in future, PLEASE refer to one of the billion tutorials about game programming around....if you cannot do it on a PC, this doesn't mean you can do it on a PSP


Last edited by jean on Thu Apr 03, 2008 8:24 am; edited 1 time in total
Back to top
View user's profile Send private message
cruisx



Joined: 25 Mar 2008
Posts: 8

PostPosted: Thu Apr 03, 2008 8:24 am    Post subject: Reply with quote

jean wrote:
Maybe noobs are fed of answers like "get lost!" and coders are sick of questions like "how can i compute the mean of three numbers?"
proposal: can't admins put a "PSP-Noob questions" area?? Maybe this way complex questions will not be lost in a sea of nonsenses.....



I second that =\ there should be a beginners section
Back to top
View user's profile Send private message
jsharrad



Joined: 20 Oct 2005
Posts: 102

PostPosted: Thu Apr 03, 2008 9:42 am    Post subject: Reply with quote

http://www.google.com/search?hl=en&q=programming+beginner+forum

Lots of beginners "sections" already out there, I'm sure they're more than willing to help you with your simple questions.

I was under the impression this forum was for information specific to the PSP platform, whereas something like moving a sprite from point A to point B is more generic coding.
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Apr 03, 2008 11:21 am    Post subject: Reply with quote

Well, if there were a beginner's forum, at least that should help cut down on threads to ignore. The problem would be that ignoring the beginner's forum would lead them to post in the regular forums anyway when they see the beginner's forum being ignored. So it may or may not help any.

Other than pissing off noobies, the current method of scorn and ridicule works pretty well, so any idea to replace it would have to do a better job of cutting down the number of noobie threads in the forums we care about.
Back to top
View user's profile Send private message AIM Address
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Apr 03, 2008 7:05 pm    Post subject: Reply with quote

J.F. wrote:
The problem would be that ignoring the beginner's forum would lead them to post in the regular forums anyway when they see the beginner's forum being ignored.

I would not bet on it.... there's always someone who wants some free glory boasting of his superiority in middle of poors; aside from this, maybe a noob is better than another (even remaining a noob) and can answer while learning. If there's an arbitrary rule ("no noob questions in dev forum"), it will be more easy to say "wrong place" without the need to be unkind, and saying to change section in a forum sounds better than "change forum"...
Back to top
View user's profile Send private message
J.F.



Joined: 22 Feb 2004
Posts: 2906

PostPosted: Thu Apr 03, 2008 7:31 pm    Post subject: Reply with quote

Possibly. Won't know unless it gets tried. I'll leave the decision to the folks in charge. :)
Back to top
View user's profile Send private message AIM Address
jbit
Site Admin


Joined: 28 May 2005
Posts: 293
Location: København, Danmark

PostPosted: Thu Apr 03, 2008 9:18 pm    Post subject: Reply with quote

jean wrote:
Maybe noobs are fed of answers like "get lost!" and coders are sick of questions like "how can i compute the mean of three numbers?"
proposal: can't admins put a "PSP-Noob questions" area?? Maybe this way complex questions will not be lost in a sea of nonsenses.....

This site isn't geared to beginners, there are many other places on the internet to learn basic programming.
ps2dev.org as a community is for PSP/PS2/PS3 development questions, not general development ones... As I've said before just because the code you're writing happens to be running on the PSP doesn't make it PSP code. Having said that advanced optimization techniques that aren't necessarily PSP related (and other such topics) are appropriate here.
The general ethos that used to exist in the ps2dev.org community before the PSP happened was that you should learn how to code relatively well before even stepping foot on a console, this seems to have been diluted now.
Also, holding hands isn't a good way to teach developers, it's more important for a developer to learn how to figure things out for themselves than to know how to move a sprite on screen. If they can't be bothered to do this, that's their problem.

(Yes this is a rant)
Back to top
View user's profile Send private message Visit poster's website
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Apr 03, 2008 9:29 pm    Post subject: Reply with quote

pseudo code
Code:

steps = 10

dx = (endx - startx) / steps
dy = (endy - starty) / steps

x = startx
y = starty

for c = 0 to steps
  draw(x,y)
  x += dx
  y += dy
next


Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
jean



Joined: 05 Jan 2008
Posts: 489

PostPosted: Thu Apr 03, 2008 10:02 pm    Post subject: Reply with quote

@jBit:
Don't tell me....i agree! I was only trying to figure it out HOW we can handle the tons of children only wanting to do something "cool" on their psp....
@jim:
UUUUUUUUUUUHHH... you optimized my code!!! Awesome!.....just kidding
Back to top
View user's profile Send private message
Jim



Joined: 02 Jul 2005
Posts: 487
Location: Sydney

PostPosted: Thu Apr 03, 2008 10:10 pm    Post subject: Reply with quote

:-P

Jim
_________________
http://www.dbfinteractive.com
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forums.ps2dev.org Forum Index -> PSP Development All times are GMT + 10 Hours
Page 1 of 1

 
Jump to:  
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 vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group