29

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 don't then I would recommend you to just throw it out. Now you are just down to two stats: Strength and Constitution. This doesn't seem like much. But you ...


16

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 website and the game client. The setup of most PHP applications is equally easy. Just copy the files to the webserver and you are done. This makes it very easy ...


12

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 that are designed for browser based RPGs. So the question is about adapting them, not about using them. Adapting an existing tabletop system for an online RPG is ...


11

1) Lack of knowledge. Developing for Canvas might be well beyond some web developers who are very accustomed to manipulating DOM. 2) Lack of a scene graph. The DOM is (in game engine terms) a scene graph, permitting strong querying and manipulation of DOM nodes. Writing a game using Canvas requires the developer to "reinvent" that part of the wheel. 3) ...


9

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. f = 2.71; // you can mess with this factor to change how quickly it diminishes crit = Math.random() > Math.pow(f, -luck); // assuming random is in the range [0.0, 1.0] Then use a ...


8

Just ignore any actors which are far away from the player(s). Don't update them and don't allow active actors to interact with them. Most games divide the game world into zones, and only update the actors in the zones the player is in and the adjacent zones. Many even despawn the actors and respawn them at their initial positions when the zone becomes ...


6

I think the most effective way would be just to fake it. Rendering to some target element using your own built in sprite font as if you're rendering a normal 2D screen. This approach makes sure no strange stuff happens when people are missing fonts, or are using a very different language (Chinese, Russian). Fonts and texts are one of the most difficult ...


6

I know your question is specifically asking about cron jobs, but I think a lot of web-based mmos are written using "completeTime" logic as opposed to lots of crons. When you start a long-running action, like building a granary that takes 5 hours to complete. The server will just mark the granary's completion time as start time + 5 hours and store that in ...


6

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 ShortBow, HuntingBow, CompositeBow, ElvenBow etc. all behave identical except for having different stats, then they would all be instances of the same class. When bows have different ...


5

I have actually made a character display library for the web, Unicodetiles.js, which I have not only spent some time optimizing, but it also explores different ways of presenting the text; it has three renderers: DOM, which uses a matrix of <div> elements to render each glyph with a customizable foreground and background colors. Canvas, which draws ...


5

Although I'm not PHP fan, I don't think it's a problem of the language, 300,000 rows in a database is not that big (I worked with much more). Your problem is most likly in the code-> algorithms you use.. As a side note.. 1000 lines of code for just fight logic? How maintainable is that? It's ok that you know what's going on in there right now, but will ...


5

This is too broad, you need to work out some things. What do you call a high-performance server. You can get some very powerful servers with 4 CPU sockets and such. But it is likely 4 servers with a single socket may be cheaper. Real time (meaning each game instance must be processed all the time at some frequency) or turn based (meaning you just need to ...


5

Emscripten can be used to port C++ applications to javascript. It was able to succesfully make the Unreal 3 engine run in a web browser. It works best in browsers which support asm.js, an optimization-friendly subset of the Javascript language which can reach performance comparable to native code.


5

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? If your game is only single player, you may want to consider having a client side only game which would make things simpler. However, assuming you need a ...


5

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 actually not found any PBBG using C# which I find really strange. Until a couple years ago, there was a PBBG development community that mostly existed on two ...


4

Google has announced its Google Play game services which offer Achievements Leaderboards Cloud Save Matchmaking across Android, iOS, and web (via RESTful apis).


4

Kongregate have an achievement system. It works a lot like Steam, so you can get multiple achievements from different games on different platforms (Flash, Unity, etc.) and you can show them off. Sign up for an account and play a game that has achievements to see how it works. Kongregate is also an incredibly popular online community, so your game will also ...


4

As the others already mentioned....300k of rows from a database and 1k lines of code shouldn't really be that huge of a problem for the memory. Although if you load all 300k rows into memory at once (depending on how much data is in each row) that COULD pose a problem. Another possibility would be memory leaks especially as the phenomenon that you write ...


4

Better? Probably, but at what cost? PHP has a truly fully-featured string API which will come in handy as soon as you do just about anything with text. C# has native code and some added speed at the cost of having to use an awful API and the JIT compilation on first launch makes testing painful. Python has a rather uncomfortable reference system so copying ...


4

I faced a similar problem before and, given your needs, I'd go for a slightly variation of your pseudo-code. Considering that you could have events issued by other player but which can be needed for stats purpose, for example if I open the "Most resource ladder" I want to see the data up to date for every player, not only me, and stuff like this, I prefer ...


4

There is one thing that bothered me about your question: "..But the only programming language I know is Java." So learn another one! Anyway, Java as a client in the browser fails on many, many fronts. For one, Java 7 (and most likely Java 8) doesn't even work in Chrome on Mac OS X because the Java people decided to stop supporting 32-bit, and Chrome is ...


4

You could also do something similar to MineCraft so only the active blocks are loaded. For doing that, you could store each part (e. g. 32x32 tiles) in its own file and load always only the part the player is in and the surrounding. When the player enters another part, save the parts the player is two far away and load the new ones. If you use procedural ...


4

pepper.js allows you to write C++ code and then deploy directly as: Machine code via PNaCl for higher performance, currently only supported by Chrome. Javascript via Emscripten for maximum reach. From the project page: pepper.js is a JavaScript library that enables the compilation of native Pepper applications into JavaScript using Emscripten. This ...


4

Instead of completely refilling all players action points at a fixed time, you could instead give them a small amount of action points every few minutes and allow them to safe up action points up to one or a couple days worth of points. A player who wants to do something big will have to safe their action points for about a day. Afterwards they will be ...


4

Websockets are a very elegant and fast way to implement asynchronous communication between client and server. But they are far from the only. When low latency isn't that important for you, you can substitute it with XmlHttpRequest (aka "AJAX"). But for a real-time action-oriented game, WebSockets are usually the superior solution.


4

ajax / html request Slowpoke. Good for loading pages without navigating to another url. No good for action games but should be fine for turn based games I imagine. That is unless it's a very fast paced turn based game (think roguelike fast). The good thing is that the server only needs to handle one request at a time. So the server code is serial and not ...


4

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 to HTML5+Javascript games. I know these games would have ads run on them, which I assume was profitable for the developer. Advertisement is one way to ...


3

To find out the number of lines and columns you need to output, you should check the window width and height and change it accordingly. Remember to listen to onResize events and modify the width and height accordingly. When you want to do this the textual way, you could do this using text with a monospaced font and a table where each cell contains one ...


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