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.

Code Snippets / Mouse Pong

Author
Message
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 28th Oct 2006 10:53 Edited at: 29th Oct 2006 22:12
This is a little bit of code whipped up to use the mouse as a ball in a game of 2 player pong. Up/Down keys are to move the player 2 paddle up/down. W/S are to move the player 1 paddle up/down. Also, this is media-less. So. That's a good thing too I guess.



And from Robot's Translation for DBC:



Take heed, never take advantage of the things you need, never let your self be overcome by greed. Walk a strigh line, pick up your speed and try. Everyone deserves a piece of the pie By: Shaggy
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 29th Oct 2006 03:03
I think you should use hide mouse and an image of the mouse instead, because when I ran the code the program somehow ran minimized and I couldn't move the mouse to maximize it. I had to figure out how to use Task Manager with only the keyboard to shut it.

Confucius Say...
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 29th Oct 2006 08:16 Edited at: 29th Oct 2006 08:20
Hmm. Do you have more than 1 monitor running? If so, that might be why I'm not sure. Also, this was made for DBP, I forgot to add that in the title. So, I'll test it in DBC to make sure.

EDIT: Seems to run OK in DBC, just that the sprite collision doesn't seem to work. But it's been a while since I've used DBC, I've probably forgotten to do something.

Take heed, never take advantage of the things you need, never let your self be overcome by greed. Walk a strigh line, pick up your speed and try. Everyone deserves a piece of the pie By: Shaggy
Robot
20
Years of Service
User Offline
Joined: 27th May 2004
Location:
Posted: 29th Oct 2006 10:04
And here it is edited slightly to work with DBC.
Code Dragon
18
Years of Service
User Offline
Joined: 21st Aug 2006
Location: Everywhere
Posted: 29th Oct 2006 12:25
I don't have two monitors, but sometimes I move and close windows in the 10 seconds that DBP is compiling, that's probobly what did it. It's working fine now.

Confucius Say...
dab
20
Years of Service
User Offline
Joined: 22nd Sep 2004
Location: Your Temp Folder!
Posted: 29th Oct 2006 22:13
Cool. Thanks Robot.

Code Dragon. Ok, that might explain it too.

Take heed, never take advantage of the things you need, never let your self be overcome by greed. Walk a strigh line, pick up your speed and try. Everyone deserves a piece of the pie By: Shaggy

Login to post a reply

Server time is: 2024-11-22 23:40:27
Your offset time is: 2024-11-22 23:40:27