Skip to main content
16 votes

Why PHP over C# for PBBG?

PHP has the advantage that it is very widely supported by cheap webhosters. You can rent some shared-hosting LAMP (Linux, Apache, MySQL, PHP) webspace for peanuts. And that webspace can also host your ...
Philipp's user avatar
  • 123k
5 votes

Why PHP over C# for PBBG?

The other answers are correct, but there's a historical factor that hasn't been mentioned. When I started to search for do and donts and tips I realized that a lot of projects use PHP and I have ...
IKM's user avatar
  • 151
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 advice ...
DMGregory's user avatar
  • 141k
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,586
2 votes
Accepted

How can I avoid writing a class for each of my 800 different items?

Having a class for items is a good idea, but it is rarely useful to have a class for each item. When entities in a game differ by their values and not their behavior, then it is usually better to ...
Philipp's user avatar
  • 123k
1 vote

How do I wrap my web browser game as a standalone for Steam?

Since you mention PHP as well as Java, which are both server-side languages, I assume you are running a web server that your game connects to for content, game state management, and so forth. So ...
Tim Holt's user avatar
  • 10.3k
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

Best Practice for Procedural Generation and Code Updates

The problem is if I do updates to the 'weather' variable, it will break all the code after. The less you do, the better. If you are only picking a weather at random, you probably don't need to ...
Theraot's user avatar
  • 28.3k
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
  • 28.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
  • 123k
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

Why PHP over C# for PBBG?

Browser based games rose at a time when C# wasn't very popular, but PHP was. So many projects are done in that languages, many tutorials were written for that language and many experts in such games ...
Frank Hopkins's user avatar
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
  • 123k
1 vote

Passive skills and items

how can I implement a function for every item, that gives the bonuses or other options when the appropriate roll is made First, there are two approaches to managing passive bonuses and such: Calculate ...
badunius's user avatar
  • 176

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