Skip to main content
31 votes

Browser RPG fight calculation formula

Your question can be summarized as "I got a Luck stat in my combat system, please tell me why". Ask yourself: What game-design goal does the Luck stat fulfill? Do you have an immediate answer? If you ...
Philipp's user avatar
  • 120k
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
  • 120k
12 votes
Accepted

Adapting pen & paper RPG rule system for use in a video game

Generally, when you start without experience you should go with the existing solution instead of inventing something new. However, your situation is different. Neither FATE nor GURPS are frameworks ...
Peter's user avatar
  • 9,935
11 votes

Browser RPG fight calculation formula

You essentially want your crit to scale from 0% to 100% with diminishing returns. Here is a formula that is 0% at luck=0 and approaches 100% as luck goes to infinity. ...
Kyy13's user avatar
  • 740
6 votes
Accepted

Designing PHP RPG game: Should I use multiple classes for each type of item or a single table?

A rule of thumb is that you use different classes when objects require different code and instances of the same class when the objects only require different values. So when ...
Philipp's user avatar
  • 120k
6 votes
Accepted

File saved to IndexedDB lost unless we change scenes

D'oh! This is covered in the WebGL troubleshooting documentation (which did not come up in my web search results for 'Unity IndexedDB'). Unity does not flush changes to IndexedDB immediately when you ...
Kevin's user avatar
  • 6,234
5 votes

Calculate resources real-time. Sockets or not?

Introduction There are pros and cons to each method of synchronization you gave that depend on a couple of factors. First, is your game singleplayer or multiplayer, second, how real-time is your game?...
RJ-Adam's user avatar
  • 163
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

Is Patreon a viable way to implement a subscription-based monetization strategy?

After further digging into Patreon material, I found a blog post from them that answers my question. It puts subscription as one of the one of the business models one can use the platform for. 6. ...
Rodrigo Borges's user avatar
4 votes
Accepted

Are browser games still profitable?

Do I have to use flash to be accepted on these sites? Flash is dead. The browser vendors killed it and put HTML5+JavaScript in its place. Even Adobe admits that. All the web game portals are moving ...
Philipp's user avatar
  • 120k
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
  • 135k
3 votes

Browser RPG fight calculation formula

What does Luck mean? Luck could increase the chance of some combination of: Hitting Evading Blocking Crit-ing (also potentially crit damage) Getting an item (if there are items) Having that item be a ...
NotThatGuy's user avatar
3 votes
Accepted

In regards to real time turn based games, where should the turn handler be?

The general rule of thumb for handling multiplayer games is that any game mechanics which can be handled on the server should be handled on the server. There are two reasons for that: The less the ...
Philipp's user avatar
  • 120k
3 votes
Accepted

How can I protect against a cheater changing variables on the client?

This won't prevent all cheating but at least will make it harder for the average cheat engine/ change variable hack. Follow the simple advise: Don't trust the client. Now what does that mean? Usually ...
Zibelas's user avatar
  • 4,358
2 votes
Accepted

requestAnimationFrame handles game ticks weird when tab isn't viewed

Indeed, that's one of the "features" of requestAnimationFrame, it frees resources from not-focused tabs. To use this animation method you should use deltatime to keep track of the time elapsed ...
PRDeving's user avatar
  • 755
2 votes
Accepted

2d game with 3d js. game engine

2d rendering is easily possible with 3d rendering engines, even when there is no explicit support for it. How it would work: Just put your two-dimensional geometry parallel to the xy-plane (or any ...
LukeG's user avatar
  • 1,547
2 votes

How to develop a PBBG?

I would recommend taking a look at Flask, a web framework for Python that's fairly easy to set up and comes with a development server you can run locally. The code snippets below are from a Flask ...
Ruther Rendommeleigh's user avatar
2 votes
Accepted

Turn-based browser game

Unless you expect to have millions of concurrent players, I don't think you have to worry about inherent performance differences of languages or technologies. That is even more true since your game is ...
Christian's user avatar
  • 2,067
2 votes
Accepted

Should all stats only exist on MySQL database for my Flash browser RPG?

"All the logic will be handled in Flash" there's your problem. It doesn't matter where you store the stats if I can hack my client to ignore them and just always report back "Yeah, I toooottally won ...
DMGregory's user avatar
  • 135k
2 votes

Are browser games still profitable?

Here's revenue information for browser-games developer and publisher Plarium: https://www.owler.com/company/plarium So yes, I would say it's very very profitable.
PaulD's user avatar
  • 801
2 votes
Accepted

Testing Multiplayer Browser Game on Single Computer

By default, requestAnimationFrame does not pause when switching window focus. Your game engine is probably adding this behavior for you. Check the documentation for ...
schteppe's user avatar
  • 251
2 votes

Testing Multiplayer Browser Game on Single Computer

As schteppe point out, requestAnimationFrame does not stop when a window loses focus. Thus, try having you may also have to keep the browser windows visible on ...
Theraot's user avatar
  • 27.2k
2 votes
Accepted

Where can I find sources on how many people play with sound disabled/enabled?

I just happened to run across 73% of mobile play with sound (a bit old but probably a decent starting point). https://toucharcade.com/2013/11/05/73-of-mobile-gamers-play-with-the-sound-on/ My own game,...
David Dunham's user avatar
2 votes
Accepted

Best way to implement a to hit formula based on provided stats

I'm going to give you a few options to handle accuracy and dodge, pick the one that better suits you. I have no idea about the ...
Theraot's user avatar
  • 27.2k
1 vote
Accepted

If online games use permalinks

There are generally two ways to refer through the URL to a specific state The state itself is stored in the URL. The State will be serialized and then encoded to a string of valid URL-Characters. ...
tkausl's user avatar
  • 1,860
1 vote

How to store information about a simulated sport match in a browser game?

Most pseudorandom number generators can be initialized with a seed value. When you initialize it with the same seed, you get the same sequence of random numbers. That means even an algorithm which ...
Philipp's user avatar
  • 120k
1 vote

Making a Java Swing game a browser based game

It used to be possible to deploy Java applications on the web in form of java applets. But several security holes were found in the technology. So the browser vendors no longer support it. If you ...
Philipp's user avatar
  • 120k
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

Detecting collision between browser window middle point and other sprites visible in the window

This is solved by the same kind of spatial partitioning we use for other collision checks. Rather than treating your objects as one long undifferentiated list, sort them into a data structure that ...
DMGregory's user avatar
  • 135k
1 vote
Accepted

Phaser.io with Socket.io - What should the Server calculate and what the Client?

What you can do is not to send to the server the game statuses(like positions), just the clients inputs. So on client input (lets say that clientA press 'fire' button), you can send this event to ...
jolmos's user avatar
  • 171

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