≡
Products
▼
Support
▼
Company
▼
Forum
Ambiera Forum
Discussions, Help and Support.
Create a new account
,
Search
, or Login:
Create reply in
Auto update system
Posted by:
(you are not logged in)
Enter the missing letter in: "Int?rnational"
(you are not logged in)
Text:
[quote][b][/b] wrote: Hello, behroz-khan. I haven't seen you here for a long time. I don't know if CopperCube can create an update system that's fully automatic, but I created an example that you might accept until a smarter person appears to tell us if it can be fully automated. You must create an empty text file on an "[b]HTTP[/b]" page (HTTPS didn't work when I tested it.) [b]Example:[/b] I created this page: [url]http://pastebin.com/raw/qLMRHYZ6[/url] On that page, you'll see only the number "[b]1.0.1[/b]". You should create a page on your website with a name like "[b]current-version-of-my-game.txt[/b]" and only write a number on it, like [b]1.0.1[/b], without newlines after it. Then, in your game, you must create a variable that is called "[b]VersionNumber[/b]". Your first version will be called [b]1.0.0[/b]. As soon as your game starts, your game will compare its "[b]VersionNumber[/b]" variable with the version on that webpage. If it's a different number, you could stop the game from continuing until your customers download the newest version. They can press a button and your website with the newest version will open. I created a CCB file for you, to demonstrate this method. Get it here: [url]https://drive.google.com/file/d/1JF5-hYfZmN-1pkSHZe9erez4pggaLZgH/view?usp=sharing[/url] When you start the CCB file, please test the game, and you will see a message that says you are already using the latest version. Now, please go into the section that says "[b]Before first drawing, do something[/b]", and then look inside of the script and look at the first line. The first line says this: [code][b]ccbSetCopperCubeVariable("VersionNumber", "1.0.1");[/b][/code] The game compares that number [b]1.0.1[/b] with the number on the website and sees that they are the same. That's how it was able to check that the newest version is already being used. Now please change that piece of the script to this: [code][b]ccbSetCopperCubeVariable("VersionNumber", "1.0.0");[/b][/code] After you do that, please start the game and you will see that the code notices that the version number "[b]1.0.0[/b]" doesn't match with the version number on the website, so it will tell you to press [b]Enter[/b] to open a web browser to download the newest version. My link leads to a download link for the Firefox web browser because it's just an example. You should replace it with a link of the new version of your game. Just always have a text file on your website that lists a number on one line. Don't put a newline after it. I also included a variable called "[b]ShouldPlayerBeAllowedToUseOldVersion[/b]". That variable allows you to decide if you want your players to be able to play without the newest version. I set that variable to "[b]1[/b]" so people could still continue using old versions. If you set it to "[b]0[/b]", a different message will appear that will say the game cannot be played without the newest version. This also checks if your website's page that lists the current version of your game is active. If you set that variable to zero, then your customers will not be able to play if your website is down or if their internet connection is down. Play around with the ideas in the CCB file and build your game around it, unless you hate this method and you want a smarter person to create a better version for you. Hahaha.[/quote]
Possible Codes
Feature
Code
Link
[url] www.example.com [/url]
Bold
[b]bold text[/b]
Image
[img]http://www.example.com/image.jpg[/img]
Quote
[quote]quoted text[/quote]
Code
[code]source code[/code]
Emoticons
Copyright© Ambiera e.U. all rights reserved.
Privacy Policy | Terms and Conditions | Imprint | Contact