Wacky Pong

Posted on January 19, 2009. Filed under: Uncategorized |

I’ve been working on a flash, real-time, multi-user system with AMQP. The first app using the system is just pong. Sounds easy, but I haven’t see an flash, real-time pong game on the internet yet. Flash client side, neko for the server with RabbitMQ in the middle for messaging.

Things have been going well so far except for the debugging process. In general I can make do with the trace statement that haXe affords. It’s better than nothing, which is what Actionscript 3 would give me without components. However, debugging the effects of latency and lag compensation has been frustrating. Too bad I’m such a newbie with real-time, internet, game programming. Being forced to use TCP/IP doesn’t help either.

I was about to give up, call it Wacky Pong, and move on to another app, but it dawned on me that I could write a network simulator to gain insight on what is going wrong with the lag compensation. And doing so has given me insights on how to better architect the system.

Another way to gain better insight is to have been debugging tools. HaXe’s ‘trace’ isn’t good enough considering how buggy my code is. So I made a few updates to as3tohaxe and will start to convert AsWing to haXe over the weekends. Having a robust gui framework will be a boon to haXe, so I hope I can get some help with the conversion and testing.

As much fun as haXe is working on as3tohaxe in haskell is a nice change of pace. I might get a copy of Real World Haskell after all.

Advertisements

Make a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

2 Responses to “Wacky Pong”

RSS Feed for Blazing Bytes Comments RSS Feed

Do you have alternate ideas to using trace()?

Right now I’m using a messaging framework I created to control the flow of events. I’m using it to solve the problem of having disparate parts of the program communicate without having references to each other similar to PureMVC’s notification system but without the boilerplate. The result is that I can send messages to different parts of the system and trace the flow of the program because there’s a central point through which messages flow.

At the moment, the message framework is tied to a timer that checks the messages queues every frame. I could change the timer to fire on a time simulator running on ticks and have the whole system react to a global clock. Not sure if this is effective, I haven’t had a chance to try the time simulator yet.

Using the messaging system, in combination with a trace to the flash log or some other recorder, and a time simulator would give you similar effects of a debugger. You could set “breakpoints” into the messaging system because the messsages are centralized.

I have only implemented the messaging system part of this so far. So it remains to be seen how far this can be taken.


Where's The Comment Form?

Liked it here?
Why not try sites on the blogroll...

%d bloggers like this: