Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

DarkBASIC Discussion / Want to take game online...

Author
Message
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 16th Nov 2002 23:40
To this day I have yet to see a game made in DB that can be played online. Have any ever been made? Do you need custom .dlls to make them? what I want to do is turn the person running the game's computer into a host, and other people could choose to host a game or join the others, and in the code loop it would send and recieve character variables, like position, location of bullets, etc etc...

Is this really possible in DB? Could I have some kind of crazy comand like Send(posx#) and recieve(posy#)?? Do I really need a custom dll or two? has anyone ever made a game go online? Sample code? Concepts? Anything?
The Darthster
21
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 16th Nov 2002 23:56
I've played with the multiplayer commands on a LAN, but go nowhere. According to the help files you should be able to use the same sort of code to make online games, supplying an IP address to connect to. Some of the multiplayer commands seem a bit too vague, I don't know how they work. Also you have to be careful when designing multiplayer games to minimise the necessary amount of data you send and the reliability of the data getting to the other end.
Skid
21
Years of Service
User Offline
Joined: 3rd Oct 2002
Location: United Kingdom
Posted: 17th Nov 2002 00:11
Acculy i've made an online game that will run other internet and Lan, only thing is i made it in DBPro, however i've made a chat program, but i never really checked it to see if it will run online. However from my known with how DBPro handles it, you need to link to the TCP internet connection, you don't need and address and if you leave the IP blank you should be able to search for it. But if you use and IP you can dirrecly to that person PC, but they need to tell you it first

Skid
QuothTheRaven
21
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 18th Nov 2002 21:40
Hmmyeah, all good and interesting, but that really doesn't help me. So I need to link to the tcp via dark basic to create some kind of crazy server, and I already expected that i need to get the IP of the other person's computer. What then? Could you post some sample code maybe? Can it be done w/o custom .dlls?

If it's of any conselation, I found a game that looks very similair to db programming (quality and .x objects) and it's online, called Tank Socket found at www.gamesocket.com. The author's email is not valid tho. But I all I really need to do is send and recieve variables, what code would do that?
Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 19th Nov 2002 13:36
There are 2 main internet systems you can implement. You can dedicate your own computer (that is, keeping it on and connected 24 hours a day) and have it in your code that when users select the option, they automatically link up to your server and can create games. Multiplayer services such as HEAT,(no longer with us) won.net (world opponent network) and battle.net (blizzard's exlusive one) are there for the customer. The alternative is letting users create their own server, then they give their friends their IP address and they connect. Mind, DirectPlay has a maximum of 256 connections. You could also use IPX, which is easier. No details are needed as you are automatically connected to anyone on your LAN. Serial link works aswell. You'd need to supply the COM port you're using and the baud rate.

As for answering your question, you can make a server edition and a customer edition of your software. Use your pc with the server edition(which you've programmed to automatically generate the server). Give your customers the customer edition, which you've cleverly forced the program to log onto your IP address so that they don't need to put it in. You don't need their address, you merely hold up the playground and let them in.

This has "Fiasco" written all over it.
ToXic
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Australia
Posted: 19th Nov 2002 22:56
You will need to use memblocks for your data transfer, here
is some code for you to look at, hope it helps.
This is not a working example, just some code from a Othello
game i did a while ago. only 2 player but it seems to work ok over a local/or internet(tcp/ip) connection. all you want to do is possible ,ie a game loby, up to 256 players but you will need BD Classic with the extra commands. or BDPro, I have not tried out multiplayer commands in DBPro but they seem to work ok in DB, look at the example that comes with BD it should help. Good Luck !!

ToXic.


Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 19th Nov 2002 23:34
Memblocks? I suppose, do they conserve memory space?

This has "Fiasco" written all over it.
ToXic
21
Years of Service
User Offline
Joined: 8th Sep 2002
Location: Australia
Posted: 19th Nov 2002 23:39
No its just a way BD can send lots of data in 1 packet.
this is just 1 use for memblocks (look in the help file)

ToXic.
Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 20th Nov 2002 01:09
Ahhhhhhh. Good call.

This has "Fiasco" written all over it.
TheCyborg
21
Years of Service
User Offline
Joined: 6th Oct 2002
Location: Denmark
Posted: 20th Nov 2002 09:19
memblocks is a part of the memory. They are used to alter data REALLY fast, becase the memory is fast.

TheCyborg Development.
http://TheCyborg.Amok.dk
The Ultimate Source To DarkBASIC Programming.
Mirthin
21
Years of Service
User Offline
Joined: 13th Oct 2002
Location: Land of the Rising Haggis
Posted: 20th Nov 2002 18:05
So I heard. We've got to the point that our memory is so fast at receiving data that the only thing that's holding us up is the speed of the electrons!

This has "Fiasco" written all over it.

Login to post a reply

Server time is: 2024-03-29 14:55:27
Your offset time is: 2024-03-29 14:55:27