| View previous topic :: View next topic |
| Author |
Message |
|
|
Posted: May 05, 2008 17:09 Post subject: Network multiplayer Tic Tac Toe in FB |
|
|
I know, sounds amazing right? Well as far as TTO goes, its generic, and does nothing new. That wasn't the goal however, the goal was to write a simple, mostly well written game to demonstrate how to properly network a program. The goal was also teaching myself how to better handle a networked system. I feel I have definately achieved those goals.
The networking side of things is handled by enet, everything else by built in FB routines.
fb_tto
This archive contains binaries for both the client, and server, as well as the source code, and finally an updated copy of enet.
I should also probably mention, the client shortcut in there is intentionally pointed at my server.
-Edit- A stupid error on my part caused the client to behave poorly-Edit_
For Lachie: there are two programs, as well as two shortcuts sv_tto.exe is the server. cl_tto.exe is the client.
The shortcuts point to their respective programs. cl_tto.exe shorcut points to my server. sv_tto.exe shortcut causes the server to host on port 9920. |
| |
|
| Back to top |
|
 |
|
|
Posted: May 05, 2008 17:41 Post subject: |
|
|
Well, I think you accomplished the original goal. I'll definitely have this in mind if I end up coding a simple network game (simple because of the restrictions of my own connection).
I do wish you wrote better documentation and more polished game, but let's hope someone will do that soon. Also, I never liked the connection procedure with several FB programs of this sort I tested. I always expected a better interface for this, and perhaps all in one EXE file. Not sure if this can be done, but not typing the server name with INPUT is a start. |
| |
|
| Back to top |
|
 |
|
|
Posted: May 07, 2008 18:08 Post subject: |
|
|
| Quote: | | I do wish you wrote better documentation and more polished game, but let's hope someone will do that soon. |
I would love to write a better front end for this.
| Quote: | | I never liked the connection procedure with several FB programs of this sort I tested. I always expected a better interface for this, and perhaps all in one EXE file. |
Yeah, it seems a bit clunky, but I just think it's cool that it works. The UI can always be improved though. I agree with you that having the server/client builds in a single build (or at least accessible from a single build) is pretty important. As it stands, that's just poor design.
| Quote: | | Not sure if this can be done, but not typing the server name with INPUT is a start. |
It would be rather sweet if we developed a standard of sorts for implementing networking into FB programs, more specifically games. |
| |
|
| Back to top |
|
 |
|
|
Posted: May 09, 2008 14:36 Post subject: |
|
|
| Actually the initial versions of this had both the client and server in the same binary, the issue I found was that it was hard to distinguish the two. I figured since I was writing this for people who perhaps didn't have a very solid grasp on network programming, confusing them further for the sake of "good design" would be somewhat pointless. |
| |
|
| Back to top |
|
 |
|
|
Posted: May 10, 2008 2:36 Post subject: |
|
|
| Quote: | | confusing them further for the sake of "good design" would be somewhat pointless. |
Actually, good design would seem to dictate that they would not be confused.
Here are my first thoughts on a single exe build. Have two options in game:
"Host a Game" - uses server code
"Join a Game" - uses client code
Seems simple enough, no? |
| |
|
| Back to top |
|
 |
|
|
Posted: Jun 11, 2008 22:24 Post subject: |
|
|
| Where can I find a finalized version with the source? Because I have this without it. Once again, the last version, not this one. |
| |
|
| Back to top |
|
 |
|
|
Posted: Feb 28, 2009 23:38 Post subject: |
|
|
arenth,
The link to the zip file doesn't work (anymore?) - Could you either repost it or send it to me via email (leopardpm@yahoo.com) - I am in need of understanding exactly what you have tried to show!
Thanks! |
| |
|
| Back to top |
|
 |
|
|
|
| Back to top |
|
 |
|
|
Posted: Mar 01, 2009 0:27 Post subject: |
|
|
ok, got it - trying to decipher, but seems alot more involved than I expected!
thanks! |
| |
|
| Back to top |
|
 |
|
|
Posted: Mar 02, 2009 23:50 Post subject: |
|
|
| Not sure if i have the original still, I'll search for it and post. |
| |
|
| Back to top |
|
 |
|
|
Posted: Mar 02, 2009 23:54 Post subject: |
|
|
Turns out I do, you're lucky I didn't empty my recycle bin...
Link |
| |
|
| Back to top |
|
 |
|
|
Posted: Mar 03, 2009 0:19 Post subject: |
|
|
Thanks alot, Arenth! My project is coming along nicely, and hopefully I will be able to understand the necessary network code to make it multi-user.
I appreciate your help and in not emptying your recycle bin! |
| |
|
| Back to top |
|
 |
|
|
Posted: Mar 03, 2009 4:21 Post subject: |
|
|
| Well just let me know if you need help understanding any of it, if I recall correctly the state management was somewhat poor. |
| |
|
| Back to top |
|
 |
|