MMOCC the isometric world scene, 2006–now
Archive. Archived from the original MMOCC Forum (2006–2010), recovered from the Internet Archive. The forum is read-only history now — the scene talks on Discord. If you posted here and want something removed, get in touch.

Sockets in AS3 / Talking to the server :)

5 posts · 2011-12-01 · MyBB era
12-01-2011 08:01 AM #1
Hi, I am building a cute little chatting application as a hobby project.

I have a cute little avatar (I'm not going to lie, he's a box) who can load up different maps and navigate around them. He can chat but no one can hear him except me :(

Okay, anyway, What I have to do now to make the game better is to have a "server" application which will handle where all the items and users are in the different rooms.

I need to figure out how to send out little messages from the game client in AS3, then, in some other language, listen for the messages, be able to interpret them, then send a little message back, then for the game client to hear the message coming back.

I don't mind what language the server application will be written in, I will be able to learn it in time. I'm pretty sure I need to be looking at sockets, but I don't know where to start and I can't find any tutorials that are simple enough.

Could anyone direct me to an online tutorial, video, a book, or a program with source code that does the following:

AS3 Client: Send out a message.
Server: Hear the client message and print it out.
Server: Send out a message.
AS3 Client: Hear the server message and print it out.

If I could just get my head round that, I could expand the server app myself to do what I need it to do :)

Thanks

12-03-2011 04:45 AM #2
Congrats on your project!

Sockets are fairly simple in AS3, as for the server, maybe look into Smart Fox Server?

Here's a tutorial on sockets in as3 to connect to a smart fox server:

Click Here

I'm excited to see what you've come up with, please share your progress with the community

12-03-2011 05:59 AM #3
(12-03-2011 04:45 AM)Jason Wrote:  Congrats on your project!

Sockets are fairly simple in AS3, as for the server, maybe look into Smart Fox Server?

Here's a tutorial on sockets in as3 to connect to a smart fox server:

Click Here

I'm excited to see what you've come up with, please share your progress with the community

Thanks for your reply, that looks like a great website, and is a great tutorial also I did consider using SmartFoxServer, but for the purposes of learning I decided I would rather try and code my own I am building the server using C#, which seems like a nice language with an easy to understand syntax and some useful methods for threading and networking. I will definitely share the project with anyone who wants it once I have something reasonable to show off!

Thanks again,
stu

12-03-2011 07:06 AM #4
I recommend C#. I'll take a look through my old drive and see if I can find anything to help you out (no promises). I wrote a couple of pilot projects for testing a few years back.

12-03-2011 07:18 AM #5
(12-03-2011 07:06 AM)WillyR Wrote:  I recommend C#. I'll take a look through my old drive and see if I can find anything to help you out (no promises). I wrote a couple of pilot projects for testing a few years back.

Thanks a lot, I really appreciate the advice. I didn't realise this forum was so active!

stu

Recovered from /printthread.php?tid=18885 · captured 2013.