54

Assuming you have a random() function that returns a uniformly-distributed numeric value in the interval [0, 1)... (I see the edit attempt to "fix" the mismatched bracket above, but this is deliberate and carries specific meaning) random() - random() Gives a distribution that peaks at 0 and falls off toward -1 and 1. abs(random() - random()) Peaks ...


34

Let's say "rand()" gives you a random number between 0 and 1 (inclusive). pow(rand(), 2) will give you an answer between 0 and 1 (inclusive), but the result is more likely to be close to zero, following a quadratic curve. pow(rand(), 0.5) will give you an answer between 0 and 1 (inclusive), but the result is more likely to be close to one, following a ...


30

Just putting all the files into a .zip file isn't a viable solution because most web-applications need a web-server so that they can access resources via HTTP-requests. On some systems you can access files via the file:// URI-scheme, but that's not guaranteed to work everywhere because of security-reasons and will fail for things such as AJAX requests. It ...


28

Android is an open platform, so you are free to exchange APKs by other means—for instance by email. The Android Development Center discusses this. The caveat: App installation from non-marketplace sources is disabled by default in the security settings of most Android distributions. Users must manually enable the option first.


20

You can embed images in the HTML document using the dataurl-syntax which allows to put the base64 representation of the binary image data as the src-attribute of an image. This also works on any other kind of media file. <img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAoAAAAKCAIAAAACUFjqAAAABGdBTUEAALGPC/xhBQAAAAlwSFlzAAALEgAACxIB0t1+/...


10

Why not use a system similar to advantage/disadvantage as used in DnD 5e? It boils down to: disadvantage: roll 2 (or any number of) dice and keep the lowest. advantage: roll 2 (or any number of) dice and keep the highest. for 1 out of 2 dice this gives a linear chance decreasing as you get higher: example: http://anydice.com/program/1227 for one out of ...


8

The main point is that the end user should not be required to install any Java JRE, nor should the installer contain a JRE and install it for the user You can use Java source/bytecode to machine code compilers. There are Excelsior JET for Windows and Linux (requires license) and GNU Compiler for Java which is old. If it's ok to contain Java with your ...


7

For a Chrome-based solution to make the game run offline and enjoy some native functionality, you can consider making a Chrome App. This way, you can distribute it in Chrome Web Store for added visibility, you can enjoy some powerful APIs, and make it look more like a standalone app. The downside is, of course, requiring Chrome.


7

No, Microsoft of Apple generally do not take royalties from software just because it runs on their desktop operating systems. They only take royalties if they are distributed through their own distribution channels. They also do not do any quality control or censorship for such software. Creating a program which runs on Windows or macOS is trivial. There ...


6

Here are the sites I hang around: TIGSource Forums - Even though it isn't the best community in my opinion, it still is a great way to share your games and get some critical(and sometimes crappy) feedback from other developers. GameDev Forums - Another good place to get great feedback on your game. I think you might have more luck here, on the critiscm end ...


6

Yes there are other platform where you can publish your game and they have huge market there. Amazon App Store Samsung Galaxy Apps


5

Your co-workers need to have the .Net Framework 3.5 and the XNA Framework 4.0 installed. I don't think there's an easy way around that. Get them to install these first, then you can distribute the exes in a zip file with no problems.


5

Apart from the usual communication methods (such as email, and just downloading it from a website) there are places you can upload an APK (like an alternate store. For example, Aptoide). Naturally, these are (most likely) less well known than the Google Play Store, and probably get less traffic.


5

A naive and not efficient algorithm that would give you a linear distribution: vector values; int iterations = 1; for ( val = max; val >= min; --val ) { for ( i = 1; i <= iterations ; ++i ) values.push_back( val ); ++iterations; } // The goal is to have in your values vector something like this for min = 1 and max = 4: // [1, 1, 1, 1, 2, 2, ...


5

You can use a local variable to save a random call: function F(min, max) { var t = random(); //Assuming this returns a value between 0 and 1 return min + (max - min) * t * t; } This makes a non linear distribution where values close to min are more frequent. You can force even more extremal distribution by inserting t = t*t or user a pow with other ...


5

If this is for a game, often you want to tweak values intuitively rather than rely on some existing distribution. A good way to do this is to pick numbers from an array, and duplicate the values you want more than one. For example, here's some python code that does that. The nice thing about it is that you can see pretty easily the probability of the ...


5

You can perform a whois search to see if and when a domain got registred. helloneighbor.com is taken since 2002 and gunpoint.com since 1996. The names were not available for the games which came much later, so they had to be creative in their domain choices. When it comes to domain names, short and generic is usually better than long and specific. But if ...


4

Hm, I think you are making it too complicated. Your nodes can either be producing power or consuming it. And they can either have enough power or not. So can I suggest just having a single "power" variable and +ve is producing power and -ve is consuming it. Then you can calculate how much power each connected node needs with: (pseudo-code, sorry I don't ...


4

By default, you have exclusive copyright for every creative work you produce, which means nobody is allowed to distribute it except you unless you give them explicit permission. The purpose of a license is to give the end-user rights they would normally not have. So when you don't add any license terms whatsoever, it means your end-users have no right to ...


4

Second (harder) aproach. I used that in c# to get a gaussian distribution (link) i think you can easly traslate in php. private double nextGaussian(double mean,double variance ) { // https://stackoverflow.com/questions/218060/random-gaussian-variables //with mean = 0.5 and variance = 0.5 we get uniform distribution over [0..1] ...


4

The fileformat.info page you linked to contains a link “Fonts that support this block”. The ones listed there with 100% support are— Everson Mono (cost: €25; license: Everson Mono Shareware License), and GNU Unifont (cost: free; license: GNU GPL, with virality-exemption for embedding)


3

It means desktop. You have two options to deploy your libGDX app to the desktop: Create a self-runnable JAR. This is easier (Eclipse can export it pretty easily). Create an EXE, via launch4j (or some other wrapper). This is possible too (especially with Gradle). I've used both approaches and they work equally well as far as I can tell. Both rely on Java ...


3

I see some issues with your currently planned system: Flood filter. Well-intentioned, but too harsh, if sensible at all. Once a month? Much too long. If your player wants to refer people, he wants to refer as many as possible (for reward and/or because he genuinely wants other people to enjoy your game), and you want as many players, most preferably paying ...


3

If it's for windows, you could host with either http://en.softonic.com/windows/games or http://www.bluesnap.com/ecommerce/sellers/digital-sales/sell-games Both are solutions that will get you users and will also take care of payment.


3

You want to know how to compile and link against PhysFS. First, you need to create the binaries to link against. I'll assume you're using MinGW with C::B. Creating the PhysFS binaries (with C::B IDE, MinGW on Windows) Unzip your PhysFS archive into a directory (e.g. C:\physfs-2.0.2) You want to download CMake as per INSTALL.TXT in the directory. Once ...


3

Easy indeed - you are looking for Asset Bundles, which you can read about here: https://unity3d.com/learn/tutorials/topics/scripting/assetbundles-and-assetbundle-manager In pre-2017 versions, you simply set the asset bundle at the bottom of the inspector for each asset. In 2017, I believe there have been some changes to have a UI that allows you to set ...


3

The same thing has happened to me in the past. Here are a few things I learnt from it. Remember if they distribute your game it's not ideal, however you primarily lose out on ratings and publicity on the official play store. If you release games with ads or in app purchases then you should be covered in some sense for your revenue. I emailed each website ...


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