Skip to main content
5 votes
Accepted

How many database servers does an online game need to handle around 100000 users per day?

I'm sorry, but we can not even give you a rough estimate as long as we do not know anything about your game. We do not know how many SQL queries each player generates. It could be anything between one ...
Philipp's user avatar
  • 121k
4 votes
Accepted

How to deal with players having too much money (or any large numbers)?

I read somewhere that you shouldn't compare floats Beware programming by hearsay. This is a good way to make mistakes for reasons you don't understand. Instead, ask for clarification. The full ...
DMGregory's user avatar
  • 136k
4 votes
Accepted

MySQL for MMO-Development... What do i have to consider ?

Overusing the database like this is usually a very bad idea. Database queries always require a network roundtrip between game server and database server. Even under ideal conditions (both run on the ...
Philipp's user avatar
  • 121k
3 votes
Accepted

Feasible to do all game logic on PHP server?

It depends on your skill at programming, but it should be feasible. Remember, Facebook was built in PHP and it serves a pretty big crowd. A better question might be if PHP is the best choice for what ...
Erik's user avatar
  • 1,556
3 votes

How to program an experience-based levelup system where experience carries over to the next level?

Solution A: Don't store the level or the experience points from the last levelup. Only store the total number of experience points the player collected from the start of the game. When you want to ...
Philipp's user avatar
  • 121k
2 votes

How to store the updated score in mysql databse from android?

You don't. Accessing an online MySQL database from a client application directly is a really bad idea for security reasons. The permission handling abilities of MySQL aren't refined enough to check ...
Philipp's user avatar
  • 121k
2 votes

MySQL for MMO-Development... What do i have to consider ?

I agree with what Basaa and Philipp said, but I'll add this: A design like you're talking about isn't completely impractical (well, storing every player movement is, but in general i mean writing ...
justinian's user avatar
  • 946
2 votes

MySQL for MMO-Development... What do i have to consider ?

It's a trade-off between performance and data consistency. A method that's often used in these kind of situations is saving data on specific intervals. For example, there's no reason to store the ...
Basaa's user avatar
  • 1,053
1 vote

proper items db design mysql

Example data model The idea is, you have a generic item with an item type. For each item type you define an extra table, that gives the attributes to the item you want (mainly weapons, armor). The ...
Zibelas's user avatar
  • 4,488
1 vote
Accepted

What aspects do I need to consider when designing save-data of equipment reference in MySQL for online game?

I'm going to start by telling you the orthodox way to do this. So I'll start describing what you should consider and do. And I want to point this early because then I'm going to tell you to throw that ...
Theraot's user avatar
  • 27.3k
1 vote

Java application chokes - when using MySQL

Accessing the database is a very slow operation. In order to access a database, the following things need to happen: Build an SQL query string in memory Put that SQL query into a TCP/IP packet Pass ...
Philipp's user avatar
  • 121k
1 vote

How to deal with players having too much money (or any large numbers)?

Instead of int32, use uint32, it doesn't hold negative numbers thus max value will be 4,294,967,295. (Not for PHP. Currently PHP supports int32 or int64 depending on the type of machine its running on)...
Nick's user avatar
  • 561
1 vote

How to deal with players having too much money (or any large numbers)?

You can straight up cap your players money. However, if this is a game where high numbers are going to be common, you are better of using a big integer solution, such as Philipp suggests. ...
Theraot's user avatar
  • 27.3k
1 vote

How to deal with players having too much money (or any large numbers)?

The GMP (GNU Multiple Precision) library for PHP offers you the class GMP which can represent integers of arbitrary length and perform arithmetic with them. MySQL offers you the BIGINT type which ...
Philipp's user avatar
  • 121k
1 vote

Race condition implementing World Boss System in Web Browser MMO using PHP

You could either use "SET boss_hp = boss_hp - 10" directly in a MySQL query if your damage calculation is simple enough to be expressed by a simple subtraction. Or look into some of the locking ...
Jannek's user avatar
  • 66
1 vote

Retrieve multiple images from MySql database via Unity C#

To start with, you should move the line imagen.sprite = Sprite.Create (img, new Rect(0,0,690,345),new Vector2(0.5f, 0.5f)); from ...
KevLoughrey's user avatar
1 vote
Accepted

Best way to store items with statistics in an mysql database?

A relational database is a great solution for persisting transactional data (data which changes during the game). But they are not necessarily that ideal for persisting static data (data which does ...
Philipp's user avatar
  • 121k
1 vote
Accepted

Better way than url-encoded query stings to pass data from PHP to Flash?

What you have here is basically a RESTful webservice API. The client communicates with the backend using HTTP requests with the request parameters in the query string. The backend then answers the ...
Philipp's user avatar
  • 121k
1 vote
Accepted

Storing quests for an online RPG in a MySQL database

Create a table CharacterQuestSteps with three columns: ...
Philipp's user avatar
  • 121k

Only top scored, non community-wiki answers of a minimum length are eligible