BlitzPlay lib

Blitz3D Forums/Blitz3D Programming/BlitzPlay lib

...I would like to hear from folks whos using this library already, what is the current status (supported, not supported, etc), becouse i was interested to purchase full version but so far i never receive any reply from author (I emailed him few times)...so, I would like to know if you guys know whats going on here...if this library not supported or whatever anymore..I would like to hear from you, what is the best available alternative with same or even better features...thanks guys..

I thought I read about this a while back. The same thing: it seems that the author of BlitzPlay cannot be contacted anymore, so only the free version is available.

I have the Pro version and it's mighty snazzy. Comes with examples to help you along and some good docs. Sadly, it's not supported anymore.

A possible alternative:

http://www.rottbott-studios.com/rottnet.html

or http://www.krylarskreations.com/knl.shtml

Or Kurix's well-regarded RakNet wrapper.


A shame about BlitzPlay, and more specifically The Vanishing Of John "Surreal" Arnold.

..hmm..I tried BlitzPlay demos...within LAN environment its working just fine, but over internet with my friend its not working...anyone tried this over internet?? Am I missing something, since I didnt change nothing in original demo source..

Yes it works over the internet, I've had 8 people connected simultaneously in a large 3D world. If you have a firewall ensure the correct port is open. Both the client and the server need to be accessing the same port. Check out the code for port info. When I was messing with it I had the port as a manual entry on launch so the server could choose.

I have the free version as well. Can you really expect to get 255 players online at the same time? Specifically if you don't do any fancy coding yourself and you're doing it over the internet?

markd, when I use to try demos, I firewalls on both sides was disabled, as i said, I didnt try anything but original code..do you mind to email me example code you use to play with successfully over internet, suitable for lite version??

I'll have a look tonight. It's on another hard drive so it'll take some digging. Hopefully it's still there :).

..do so please, becouse I would like to examine your working files in to details in order to understand library properly, and so, if you willing to sell your copy i will pay full price you pay for it, if you are not going to use it anymore..but let me see those internet working files please..

I had some trouble getting the example to work too. For me, the solution was to enter my complete ip adres when hosting, instead of using localhost. (127.0.0.1)

i wonder if it would be legal, if we (the lucky owners of the pro version) would make the pro version opensource? its nearly two years now since the last appearance of surreal and i for myself did quite a lot of improvements and additions (e.g. distance based lod [near players get more updates than ones that are far away etc]) i would like to share with the community!

but really...there is no blitzplay-community left...if you look here: http://blitzplay.proboards29.com/index.cgi

i think it would revive the bp-com if there were more users who actually could get their hands on the pro version...

what do you guys think?

I don't know .. might be best to try and contact him about this. 'surreal' was there a few months ago:
http://www.blitzbasic.co.nz/Community/posts.php?topic=64233
However, his last login was in 2005:
http://blitzplay.proboards29.com/index.cgi?action=viewprofile&user=admin

i wonder if it would be legal

No, but it's up to you whether that stops you or not.

@ B32
I replaced default ip 127.0.0.1 with my own, but I still cant connect with other machines on internet..firewall is turned off on both sides I tried...what can couse this malfunction?? Its really annoying..

I can imagine this is frustrating. I have no idea .. I was able to connect to somebody in the USA, with both BlitzPlay and the JoinNetGame command.
For getting my IP in Blitz, I used this code:
        ips 	= CountHostIPs("")
	If Not ips Then End
	hip 	= HostIP(1)
	Print DottedIP(hip)

One thing you could try is letting the other machine serve instead of your own? Anyway, here is the code I ran that worked, I rebuilt the BlitzPlay example:
;-----------------------------------------------------------------------------------------------------
;										BlitzPlay 2d example
;-----------------------------------------------------------------------------------------------------

Include "BPliteV1.14.bb"

SeedRnd MilliSecs()

Type player
	Field x
	Field y
	Field netid
	Field name$
	Field say$
	Field colour
End Type

Global guest.player
Global host

;-----------------------------------------------------------------------------------------------------
;											Setup()
;-----------------------------------------------------------------------------------------------------

Cls
FlushKeys
myname$ = Input$ ("Your name? ")

