Pong Questions:
Hi all,
so my cocoa pong is going ok here. i've got a paddle that moves when i press up or down, the ball bounces off the walls ok. but i'm encountering some sticky animation questions that aren't easily answered. so here goes:
taking keyboard input, parsing it, and shooting off a message to my controller who in turn modifies data in my paddle model is great, easy to understand. but it bogs down my ball. i tried putting my ball animation within a thread, and it's better, but still a bit boggy. it just bogs through the animate method every 0.015 seconds and refreshes my view. it's ok, but when i move my paddle there's still (barely) noticeable lag.
so should i have two timers running, one that updates the ball, and one that updates the paddles? what's a good paradigm for this situation?
thanks in advance...
so my cocoa pong is going ok here. i've got a paddle that moves when i press up or down, the ball bounces off the walls ok. but i'm encountering some sticky animation questions that aren't easily answered. so here goes:
taking keyboard input, parsing it, and shooting off a message to my controller who in turn modifies data in my paddle model is great, easy to understand. but it bogs down my ball. i tried putting my ball animation within a thread, and it's better, but still a bit boggy. it just bogs through the animate method every 0.015 seconds and refreshes my view. it's ok, but when i move my paddle there's still (barely) noticeable lag.
so should i have two timers running, one that updates the ball, and one that updates the paddles? what's a good paradigm for this situation?
thanks in advance...
| Messages In This Thread |
|
Pong Questions: - blobbo - Jan 19, 2004 08:34 PM
Pong Questions: - skyhawk - Jan 19, 2004, 10:10 PM
Pong Questions: - blobbo - Jan 20, 2004, 05:48 PM
Pong Questions: - NCarter - Jan 20, 2004, 06:27 PM
Pong Questions: - blobbo - Jan 21, 2004, 04:14 PM
Pong Questions: - blobbo - Jan 21, 2004, 06:08 PM
Pong Questions: - NCarter - Jan 21, 2004, 06:22 PM
Pong Questions: - skyhawk - Jan 21, 2004, 07:45 PM
Pong Questions: - blobbo - Jan 21, 2004, 08:16 PM
|
Possibly Related Threads...
| Thread: | Author | Replies: | Views: | Last Post | |
| [Request] Pong Source & One Question | McSpider | 6 | 6,776 |
Sep 18, 2011 07:21 AM Last Post: fudog |
|
| Pong AI trouble | saxplayer13 | 15 | 7,117 |
Dec 16, 2005 10:40 AM Last Post: jamil5454 |
|
| My first Cocoa Game that works! (Pong) | blobbo | 16 | 9,206 |
Aug 4, 2005 03:15 PM Last Post: Andrew |
|
| Pong "Physics" | Nick | 9 | 5,781 |
Sep 28, 2004 07:36 PM Last Post: aarku |
|
| Tic Tac Toe almost done... Next up: Pong! | blobbo | 15 | 7,145 |
Jan 16, 2004 06:33 PM Last Post: blobbo |
|

