locked
Tcp/udp over smalbasic? RRS feed

  • Question

  • Hiyo!

    My name is Sander and I've been programming in smallbasic for a while now and after using almost every extention i never saw one which would make it possible to make a multiplayer game :*( (Osaki's Data Extention isn't working yet) but my question is: how long would it take to develop such a thing and would any one do it ? :D 

    Thanks in advance for you anwser, Please do not mind the creative use of English in this post :P

    Sunday, January 22, 2012 7:27 PM

Answers

  • Hi,

    You can write a multi-player game in SmallBasic with no extension now - different players just use different keys.

    What sort of game is this you are thinking of.  The limitations of SmallBasic are mainly about performance, so complex (graphically or computationally) games may be impractically slow.

    If you want some-one to write an extension, then you will have to be much more specific about what it should do that cannot currently be done, bearing in mind there will be limits to the complexity (due to SmallBasic performance) that will be practical.

    If you just want something simple like handling a couple of gamepads, then easy. 

    If you want something that handles multi-player graphic interaction in some way, then this falls into the category of 'you are past SmallBasic'.

    EDIT

    Spotted the TCP bit in the title so this is about network gaming, using file based data transfer should be fairly easy, but probably there would need to be a dedicated server somewhere for players to both communicate with.  Interesting project for some-one wanting an extension project.

    EDIT 2

    A little looking into it and TCP communication is not too hard between networked computers - so do you mean over the internet or between PC that are networked - e.g. a home network.


    • Edited by litdev Sunday, January 22, 2012 8:30 PM
    • Marked as answer by gungan37Editor Sunday, October 28, 2012 7:50 PM
    Sunday, January 22, 2012 7:54 PM

All replies

  • Hi,

    You can write a multi-player game in SmallBasic with no extension now - different players just use different keys.

    What sort of game is this you are thinking of.  The limitations of SmallBasic are mainly about performance, so complex (graphically or computationally) games may be impractically slow.

    If you want some-one to write an extension, then you will have to be much more specific about what it should do that cannot currently be done, bearing in mind there will be limits to the complexity (due to SmallBasic performance) that will be practical.

    If you just want something simple like handling a couple of gamepads, then easy. 

    If you want something that handles multi-player graphic interaction in some way, then this falls into the category of 'you are past SmallBasic'.

    EDIT

    Spotted the TCP bit in the title so this is about network gaming, using file based data transfer should be fairly easy, but probably there would need to be a dedicated server somewhere for players to both communicate with.  Interesting project for some-one wanting an extension project.

    EDIT 2

    A little looking into it and TCP communication is not too hard between networked computers - so do you mean over the internet or between PC that are networked - e.g. a home network.


    • Edited by litdev Sunday, January 22, 2012 8:30 PM
    • Marked as answer by gungan37Editor Sunday, October 28, 2012 7:50 PM
    Sunday, January 22, 2012 7:54 PM
  • I like to make an multiplayer game were people can make servers and other people can connect, and if im past smallbasic what should choose ? (honest please) i allready tried Visual Basic but i dont like it (couse of the GUI's) and still no TCP/UDP support!

     

    Sinc. Sander Kastelein 

    Sunday, January 22, 2012 8:31 PM
  • There is network stuff in .Net VB or C#.  I mainly use C# but the same stuff is available in VB, it is just different syntax, both use .Net.

    For TCP on a network I just did the code here and it worked well on 2 PCs on a home network.

    For a web solution I think you will need access to a network server to use TCP, or you could maybe use a file based system, but all the firewall security stuff might be complicated, I just don't know enough about it, but maybe look into it.

    Here is another site using TCP/UDP.  Not sure how it could work over the net (PCs not on the same network) without a dedicated server, but that's possibly just me not knowing much about it.  I think somewhere, one machine (server) must have an IP address that is web accessible and you have significant access to.


    Sunday, January 22, 2012 8:49 PM
  • Well my system would let people them selves make their own servers, (e.g. minecraft or C.o.d) But is this possible other wise Ill proberly switch to another programming language (something like Flash)
    Monday, January 23, 2012 8:26 PM
  • These programs you mention have a dedicated network server(s) (and charge for it by software purchase I think).  You can host your own server on your own PC depending on your ISP and requiring a constant IP address and special server software, but this isn't straight forward and it could be hacked  if you aren't very careful since you need to open a firewall port.  You can rent space on a server, but this will cost you something.  I don't think you will get a free network server run by someone else where you can run a server program for free.  Flash (client side rendering) doesn't address the server problem I don't think, but it may be possible with Flash and server side software depending on web hoster, but good luck anyway.

    Monday, January 23, 2012 8:49 PM