Author |
Message |
salehyassin
|
Posted: Tue May 20, 2008 4:12 pm Post subject: How to make some thing jump like mario |
|
|
Hi Guys.
I just would like to ask you how to make an object jump and jump left or right
if you can give me a simple game with object that jump. Thanks alot. |
|
|
|
|
![](images/spacer.gif) |
Sponsor Sponsor
![Sponsor Sponsor](templates/subSilver/images/ranks/stars_rank5.gif)
|
|
![](images/spacer.gif) |
Tony
![](http://wiki.compsci.ca/images/f/f4/OniTony.gif)
|
Posted: Tue May 20, 2008 4:13 pm Post subject: RE:How to make some thing jump like mario |
|
|
There's a tutorial for that in the Turing Tutorials forum. |
Tony's programming blog. DWITE - a programming contest. |
|
|
|
![](images/spacer.gif) |
salehyassin
|
Posted: Tue May 20, 2008 4:16 pm Post subject: RE:How to make some thing jump like mario |
|
|
can you give me the link I couldn't find it |
|
|
|
|
![](images/spacer.gif) |
CodeMonkey2000
|
|
|
|
![](images/spacer.gif) |
isaiahk9
![](http://compsci.ca/v3/uploads/user_avatars/1465120414488e669e1f83a.jpg)
|
Posted: Tue May 20, 2008 4:19 pm Post subject: RE:How to make some thing jump like mario |
|
|
If you want to draw your character facing left when jumping left, and facing right when jumping right, do something like this :
var characterisright : boolean := true
loop
if right key is pressed then
characterisright := true
elsif left key is pressed then
characterisright := false
end if
if characterisright = true then
draw the character right
else
draw the character left
end if
end loop
I did that for my game and it works. |
|
|
|
|
![](images/spacer.gif) |
|