Jump to content

  • Log In with Google      Sign In   
  • Create Account

Sayid Ahmed

Member Since 11 Mar 2012
Offline Last Active Jan 16 2016 09:17 AM

Topics I've Started

Reputation Changes

30 March 2012 - 05:36 PM

My reputation has gone from +6 to -4, to +4, and back down to -2, and I've only been a member for a couple of weeks.

Is this normal, or am I loathed by some very sensitive people?

This post here got me -2, what the hell did I do to upset someone, lol?

Ticks in PHP Games

27 March 2012 - 10:09 AM

With my current project the biggest challenge will be implementing the tick feature of my PHP + MySQL game. To briefly explain, my game is strategy based, is largely text-based (may have some javascript features later on). The following data will be stored in database tables and will need to be updated somehow:
  • one continuous 'world' with each player with their nation statistics
  • resources, units, research, production and such will all be updated on a tick basis (10 min periods, maybe?)
  • long term statistics; e.g. political party popularity for each player updates every 2 weeks
  • battles will be ticked and can last for days
Which begs the question of how to implement this tick system. The long term stuff and low bandwidth stuff can be arranged by cron job - simple solution probably. It's the resources and battles and all that stuff that I'm curious about. Most online advice says use timestamps and only update on request by the user, but is it actually that much more efficient? Anybody have any experience with it so they can benchmark?

What bothers me is that, one of the core features of the game will be trade, and with that you need a market place with lists of buy and sell orders. These will need to be kept up to date and every time the user visits the 'market.php' page it will have to do a search query and update it accordingly. I'm worried this could take very long and by the time the user chooses to buy or sell something, the data has changed and they'll get the wrong order when they submit.

I'd guess some of this data can be cached and work quickly but I have no experience with this.


Game Economics

27 March 2012 - 09:34 AM

I posted this in another dev forum focused on web games, but I didn't get much discussion and I'm really sad so I thought I'd post it here. I'm hoping I'm not being delusional here by trying to recreate these economic concepts into a simple PHP game; hopefully you guys can criticise and help me out in the planning of my economy and politics driven text-based game.

Economics in games is something that fascinates me, including how much some game developers pay attention to it (EVE Online, Darkfall, Wurm Online) whilst others disregard it. I am trying to create a PHP game which has a strong element of economy, which will hopefully tie in with the military and political module I will create for it. Here are just some thoughts about in-game economy which I take into account when designing my game and maybe we can have a good discussion about it:

Resource sources & sinks:

Quite simply, if too much of a resource is being generated in a virtual world without there being anything to consume it, its value drops. If you have a game where every time you kill a sheep, it drops 3 coins of currency, then over time loads of currency is being easily pumped into the game and all your players are earning money, that currency is now no longer hard to earn, and where a chainmail helm would cost 300 coins it might as well sell for 3000. As a game dev, you could counteract this by making things cost more, such as travelling, skill training, levelling up etc etc, and by doing that you are adding function to that currency and giving it more value. This doesn't apply to currency only, but any resource really.


The main function of currency is to have a medium where resources can be exchanged easily. An economy without currency would be a barter system, whereby if I was a farmer and I wanted a shovel, I would probably have to get a sack of grain, trade it in for a shovel, or if not, trade it in for some wood and iron and probably craft a shovel myself. Now this may sound like a bad thing in real life, but perhaps in your game you want there to be a barter system, that way you encourage players to be more reliant on your crafting system and develop a broader range of skills to make them more self-sufficient. If my history is correct, some areas of Northern Europe during the Dark Ages had a lack of precious metals, trade had collapsed and so society became dependent on sustenance through farming and mining and crafting; land had more value as a result, and so land grabbing happened more often. Whilst in the Middle East and Byzantine Empire, trade was still strong and so urban and sophisticated lifestyle could carry on.

Trivial Resources:
Some games seem to have this problem where they assign no distinct use to a resource, as a result it has little value, and the reward of conquering a country/player which has that resource is little. Supremacy1914 is an example where the resources are fairly balanced. In this game, all provinces have an energy requirement and that can be fulfilled by either coal, oil or gas. Coal can power railroads, oil can fuel tanks, but natural gas has no particular use. The demand for gas is then low, but the need to build industry and other resource boosters in natural gas-producing provinces is also low. As a result you'll find players selling their gas reserves at a similar price to oil and coal, but then never restocking them, making you wonder whether that resource is just trivial and not actually needed?

Free Market vs Fixed Pricing
Some games, mainly MMORPGs, have NPC vendors where resources or items are sold at fixed prices (or maybe proportional to your level/skill) and don't actually respond to economic demand. This has the problem of meaning the world's money sinks will remain quite constant and not adapt to any change in the money sources. In the sandbox world, like EVE Online, players dictate prices and are free to produce, trade and invest in resources or items in order to make money.

Perhaps in your game you could follow a similar model; lets say in your game, iron is used to make weapons and armour. The net amount of iron consumed has increased over time, but the net amount of production of iron has dropped or stayed the same, or the big iron producers are stockpiling their iron or whatever. As a result, demand has increased and supply stayed constant, so the price in iron should increase. This would only happen if the iron producers recognise there is a growth in demand and can bump up their prices. If they do, those players who consume iron will have an increase in their costs, would have to compensate by selling other resources they have, or even better, go to war and grab some iron. This way you are using the economy as a driving force for certain modules of your game. As a dev, you can improve this process by giving your players trends and statistics to improve the chances of your players recognising where there are shortfalls or abundances in certain resources and items etc.

VAT for in-game currency?

11 March 2012 - 09:04 AM

In the UK, does your company have to charge VAT on selling in-game currency for an online game? I guess another question would be: is VAT applicable to any online transaction you charge?

Assuming you are already VAT registered and yadaya.


New Browser MMO Dev

11 March 2012 - 08:57 AM

Hi everyone,

I'm new here and I'm going to be making an MMO browser game from mainly PHP and MySQL (and hopefully some javascript or ajax in the future for some UI and all that crap) for the sake of fun and adventure and glory of making a successful website. The game is going to be a military strategy game but with a strong emphasis on economics and political simulation, in order to encourage co-operation and competition and roleplay. It's going to be aimed at a more 'mature' audience than your average browser game player as it's going to be less flash and more substance (probably the biggest challenge?). Right now, I'm still exploring how PHP and MySQL will work for me, as I write mechanics and economics on paper and I try to find ways that PHP can simulate it.

My drive to do this is the fact that I see 99% of browser games as crap, filled with trivia and over-blown design with no strategy, no intuition, no real co-operation - I also have this problem with most MMOs. To give some perspective, Supremacy 1914 and Nation States are the only browser games I like, and EVE Online is the only MMO I love the concept of (don't have the time to play it).

Anywho, I was wondering if there's a dedicated forum to browser games or even MMO anywhere here, or some nice blogs or threads to point me in for some discussion and inspiration? Where do we discuss stuff like economics, creative forum?

I should note that I've never done programming, and my real trade is engineering.