darcymiranda / revert

2 stars 0 forks source link

Low-level Network Communication #11

Closed Nitrodist closed 9 years ago

Nitrodist commented 13 years ago

http://code.google.com/p/protobuf/

Found this. What do you guys think?

darcymiranda commented 13 years ago

I am thinking we should have a static class that abstracts out all of the packet creation.

Example:

ActionSender.shootMissile(Entity e); ActionSender.chat("oh hello");

Have the class create the messages with your fancy protocol that you found

Nitrodist commented 13 years ago

Are these asynchronous?

darcymiranda commented 13 years ago

What do you mean by 'these'?

Nitrodist commented 13 years ago

The calls to those methods.

darcymiranda commented 13 years ago

They would not be. No point, honestly.

I mean that ActionSender would replace this:

p = new Packet()/new Message()

p.id = 0 p.x = 55 p.y = 55 p.othercrap = s7dg7sd9gd

with... ActionSender.sendMovement(Entity e)