Forum > Networking and Web Programming

Networking for a newbie

(1/2) > >>

Hi.  It's relatively early days for me programming. I've written a simple little game that I would like to make network playable.

Ideally, 2 players connect themselves over VPN, each runs their program, clicks a button to connect to each other, then start the game. The only information that needs sending is what keys have been pressed.

I'm only asking for pointers here. Can someone tell me where to look / what to look for?

I'm very grateful for your time.



--- Quote ---Can someone tell me where to look / what to look for?
--- End quote ---
Surely, you need networking components. Search the wiki, lazarus have synapse, lnet, and indy. I use lnet, but it hasn't released a version that works with current version of lazarus except in svn. And you have to understand how the communication is done (read some networking article or tutorial).

Synapse has improved FPC compatibility lately.
You may download trunk.tar.gz from here:

I couldn't get the echo sample of Synapse working for some reason. I mean it compiles but i can't connect to it by any means. HTTP server worked fine but all i want is TCP or possibly UDP sockets for gaming purposes. An easy example of TCP client that sends a packet and receives would be nice aswell.

Edit: Making progress finally, could it have been simply wrong port number  :-[

So.. i managed to make a fully working multithreaded TCP sockets wrapper for synapse. All but to 1 weird error i can reproduce every time:

If i have GNU debugger enabled and i have server listening when i close application i get SIGSEGV (same as "access violation" i guess). If i disable debugger or just run executable there are no errors during run or exit.

Any ideas?

Pasted whole unit here:


[0] Message Index

[#] Next page

Go to full version