blue toth or wifi ?

General FreeBASIC programming questions.
Post Reply
bluatigro
Posts: 660
Joined: Apr 25, 2012 10:35
Location: netherlands

blue toth or wifi ?

Post by bluatigro »

i want to create a set of wireles network games
?1 :
do i use BT or wifi ?
?2 :
is there anyone out there whoo know's how to do 1 or both ?

a module whit functions to do this wood be nice

as first project i sugest batleship
[ both player's have a pc whit a square whit ships ]
[ and try to gues the other's ones ships coordinates ]

?3 :
is it posible to conect more then 2 pc's ?
badidea
Posts: 2591
Joined: May 24, 2007 22:10
Location: The Netherlands

Re: blue toth or wifi ?

Post by badidea »

bluatigro wrote:i want to create a set of wireles network games
?1 :
do i use BT or wifi ?
?2 :
is there anyone out there whoo know's how to do 1 or both ?

a module whit functions to do this wood be nice

as first project i sugest batleship
[ both player's have a pc whit a square whit ships ]
[ and try to gues the other's ones ships coordinates ]

?3 :
is it posible to conect more then 2 pc's ?
From a programmers perspective, there is no difference between 'wired' and 'wireless' network.
The (most obvious) protocol to use is 'TCP over IP' or 'UDP over IP'
For a real-time shooting game, use 'UDP over IP'. For a turn based game 'TCP over IP'.
With UDP, you will have to write more code for data packet checking and client time-outs.
A real-time shooting game is NOT easy due to network delay, especially when playing over the internet.
With IP v4 you can write a game for 4 billion clients in theory.

Search for 'winsock2.bi' or 'socket.bi' on the forum.

Blue tooth probably uses a different protocol. I don't know much about Blue tooth, but I think it is a bad choice for PC-to-PC communication (if even possible).
bfuller
Posts: 362
Joined: Jun 02, 2007 12:35
Location: Sydney, Australia

Re: blue toth or wifi ?

Post by bfuller »

I think Bluetooth just comes up as a COM port doesn't it? So serial type RS232 would possibly work. At least thats how I used it with a little microcontroller (PICAXE) and my Android phone.
bluatigro
Posts: 660
Joined: Apr 25, 2012 10:35
Location: netherlands

Re: blue toth or wifi ?

Post by bluatigro »

i tryed a battle ship game in a other basic
it is more complex then i did think

so i decided to try a chat program first
[ i shal post some code if i have it ]


eventualy i want to try 'wifmaze'
senario :
several player's are as a sphere in a maze
and try to shoot eatch other
there are ninja's and dummy's to give extra point's
ninja's can shoot back dummy's not
[ this is based on 'midimaze' a game out of the past ]
for this i wil use openGL
Basics
Posts: 4
Joined: Feb 21, 2019 14:27

Re: blue toth or wifi ?

Post by Basics »

Blue tooth probably uses a different protocol.
Post Reply