I'm a noob help.

Blitz3D Forums/Blitz3D Tutorials/I'm a noob help.

alright I know I sound stupid I always do while learning a new language.I have NO previous exprience in game creation just a little here and there program programming.

I would like to know how to move a 2D object like make it move from this X to this X and from this Y to this Y.I would really like to know I feel so f***ing [mod edit] stupid cause I know this should be something easy for me.Thanks,
Kenshin.

* Please do not post tutorial requests or help requests - use the other forums for programing help.


And also watch the language you are using.

Mortiis, that was a bit harsh !

The odd bit of blue language can be tolerated, as long as it's not too OTT.

Simply letting him know the appropriate place to post his request would have been more professional. He did quote that he is a noob.

Kenshin... Try the Blitz3D Beginners Area.

I just made a quote from tutorial forum guidelines, what's harsh with it?
And believe me it would be a problem if I said the above sentence as "I just made a fu**ing quote from fuc**ng tutorial forum guidelines, what's fuc****** harsh with it?"

Aaah, so you were mainly refering to the fact that he didn't put the stars in. I do apologise.

Don't take it personally, I just thought it seemed a bit blunt that's all.

Moving an object from one x to another x is just a matter of making one of the (x) numbers equal the other over time (frames). Same for the y. Now say you started at 0 and wanted to move it to 100, just add a certain amount each frame until you reach the target.

Now the frames will be a iteration of a loop, that includes screen redrawing and maybe some sort of slow down delay to sync it a update fresh rate.

Now the question you posted has a million of possible solutions, the one I outlined above will give you a good platform to learn more from.

If x and y are the coordinates of the object, and tx and ty are the target coordinates:


;move x coordinate
if x<tx then x=x+3 ;if x is to the left of tx, move x right
if x>tx then x=x-3 ;if x is to the right of tx, move tx left

;move y coordinate
if y<ty then y=y+3 ;if y is above ty, move y down
if y>ty then y=y-3 ;if y is below ty, move y up



ok
this is the FULL thing

sorry if it's too long

replace anything in
{}s
with what you would like

Graphics {width},{height} ; careful, this controls the size of the window
SetBuffer BackBuffer() ; set buffer so you can update without problems

Global x,y

While Not Keydown(1) if NOT escape key being held
Color r,g,b ; again, r is red, g is green, and b is blue,but i think 
            ;u know that
Rect x,y,(rect_width),(rect_height)
If KeyDown(200) Then y = y + 1 ; if up arrow is held
If KeyDown(208) Then y = y - 1 ; if down arrow is held
If KeyDown(203) Then x = x - 1 ; if left arrow is held
If KeyDown(205) Then x = x + 1 ; if right arrow is held

Flip ; draw to screen

Wend ; end the while

End



that's it

i appologize if the keys are swapped up. Just switch until you get what you want

Hope this helps

Ahh thanks guys for the feedback btw I posted in the wrong section because I think I hit the back key :S.Anyway fireshadow I thought something like that could be done but I wasn't sure so Thanks.