Copy Link
Add to Bookmark
Report

About DSock & An Interview With V1ctor

QB Express Issue #1

eZine's profile picture
Published in 
QB Express
 · 8 months ago

Conducted by Pete

In the days of yore (the '90s), online gaming with QuickBasic was just a glint in most programmers' eyes. Networked games in QB were the stuff of legends; programming one was a near impossible feat. Nobody knew how to make a decent online game in QB. In those days, there were a few experiments with networking -- tutorials on how to use the modem were released, an application that used IRC to exchange game data surfaced and fizzled away, and some developers offered downloadable levels and the ability to post high scores on their websites. But nobody ever really figured out how to bring their QB games online.

Enter V1ctor, a talented QB and ASM programmer with a natural knack of figuring out stuff that nobody's ever done before. (If you need evidence, just take a look at the fastest QB library ever, uGL.) V1ctor signed on to help bring a promising game called SubShock online, with an innovative new technique: interfacing directly with the built-in Windows TCP/IP handler, Winsock. V1ctor put his mind to the task and created DSock, the first *good* method to bring QB online. This new technology had incredible potential, and it should have turned the QB world upside down....

...Unfortunately, SubShock was never finished, and DSock was only ever used to bring one game online: WisdomDude and Marcade's Connect 4 QB. Since then, V1ctor's incredible techniques have gone largely unnoticed, much to the chagrin of DSock's biggest proponents (see Marcade's letter to the editor).

In this issue of QB Express, we present to you an interview with V1ctor (below), information and screenshots about badlogic's upcoming Counter Strike 2D Clone which promises online multiplayer, and Marcade's DSock Tutorial Document to show the potential of DSock. I heartily encourage everyone to learn about and experiment with DSock. Now there's no excuse for QB programmers not to make online games!

The Interview

V1ctor is well-known through the QB community as one-half of badlogic software, the group behind the graphics library uGL and the DSock networking routines that make Internet and networked QB gaming a reality. I conducted this interview with V1ctor to help spread the word about his incredible DSock routines.

>> First off, can you introduce yourself and your programming group, Bad Logic?

Well, i'm from Brazil (aka jungle, oi!), i began messing with qbasic (not qb!) when i got my first computer, 8 year ago or such. Around 6 months later i started to make routines in assembly, when i got my copy of QB 4.5 and could finally use external libraries (oh, those days..). Now i do web coding for living (surviving?). Badlogic is the group created by the dirty mind of Blitz, he controls the whole thing. It's a group of just 2 people, so.. it's not really a group (hmm).

>> You are definitely an accomplished QB (and ASM) programmer! What makes you focus your time on QB when you could work with other faster and more versatile languages?

I passed the last year coding - boring web stuff - in PHP and Java mainly and had no time for other projects (uGL for example). I've got a free time lately and then i restarted working on uGL again, fixing bugs and finishing the 2DFX module, that was an idea i had for years. 2DFX allows the creation of 2D games with features like different kinds of blend modes that couldn't be done in any QB lib yet. Our upcoming game, the Counter Strike 2D clone, is an example of usage of that module - the game was first written to be a test and to show how 2DFX worked.

>> Explain what DSock is in one sentence, for somebody who has never heard of it before.

DSock is an DOS interface to Winsock, that's the API used in Windows to access the Internet or a local network. No other DOS Winsock library offers the number of options that DSock has, as it tries to be a 1:1 map of the Winsock 1.1 API. If you know how to code net applications/games for Windows, adapting them to QB wouldn't be too hard.

>> What inspired you to make DSock?

Well, that's a long story, that involves being part of the defunct team and.. i don't want to talk about that, sorry.

A screenshot of Connect 4 QB , the first and only finished game to use DSock. This game includes tex
Pin it
A screenshot of Connect 4 QB , the first and only finished game to use DSock. This game includes text chat in addition to online competitive play.

>> Shortly after you released DSock, WisdomDude and Marcade used it to make an online two-player game called "Connect 4 QB". What do you think of Connect 4 QB?

I'm glad they made that game, it was really fun to play and stills be used as an example of how DSock works - well, it's actually the only game that ever used DSock, anyways ;)

>> How exactly does DSock exchange data between players? Is it only suited for slower, turn-based games (like Connect 4 or Pool), or can it handle fast, real-time action games?

It can be used for any kind of game, you can exchange data every frame, as you do to control the local players. Dsock is a small layer between DOS and Windows, there's no polling, no copy, no files, no clipboards being used. The only difference between a QB game using DSock and a Windows application using Winsock is that a real- to protected-mode is done on each call to the interface, what can slow down things badly, if done many times per second. On a 600MHz CPU or better it won't be a big deal.

>> Recently on the badlogic QuickBasic forum, you posted a screenshot and information about your upcoming Counter Strike 2D Clone. (It looks amazing, I might add!) How do you plan to handle online multiplayer support for that game?

Thanks ;). We plan to use the original CS2D protocol, so you could be able to play against other players that are running the original game and join their servers - that will have more players than any QB-only server would, of course. The problem is that.. we don't know the protocol used :/. CS2D is closed-source and the developers don't want to tell us about the network protocol, because it's not secure enough yet and such. We will see what can be done.

>> What are the main limitations of DSock?

Mainly the limitation of DOS, real-mode and QB ;). It's hard to create servers, because you need linked-list that are a pain to do in QB. There's the penalty of real-mode to protected-mode switching that is needed in most calls done to DSock routines, as the Windows drivers run in a different processor mode. The bad part is that the Windows 9x/Me version is NOT bug free, it can crash the DOS box sometimes, mainly because the interface is *completely* based in hacking, done by me and coders that wrote other Winsock DOS interfaces. The Windows NT/2k/XP driver is pretty solid, never had any problems with it (*knock on wood*). Now that most people switched to Windows XP, well, i don't think it's really a problem - i can't debug the Windows 9x interface anymore, i've only XP installed on a NTFS-formatted HD.

>> Since its release, only one finished game has been created with DSock. Why do you think so few QB programmers have tried DSock?

Well, coding a network protocol for a game is not an easy task, you probably know. It seems simple when you plan do add that, but turns into message processing, latency compensation, players synchronization and so on.. For most coders (including me), Winsock can be a bit confusing when you start working with the API and yet you can use blocking sockets together with threads in Windows, what makes a server much easier to write, and that can't be done in DOS, unfortunately.

>> Have you and Blitz ever considered bundling DSock as part of uGL?

I thought about making a high-level game protocol on top of DSock, that would be added as a new module to uGL. If we get CS2D really to multi-play, we will probably have half of that module done, then it may be adapted to a generic one, if i've free time and there's enough interest :P

>> Any final words?

Thanks for the interview, that was the first one i got invited ever ;).. Keep the good work with your site, QB really needs that!

← previous
next →
loading
sending ...
New to Neperos ? Sign Up for free
download Neperos App from Google Play
install Neperos as PWA

Let's discover also

Recent Articles

Recent Comments

Neperos cookies
This website uses cookies to store your preferences and improve the service. Cookies authorization will allow me and / or my partners to process personal data such as browsing behaviour.

By pressing OK you agree to the Terms of Service and acknowledge the Privacy Policy

By pressing REJECT you will be able to continue to use Neperos (like read articles or write comments) but some important cookies will not be set. This may affect certain features and functions of the platform.
OK
REJECT