Olliepop 0 Light Poster

What would the workflow/logic be for distributing resources to players?

I currently have a Java server as a component to the game, would you suggest i just distribute X number of resources to players every second? (X is defined in the database)

Or are there any mathematical formulas which can help me with this problem which wont require the use of my Java server? An example of mathematical formula, to work out how long is left on constructions in the queue i just use { time() - CURRENT_TIME }

This is in the PHP section because the entire thing is written in PHP

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.