Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by Dylan velez · Jan 04, 2014 at 05:44 AM · networking

How to make a game updater/launcher?

I'm making a 2d side scroller platform game and i was wondering.. as i'm probably going to release several versions of the game and/or fixed scripts i will need a launcher that detects if there's a new asset or a new script on the server or if there's a modified version of a script of the server(this could easily be done with checking upload dates right?) and after that starts downloading the files and putting them where they belon.

an example of this would be:

User starts game, launcher window pops up and prompts the user with a new update (can be an updated script,asset,file, rar, etc). User clicks update game button and the launcher connects to the server and retrieves the files. if file is a modified version of an existing one, the launcher goes to it's directory and overwrite the file with the newer version. after that i believe that the launcher would have to rebuild the game.

How do one achieves succesfully that series of requirements? i guess this should be easy as it is just download and overwriting if existing or putting new file where it belongs.

i haven't done any code for that part yet as i just started the project and i'm in the designing phase so don't ask me to see what i've tried. i ask this because i know i lack the required knowledge to complete that task even though i haven't started development.

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
2
Best Answer

Answer by HappyMoo · Jan 04, 2014 at 11:52 AM

The Problem is if you do the checks from the game.exe, you can't overwrite that exe, because it's locked. If you have a separate launcher, it can update the game, but not the launcher itself.

So you would need to develop an application outside the game, which means you have to make yourself sure it works on all your platforms etc.

Check out this simple open source Autoupdater as an inspiration: http://gc.codehum.com/p/sharpdate/

Comment
Add comment · Show 4 · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image Dylan velez · Jan 04, 2014 at 04:58 PM 0
Share

Ok thanks for the link i will take a look at it, but that leaves me wondering. How does people update their games in unity if the game.exe isn't overwritable? and we all know that waiting for the launcher app to download the entire game again and again even if is small is just a bad user experience.

avatar image HappyMoo · Jan 04, 2014 at 05:03 PM 0
Share

If your game finds a new update is up, it cans start the updater and stop itself The updater then starts the download an by the time it has the data, the game is stopped.

Also, you can get as complex as you want with the data you send over... you could create a diff and just send the bytes that changed from version to version

avatar image Bunny83 · Jan 04, 2014 at 05:37 PM 0
Share

btw: the exe file never needs to be "updated" unless you (the developer) have updated your Unity version. The exe is just a player. All your actual game data (including compiled mono assemblies which contains your script code) are located in the data folder. That's true at least for standalone builds which i guess you talk about. Other platforms work differently (web, android, iOS)

avatar image Dylan velez · Jan 04, 2014 at 05:49 PM 0
Share

Thanks bunny, that will probably help me. i'll think about something to modify the data in the data folder and update the game.

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

20 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

A node in a childnode? 1 Answer

Sending an RPC 1 Answer

Unity Networking - Error on spawning Player 0 Answers

Networking - Serving multiple instances of a scene. 0 Answers

Online Multiplayer Oculus Rift Movement issues 0 Answers


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges