updates??
Blitz3D Forums/Blitz3D Beginners Area/updates??
| ||
In Blitz3d, I wanta find a way to update the content in my game w/o having the gamer download a new .exe for a minor change!? And have it automaticly update every time it runs??? and downloads them off of the website!?!?! sry if I repeated my self and many thanks in advance!!! |
| ||
That's easy updating the media side of the game. Just download the new media files using the old file names and your program will automatically load them. I think you need to look into sending/receiving TCP Streams. this code: ; OpenTCPStream/CloseTCPStream Example Print "Connecting..." tcp=OpenTCPStream( "www.blitzbasic.com",80 ) If Not tcp Print "Failed.":WaitKey:End Print "Connected! Sending request..." WriteLine tcp,"GET http://www.blitzbasic.com HTTP/1.0" WriteLine tcp,Chr$(10) If Eof(tcp) Print "Failed.":WaitKey:End Print "Request sent! Waiting for reply..." While Not Eof(tcp) Print ReadLine$( tcp ) Wend If Eof(tcp)=1 Then Print "Success!" Else Print "Error!" CloseTCPStream tcp WaitKey Endgives you an idea of what you need to do to communicate with the web server. (I don't know much about how to get the server to communicate back, networking isn't my thing) Depending on the update info the server sends back, download the appropriate files. |
| ||
Wolron - I don't mean to be rude, but you say things are 'easy' yet you don't explain how to do them. He clearly doesn't know how to "just download the new media files". Perhaps you could post him a code sample to help with this? |
| ||
I was, I wasn't finished editing my post. That's easy updating the media side of the game. Just download the new media files using the old file names and your program will automatically load them. I was saying that it's easy get the program to update media files without any change of code. No code is required to tell him that.I don't know if there is an easy way to update the .exe without downloading the entire new one. Someone else will have to answer that. |
| ||
I emailed him the code. |
| ||
Cool - although I'd replace the URL if I were you, with one that doesn't try and download ghastly spyware when you click on it. :) |
| ||
WTF, I got that code from the help files??? |
| ||
WTF, I got that code from the help files??? Yup, but it appears that the blitzbasement.com site isn't around any more. It goes to a search engine, tries to change your start page and downloads some horrid IE plugin. |
| ||
The code just connecting to the internet! it doesnt get the update and download it into the areas its needed |
| ||
It can be a pretty advanced feature to implement. Make sure you study up on whats actually required to do behind-the-scene before you implement som networking code. I believe its easier to just download the new exe file and replace it with the old one, that said, you must already be running a special "update-program" and not the game file you're going to replace as it would be read-only. There's no general "code that downloads the updates and puts it where its needed" that fits every game.. you need to customize that yourself to your particular game.. AND you need to customize the webspace/ftp/whatever to accept logins and such. |