If Not debug Then

	ips 	= CountHostIPs("")
	If Not ips Then End
	hip 	= HostIP(1)
	Print DottedIP(hip)

	hostyn$ = Input ("Host or Join (h/j) ? ")
	host = (Lower$(hostyn$) = "h")

	If host Then	
		My_Port = 2222
		If Not BP_HostSession (myname,10,1,2222,10) Then
			Cls
			Locate 0,0
			Print "Host port was unavailable..Push a key to exit.."
			WaitKey
			End
		End If
		
	myself.player = New player
	myself\name$ = myname
	myself\x = 160
	myself\y = 120	
	myself\netid = BP_My_ID
	myself\colour = Rnd($44, 16777216)

	Else
	
	Print "Host port = 2222"
	Print "(Blank for Local IP)"
	IP$ = Input$("Please enter the host's IP? ")
	Select IP
		Case ""
			IP$ = "127.0.0.1"
			My_Port = Rand(3000,4000)
			If Not fullscreen Then
				width = 600
				height = 200
			End If
		Default
			My_Port = Input$ ("What port would you like to use? ")
			If Not My_Port Then My_Port = Rand (3000,4000)
			If Not fullscreen
				width = 600
				height = 600
			End If
	End Select
	Cls
	Text 200,50,"Connecting! (Hit [esc] to cancel)",True,True
	Select BP_JoinSession (myname,My_Port,IP,2222)
		;Handle any of the reasons if we couldn't join.
		Case BP_NOREPLY
			Cls
			Text 0,0,"No reply in specified timeout period.. exiting"
			WaitKey
			End
		Case BP_IAMBANNED 
			Cls
			Text 0,0,"You have been banned from joining this game.. exiting"
			WaitKey
			End
		Case BP_GAMEISFULL
			Cls
			Text 0,0,"The game is full.. exiting"
			WaitKey
			End
		Case BP_PORTNOTAVAILABLE
			Cls
			Text 0,0,"Port: " + My_Port + " was not available.. exiting"
			WaitKey
			End
		Case BP_USERABORT
			Cls
			Text 0,0,"Connection attempt aborted!"
			WaitKey
			End
	End Select
	;Oh, we're allowed in? here we go!
	myself.player = New player
	myself\name 	= myname
	myself\x 		= 160
	myself\y 		= 120
	myself\netid 	= BP_My_ID
	myself\colour 	= Rnd($44, 16777216)
	
	End If
	
End If

;-----------------------------------------------------------------------------------------------------
;												Game()
;-----------------------------------------------------------------------------------------------------

Graphics 		320, 240, 0, 2
SetBuffer 		BackBuffer()

ix 	= 100
iy 	= 100

;main loop
While Not KeyHit(1)

Cls

If KeyDown(203) Then ix = ix - 10
If KeyDown(205) Then ix = ix + 10
If KeyDown(200) Then iy = iy - 10
If KeyDown(208) Then iy = iy + 10
If ix < 0 	Then ix = 0
If iy < 0 	Then iy = 0
If ix > 320 Then ix = 320
If iy > 240 Then iy = 240

myself\x = ix
myself\y = iy

Tyme = MilliSecs() / 20

If Tyme <> chk Then
	BP_UpdateNetwork
	HandleMessages
	msgtosend$ 		= BP_IntToStr(Int(Tyme), 3) + BP_IntToStr(Int(myself\x), 3) + BP_IntToStr(Int(myself\y), 3) 
	BP_UDPMessage 	(0, 1, msgtosend)
	chk 			= Tyme	
End If

;draw players
For guest = Each player
	Color 0, 0, guest\colour
	cx = guest\x
	cy = guest\y
	Text cx, cy - 20, guest\name$, True, False
	Oval cx, cy, 10, 10, True
Next

Flip

Wend

End

;-----------------------------------------------------------------------------------------------------
;  										    Handle messages
;-----------------------------------------------------------------------------------------------------
Function HandleMessages ()
	For msg.MsgInfo = Each MsgInfo
		Select msg\msgType
			Case 255
				guest.player = New player
				guest\name = msg\msgData
				guest\x = width/2
				guest\y = height/2
				guest\netid = msg\msgFrom
				guest\colour = Rnd($44, 16777216)
			Case 254
				For guest = Each player
					If guest\netid = msg\msgFrom Then Delete guest
				Next
			Case 253
				For guest = Each player
					If guest\netid = msg\msgFrom Then Delete guest
				Next
			Case 1
				time% = BP_StrToInt (Mid$(msg\msgData, 1,3))
				newx% = BP_StrToInt (Mid$(msg\msgData, 4,3))
				newy% = BP_StrToInt (Mid$(msg\msgData, 7,3))
				newz% = BP_StrToInt (Mid$(msg\msgData,10,3))
				For guest = Each player
					If guest\netid = msg\msgFrom Then 
						guest\x = newx
						guest\y = newy
						guest\z = newz
					End If
				Next
		End Select
	Delete msg
	Next
End Function

If that doesn't work, :/ then I don't know.

