Computer Science Canada Platforms |
Author: | TopBypass [ Sat Jan 19, 2008 11:51 am ] |
Post subject: | Platforms |
Alright i have managed to get my character to jump but now i need him to jump of a platform. How do i go about creating a solid object in my code? |
Author: | TokenHerbz [ Sat Jan 19, 2008 11:55 am ] |
Post subject: | RE:Platforms |
detection. there are serveral ways, the easier methods would be to use whatdotcolor. otherwise you can specifically make the detection coding youself, but maybe try whatdotcolor first. |
Author: | TopBypass [ Sat Jan 19, 2008 12:20 pm ] |
Post subject: | RE:Platforms |
thanks soo much ill try it now and see if it works! |
Author: | TopBypass [ Sat Jan 19, 2008 12:22 pm ] |
Post subject: | RE:Platforms |
hmm i dont really see how this would help me... Im using the code from the tutorial " How to jump" |
Author: | TokenHerbz [ Sat Jan 19, 2008 12:39 pm ] |
Post subject: | RE:Platforms |
Oh, well after looking threw his code, It's not a good code to start using for a platform jumping type of program. As you can test yourself changing his constant variable ground_height changes the line which the box is on. The idea is great but since you are aiming for different ground heights on your game, this wont work unless you overhauled his code, and its always better to start your code from scratch. |
Author: | TopBypass [ Sat Jan 19, 2008 12:47 pm ] |
Post subject: | RE:Platforms |
Alright thanks for the advice ill take a diff aproach to the game. Thanks again! ( +Karma ![]() |
Author: | BigBear [ Mon Mar 10, 2008 9:40 am ] | ||
Post subject: | Re: Platforms | ||
I do not believe that code needs to be overhauled. Just needs a few more constants and if statements. First you need to draw a platform so a rectangle using drawfillbox (x1, y1, x2, y2, colour). Then just follow his examples and create if statements. Please follow my comments and compare my version of this program to the original which I would like to thank Mazer. There is another thread trying to do the same thing and also didn't credit Mazer.
|
Author: | Sean [ Mon Mar 10, 2008 9:43 am ] |
Post subject: | Re: Platforms |
BigBear, once again you are not to give them the code, but are to instruct them. And you over-comment ![]() What you want to do, is make your boxes, they could be variables, or constants like mentioned above. After doing so, you want to compare these variables with your character position, and have the character stay between the length of the platform, and along the top of the platform. |