Throughout this guide, i'll discuss what is needed for a game world to progress, as well as skills that are needed for such things.
To make a game, the first think you need is to decide on which programming language to go with. Since this is the PHP Forum, most of what i'll talk about is PHP and other web based languages, though games can be developed in practically ANY language.
1.1 Coming up with an idea
To make a game, you first need an idea of what it is you want to build. For example, is the game going to be based on an island, or in the far reaches of space? You need to know where it takes place before you start anything else, as it influences your decisions.
For example, in Star Wars, a lightsaber isn't very useful if the movie was made around ship battles instead of inside the ship.
An idea for a game should be something unique. If there's already a game out there with the idea you want, then you need to really promote it for it to be successful, especially if it's based off of player versus player interactions.
1.2 PvP versus PvE
In any game, there's one of three ways to do it, either PvP, PvE, or a combination of both. To help you decide, here's a list of them:
1.2.1 PvP (Player versus Player)
PvP is a biggie in the game world, and also requires the most knowledge to make successfully. While usually combined with PvE, it can sometimes be used by itself. In PvP games, the game itself is based on Player interaction where one player is up against another player. For example, oGame, a popular Space game, is pure PvP. The entire universe runs on players attacking each other, banding together into alliances, and helping out other players that are your allies.
While pure PvP can be fun to some, for others it's too fast paced and unforgiving, which leads us to our next one.
1.2.2 PvE (Player versus Environment)
In PvE games, a player plays against the computer. Think of single player in your favorite game, that's what this is. While there may be interactions, it's usually with an AI (or Artificial Intelligence) that responds to certain inputs with certain outputs (think of it as a math function. If you put in 2, you'll get out 4.). Many times what the player says or does can affect the outcome of his game (once again, think of a game you've played that has multiple endings (Fable for me)).
1.2.3 PvP & PvE
Many successful games combine both PvP and PvE environments to make a game for players that want to do both. Think of very popular games such as Eve
Online and World of Warcraft. It's up to the player to determine which he wants to play, though they can switch back at any time. For example, in WoW (the common abbreviation for World of Warcraft), players usually start off with PvE elements to level up and unlock new abilities. Then, at higher levels, they can play in PvP matches and try to beat other players characters (with their consent of course).
All games need some type of calculations, whether they're simple or complicated, that's up to you. Any game that has damages, luck, or anything else needs a type of calculation.
Calculations usually use a LOT of math and can take a while to perfect. Don't be afraid to ask for help, DIC is here for that, and as long as you're trying, DIC will be there for you.
Calculations can raise in simplicity from adding, multiplying, etc., all the way up to exponents, functions, trigonometry, etc.. For example, in a baseball game you would need Geometry and Trigonometry to deal with the shape that makes up the baseball diamond. To make it lifelike you would require very complicated algorithms that make use of actual trigonometric functions.
Now that you have a general idea of what you want the game to be, now you need to work on actually making it. If you don't know a programming language, stop right here and go to either W3Schools or Tizag and start learning. Games are an advanced step of programming which requires many of the languages functions, and should not be undertaken by novices.
2.1 Where to start
Where to start is relative to who you are. I know programmers that start with the Database first, and I know ones who start with the scripts. I start with the scripts, and edit the database as I go along to reflect what i've added.
Functions are the backbone of any well programmed and methodically laid out game. Functions are scripts of program that you use multiple times, and are needed if you use OOP (Object Oriented Programming).
Functions themselves are usually in an included file, to make the code on the actual page easier to read.
Scripts are definitely needed for any type of game. They include hard coded things that the player can do, as well as security precautions to protect your database. Just remember that the Database is accessed through your scripts, and that everything needs to be sanitized before it becomes introduced to your database.
The database is the main element of the game, as it stores data to be recalled at another time. Databases can be hacked, however, so i would suggest backing it up daily if possible.
An actual database consists of Tables (which hold rows and columns). The rows are what contains the actual data, and the columns declare what that data is. In a table there's several types that you can declare for it, so make sure that you're using the correct type. For example, if you're storing a true or a false, why use a varchar that can store anything? Just make it a Boolean expression.
2.2 Aesthetic Improvements
The main part of a game is how it looks. if it's a simple text based game with no images, most modern day players would choose another game that is more aesthetically pleasing to them. While the old MS DOS programs that were pure text were nice, and usually had better stories than most modern day games i've played, The gaming Genre has changed from the story of the game to how it looks. Breathtaking cinematics in games such as Final Fantasy have changed gaming forever.
So why have a game that is only text?
Photoshop is the main program for most developers for graphics. It's relatively easy to learn, and does a lot of the work for you. While having a rather large price tag, there's many tutorials online to get you easily started.
Gimp is basically a free version of Photoshop. While not designed by the same company, Gimp aims to take out Photoshop and has many of the same features (though it also lacks many).
Blender differs from the other two in that it produces three-dimensional images (that's right, 3D). Blender is also another free program, and while I don't know many developers that need 3D art, it's worth mentioning to those of you who want that extra aesthetic "kick" to your game.
All game worlds need to move along, especially if you're making a PvP game where players from around the world can join.
If you're making the game Web Based, than you can make use of something on most servers: Cronjobs. These are used to execute certain scripts at certain times (IE: every minute, every 5 minutes, every 15 minutes, hourly, daily, Etc.).
If you're making a game that has ranking, then ranking updates can be daily. If you're making one with resources, you might want it to be done every couple of minutes.
3.2 Another Method
While cronjobs are nice, if your server doesn't support them, or you can't figure them out, there IS another option, which i'll try to explain as best I can.
Think of it this way: If no one is online in the game, does anything HAVE to update? You might be saying yes: Resources. But you're wrong. Resources would only need to be update when someone would see them.
So, if you add a time column to your database, and store the last timestamp when it was update, all you need to do is make a script that will update it when it needs to be updated.
For example, lets say you add turns every 5 minutes. A player logs on at 3:00 PM. He plays until 3:20 PM. That means he has updates from 3:00, 3:05, 3:10, 3:15, and 3:20. Now, if he logs on again at 5:00 pm, he would be missing the time from 3:20 to 5:00, which is 20 updates. Using my method, the script would see that he is missing 20 updates, and would account for that, adding in his 20 updates.
Just think: What's he gonna do with his resources while he's offline?
- Don't expect your game to take off immediately. Every website takes a while to get going, but if you have a nice game going, it will grow and get much larger than it started as.
- Don't be afraid to sink some money into it. Few of us are a jack of all trades, and many of us are one trick ponies. What i'm saying is you probably can not do everything yourself. For example, I am horrible at graphic arts. I know how to use Photoshop, I just don't have the eye for it.
- Search Engine optimization is a must. This makes it easier for the search engines (google, yahoo, bing) to cache your page and make it available to people searching.
- Keywords should be added throughout the page. Don't add in junk keywords that don't emphasize your game.
- Above all: Have Fun! You're making a GAME, it should be fun. If you find yourself getting stressed out, then take a break. Rome wasn't built in a day, and if you're developing a game on your own, it will take a while. most of the games out there were not made by one person.