Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Need help with ScouseKnight's PacMan tut.

Author
Message
Spaceman Spiff
20
Years of Service
User Offline
Joined: 27th Jan 2004
Location: Smacking my head on your keyboard.
Posted: 11th Dec 2004 07:13 Edited at: 11th Dec 2004 07:16
OK I've been beating my brains out on the keyboard for the last three hours because something really weird is going on.Basicly I've worked about to where you add the ghosts in the tut, but the part that's suppose to make movement more responsive so that you can change direction quickly just doesn't work. I've evan cut and pasted it out of the .PDF file and it still doesn't everything else is fine abd works perfect except this one part. (Here's the section of the tut)

Making Player Movement More Responsive
But it’s a little sluggish – if we want to quickly reverse direction, we can’t – the
player will move a little further in the direction he is going before he will reverse
direction.
To make quick reversals of direction possible, we need to put some code outside of
the If Centre = 1 condition just to check for reversals of direction – so insert this code
immediately after the Endif :

`
` Allow player to do a quick about face
`
If PlayerRight = 1 And LeftKey()
_Reset_Player_Direction()
PlayerLeft = 1
Endif
If PlayerLeft = 1 And RightKey()
_Reset_Player_Direction()
PlayerRight = 1
Endif
If PlayerUp = 1 And DownKey()
_Reset_Player_Direction()
PlayerDown = 1
Endif
If PlayerDown = 1 And UpKey()
_Reset_Player_Direction()
PlayerUp = 1
Endif

Now if we run the program again, the player’s response times have improved quite considerably.

The problem is that the response time doesn't change at all, and this makes it near impossible to play the game because you slide so much that you can't go anywhere.

EDIT I've included my full program in the source box.

So if any one would help me I'd be super happy, thanks.

Takes 1 2 no 1
Ali M Oldboy
19
Years of Service
User Offline
Joined: 6th Nov 2004
Location: England, UK
Posted: 11th Dec 2004 16:18
It works fine with me

I dunno?

Are you mad? I am!

(It's me, N U K E S O F T!)
Spaceman Spiff
20
Years of Service
User Offline
Joined: 27th Jan 2004
Location: Smacking my head on your keyboard.
Posted: 13th Dec 2004 12:12
Drat! Oh well thanks for the reply anyway, guess I'll go back to smackin' my head.

Hmmm.. just reread my post on top, it doesn't make much sense does it? My question was really weather or not anyone else had had a similar problem but I guess not. Thanks again for the post AliM I'm off to try to fix it.........Crap! I hate Debugging.

BTW Nobody else bother postin' Because I here by name this thread dead!

Takes 1 2 no 1

Login to post a reply

Server time is: 2024-09-23 06:17:04
Your offset time is: 2024-09-23 06:17:04