Ambiera ForumDiscussions, Help and Support. |
|
|
|||||
|
I am making a game that will update automatically when it is out-dated.So in basic words I mean I need auto update system in Coppercube in PC. How to do this? |
||||
|
Iether you have to build a third part download manager where there may be opensource templates on the web in C++....Otherwise, you can just spend 100 dollars and put the game on steam which has it's own download manager for your game...The player can choose to set up automatic updates...Why reinvent the wheel ey? |
||||
|
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 "HTTP" page (HTTPS didn't work when I tested it.) Example: I created this page: http://pastebin.com/raw/qLMRHYZ6 On that page, you'll see only the number "1.0.1". You should create a page on your website with a name like "current-version-of-my-game.txt" and only write a number on it, like 1.0.1, without newlines after it. Then, in your game, you must create a variable that is called "VersionNumber". Your first version will be called 1.0.0. As soon as your game starts, your game will compare its "VersionNumber" 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: https://drive.google.com/file/d/... 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 "Before first drawing, do something", and then look inside of the script and look at the first line. The first line says this: ccbSetCopperCubeVariable("VersionNumber", "1.0.1"); The game compares that number 1.0.1 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: ccbSetCopperCubeVariable("VersionNumber", "1.0.0"); After you do that, please start the game and you will see that the code notices that the version number "1.0.0" doesn't match with the version number on the website, so it will tell you to press Enter 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 "ShouldPlayerBeAllowedToUseOldVersion". 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 "1" so people could still continue using old versions. If you set it to "0", 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. |
||||
|
Hi, Zoo I don't want to pay anyone! Hi, Wild Master I was not using Coppercube for a number of reasons. So I also didn't posted anything here. Thank you for your idea. It's super great. I don't want any more smarter person. You are smarter! ;) But how do I set that do not go to game scene? How do I set that If the version is out-dated then the player is not able to play the game Anyway Thanks for the script! |
||||
|
Hi guys...that is clever, it might not be automatically updatable but it is an equivalent solution... I like it, clever |
||||
|
You can put the gameplay on another Scene and use Scene 1 only as a start screen and for checking for updates. Try this example: https://drive.google.com/file/d/... I used a variable called "CanGameStartNow". If the gameplay can start, that variable is set to 1. If the Spacebar is pressed while that variable is set to 1, the game will switch to Scene 2, which contains the actual gameplay. |
||||
|
Thanks! You are very Clever! |
||||
|
Hi I usually keep all ccb files I get so I can use or learn from them later but your ccb file is somehow lost and I can't get the permission of the google drive link you gave. So.... Please grant me access or re-upload it! Please |
|