Network support...

Moderators: Der Wanderer, Blackbird

Network support...

Postby A500 » 24. May 2017, 00:08

I posted in the amiforce.de asking if there is a network support for blitz basic v2, but I start to think the answer is no. So I am asking here in hopes there is network feature. Is there a network feature for amiblitz 3? If so, where do I go to find tutorials and examples of network? I am not asking through parallel or serial either, but using asdl/ethernet and using file.device to access network. Thanks in advance.
A500
Newbie
 
Posts: 39
Joined: 6. October 2013, 06:44

Re: Network support...

Postby Daedalus » 29. May 2017, 09:51

There is, though the documentation isn't all that great. Check out bsdsocket.include.ab3 in the Sourcecodes/Includes drawer. It includes functions to let your program use bsdsocket.library, and a simple demo program is built in.

Edit: Regarding Blitz 2, well, nope, there isn't network support in Blitz 2, but it might be possible to use the AB3 include with BB2 with some modifications. I've done this with other includes when I needed to use Blitz 2 but wanted the convenience of the AB3 includes.
User avatar
Daedalus
Newbie
 
Posts: 41
Joined: 12. May 2014, 23:11
Location: Glasgow, Scotland

Re: Network support...

Postby A500 » 30. May 2017, 23:55

Daedalus wrote:There is, though the documentation isn't all that great. Check out bsdsocket.include.ab3 in the Sourcecodes/Includes drawer. It includes functions to let your program use bsdsocket.library, and a simple demo program is built in.

Edit: Regarding Blitz 2, well, nope, there isn't network support in Blitz 2, but it might be possible to use the AB3 include with BB2 with some modifications. I've done this with other includes when I needed to use Blitz 2 but wanted the convenience of the AB3 includes.


Thank you soo much, so much, so much for answering my question. I have one final question to ask and I want to thank you in advance for taking your time in answering it :D How do I do it? How do I take the AB3 include from amiblitz 3 and put it with BB2 and what sort of modifications I need to make it work? Can you please help me on this?

I just need full network support AB3 feature as my intention is to be making games with network/online game support. The first game I want to make with online support is tic tac toe. You select network in the menu..it opens a new screen with available hosted servers, and each server either have 0/2 or 1/2 or 2/2 where 0/2 where there is no one playing that server, 1/2 one joined the server and waiting for another person to join to play against and 2/2 two people are playing live on this server and you need to wait until one leaves the server before you can join against that opponent. In the the game you will be chatting live with the opposing team in an online game tic tac toe.

So this is what I need in the library available for my blitz basic 2 project. Another thing if I am stuck in getting the network feature implemented, would you guys be able to help me on this?

I REALLY NEED to implement this feature.
A500
Newbie
 
Posts: 39
Joined: 6. October 2013, 06:44

Re: Network support...

Postby Daedalus » 31. May 2017, 11:24

I haven't done much with it other than run the demo code, which was fine, but I do have vague plans not dissimilar from yours to add simple network support to a turn-based game. But the specifics of coding the networking bit I'm not very familiar with. Hopefully someone else might be able to help, though it's quiet around here these days... The thing is, the bsdsocket.library calls are standard, so you might get non-Blitz-specific help elsewhere that would apply equally well.

As for getting the include into Blitz 2, well the way I've done it for other includes is to open the AB3 file in Blitz 2, save it as a .bb2 file in Blitz2:Includes (or anywhere you like that you can easily reference), and then go about modifying the code to suit. The commented section at the start can be removed anyway, and remove any Syntax or Optimize commands in the file. This might cause issues further down the code where the new AB3 syntax has been used, so you just have to go through until it compiles without problems. You might also need to manually define some constants at the start of the code, e.g. #__include = 0 for your project, and #__include = 1 to run the internal demo.
User avatar
Daedalus
Newbie
 
Posts: 41
Joined: 12. May 2014, 23:11
Location: Glasgow, Scotland

Re: Network support...

Postby A500 » 31. May 2017, 19:07

Thank you so much! I will do exactly as you suggested! :) You are the best. Is there an IRC channel or something with amiblitz for people to join in? I would love that a lot.

By the way, do you know of a website that ask me to set the screen resolution (virtually) and allow me to draw using the drawing tools and then convert the graphics into DATA that I can use then to read it in basic and draw it that way? Second of all, if I want to avoid using Wline, or line or box or circle commands and have the image drawn using Data how do I read the data and plot it in the screen?
A500
Newbie
 
Posts: 39
Joined: 6. October 2013, 06:44

Re: Network support...

Postby Daedalus » 31. May 2017, 21:25

There's not as far as I know, but you could try and of the standard Amiga channels on EFNet or Arcnet. Also, there's a Blitz subforum on eab.abime.net that is a little less quiet than here.

I don't really know what exactly you're trying to do. I'm sure there are lots of websites that let you draw and save the image as a graphics file. What about using something like DeluxePaint or PersonalPaint? Both will save IFF images which can be loaded directly by AmiBlitz, then "blitted" in the window or on a bitmap. Check the Blitz documentation for LoadShape, Blit and WBlit for details.
User avatar
Daedalus
Newbie
 
Posts: 41
Joined: 12. May 2014, 23:11
Location: Glasgow, Scotland

Re: Network support...

Postby hackball » 1. August 2017, 23:47

I will look for the srcs i've collected so far; but i can certainly say there is network support in BB2, and therefore, for AmiBlitz. There was a DARK (?) Browser-like engine to show that functionality.
As always: I fit is system friendly and not to much loaded with UNIX/POSIX/BSD and sh*t like that you can certainly do it with BB2 as well.
Amiga. Just to let ya know....
User avatar
hackball
Master
 
Posts: 107
Joined: 1. September 2013, 20:21


Return to Questions & Answers

Who is online

Users browsing this forum: No registered users and 1 guest