..nope..its dead..as usual I got "No reply in specified timeout period.. exiting" .. thats my buddy...damn! Firewalls is down on both sides, and I dont have any clue why this happening..I tried same port for both sides (2222) then I tried hosting machine 2222 and other machine any between 3000-4000 as it is in demos...and nothing..

is there any chance that connection is interrupted by Avast?? Or maybe if I have some other programs running online (MSN, or FTP upload)?? Even i think its ridicilous if such a things cousing this problems..MSN was all time online due sync with my friend on other side regarding testing ...

Perhaps a NAT problem with routers? Ports not being forwarded?

The code as-is worked fine for me too, so there's got to be *something* case-specific...

How to check is it NAT? I'm using wirelles internet connection if that means something 1mb/s..

I mean..if BlitzPlay is full suite for networking, how come such a things happening?? Rest of the games/aplications with similar use working just fine..

..okay, regarding http://www.portforward.com , I have some external IP adress, what is completely different than one i can see in preferences within network settings when I run demo programs in B3D..so, i assume this is external IP adress of router...so is that maybe possible reason why things not working here?? If so, how to bridge this stuff?? And B32, LineOf7s, what did you put as a NAME during program execution?? Host name seen if you run IpConfig /All within command prompt or any freefrom name during connection over internet??

to get your real global ip once: http://whatismyip.com

to automate this you would have to use a webserver on your own, put e.g. a php-script like "<?php echo $_SERVER['REMOTE_ADDR']; ?>" up, call that script within your code and use its output (your ip) for setting up your connection.

IP I got from site you recommend is same as one from portforward.com .. now..what you saying is that I have to use this global IP when client side asking for host IP? If so, how to do that when BlitzPlay demos, in Host mode detecting IP on my machine, not global one??

hey B32 and LineOf7s, can you guys check your external IP is it same as one you have listed in TCP/IP properities within system network properities?? I'm quite sure this double IP's is problem I have..

I get the same IP with whatsmyip, ipconfig and the blitz code above.

I have two IP addresses, as expected: I have my "internal" IP address, as do all other computers on my lan, and my "external" IP address attributed to my router and which is visible to the internet.

Now if something/someone wants to connect to my computer here, then they need to connect via my router first (using my external IP address). Whatever port that application is trying to connect on needs to be forwarded to my internal IP address by the NAT table set up on the router. Any attempts to connect to me via a port that's not set to come to my computer explicitly, won't connect.

If you're both behind routers, then you'll both need to make sure you have the appropriate ports forwarded properly in order to connect to each other.

But then do programs as messenger use 'standard' ports that are forwared by default ? And is it possible to use these ports in blitz too ?

yup..as i expected..thats reason why things not working on my side...

@B32
How come you have same external 'internal' IP's??

A for me, since I am using shared wirelles connection it seems that i will not be able to set up router since its on my ISP side...huhh

I have no idea .. I didn't know there was a difference

Anyone have any info if the pro version can be released? Id really like to get my hands on this... and would of bought it if I would of known about it sooner.

The pro version can be released when John "Surreal" Arnold releases it, and not before.

Of course, if he were around to release it (as freeware, I presume you mean), then we wouldn't have the need for him to do so, would we?

I hope he's just really really busy.

..well..Lite version can help..after some tweaking over library itself, its easy to increase number of possible players more than 255...but I'm looking forward to purchase Pro version, if man appear...so far, every try to contact him was not successful..

If the Lite version won't do everything you want it to, and you don't feel capable of extending its capabilities yourself, then rather than waiting around you may well be better served assessing the suitability of some of the alternatives mentioned above.

Just a reminder.

I've emailed the shaw account with a question and a link to this thread.

Let's see if something happens.


Andy

..if Surreal dosent appear or whatever, is there any of the existing BlitzPlay Pro users willing to sell their copy?? I'm ready to pay full price as they did for it..

Naughty, just get the BlitzPlay Lite demo and then add your own additional features. :)

So is that the onyl difference really some added functionality? Theres no limitiations or anything like that in the lite version?

I have been already modify Lite version so its right now unlimited number of users available...right now I'm trying to figure out how to make file transfer functions...anyway, it will be still better to purchase proper version and award hardwork Surreal put in to this lib and at same time save myself of doing something whats already done..

Well personally I wouldn't go chasing down someone and reward them with a sale for abandoning their product/customers. I'm sure there's peeps here who know how to transfer files and would be more than willing to help. My guess would be to get the file extension, transfer the file byte by byte, then save it with the file extension on the other side. Something like how the transporter works in Star Trek. :)