You asked me some questions in PM, but I like to do my help in public, so here are the answers:
Assets in ‘resource directory’ - Correct, you cannot delete these, nor can you write to this area.
Assets in ‘documents directory’ - Correct, you can write here and delete files you have placed here.
What kind of server set up on Digital Ocean - Not a one line answer. Outline of steps below.
Digital Ocean Suggestions
Please note, I am not an expert at this stuff. I have done a little of this work but I prefer to let others handle the web-server, DLC-server side of the task.
That said, if you choose Digital Ocean, I’d do this (read all first):
Stage #1 - Standalone game FIRST
Write your game first, do every part of the game except:
Download images code. Fake this up, but don’t actually connect to a server.
Test, test test… - Make sure your ‘fake downloads’ work and you work out the kinks of showing new content from your ‘fake download area’. This can be a folder under resources for now.
Stage #2 - Create LAMP server
(See Tip at bottom of post on how to save time/money doing this.)
- Create an account.
- Create a Project
- Add a droplet with these settings:
- Select ‘Marketplace’
- Select LAMP on Ubuntu 2.0.04
- Plan: Basic Shared CPU
- Lowest tier: $5/mo
- Datacenter region: Choose one close to yourself (this will ease working on the droplet; later if you need to expand you will have several options to increase your ability to handle traffic. This is too broad a topic to go into now.)
*Additional options: None.
Stage #3 - Write PHP code on your server
Write PHP code (on your new server) to handle requests for assets. i.e. This code handles requests from your game asking to download images/files.
Stage #4 - Write actual code in game to interface with PHP on server.
(This really overlaps with stage 3 since you will need to adjust both at the same time.)
- Change your fake DL code and start working out the bugs in downloading content from your server.
(Tip: I’d write a simple app with module designed to test connecting to the server and downloading content. Then, when you get the module working, copy it to your game and use it there. Never do this kind of development in game first. It is too messy.)
Stage #5 - IAP
- Write the IAP code to unlock the ability to download puzzles or perhaps use consumables to buy puzzle packs.
- Test test test.
Stage #6 - Publish
Tip: Regaring the LAMP server. If you have a decent computer, you can use virtualbox or vmware to set up a virtual server right on your own machine. Then, you can set up a LAMP server in the VM and write all the PHP code and test it there. This will be way cheaper and faster to test with since the downloads will be from the same physical hardware.
Once you have that all ironed out, you can deploy the PHP code to your DO server. i.e. Wait to set up the DO (or other) server till you really need it.