Hot answers tagged

50

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 at ...


31

Take a look at this picture: It shows the process of mapping a (random) value to a curve. Suppose you generate a uniformly-distributed random value X, ranging from 0 to 1. By mapping this value to a curve - or, in other words, using f(X) instead of X - you can skew your distribution in whatever way you like. In this picture, first curve makes higher ...


31

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 ...


26

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.


22

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 ...


21

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+/...


18

The concept hasn't really died, it's just changed a bit and been given a new name. In fact, if you have an iPhone you can see it in action right now! Many 'free' or 'lite' games offer a sampling of gameplay and allow you to purchase DLC to promote it to the full title. On the PC use has declined, but I believe part of the reason for this is the lack of a ...


12

I'm speaking on behalf of CheapProFonts. ;) Obtaining a license for one of our fonts for inclusion in a software is easy and inexpensive: Just let us know that the font you purchase IS for that purpose, and then purchase two licenses for the font. So for $20 you will be allowed to include the font in your game and distribute as many copies of that game as ...


11

(Disclaimer: I am not a lawyer) In the United States a font face is not copyrightable (Eltra Corp. v. Ringer, 579 F.2d 294 (4th Cir. 1978)). But font software is copyrightable. A TrueType font (such as one you might download from cheapprofonts.com) contains instructions for how to render that font and is therefore a copyright piece of software. A bitmap ...


9

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

A longer explanation: If you have a desired probability distribution such as the gradient didito asked for, you can describe is as a function. Let's say you want a triangular distribution, where the probability at 0 is 0.0, and you want to pick a random number from 0 to 1. We might write it as y = x. The next step is to calculate the integral of this ...


7

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.


6

It's still around. We just no longer call it Shareware. We call it the "freemium" model: free to play but with premium content available for cash. The only difference between now and the old days is that we have better ways of accepting payment today: accepting credit cards over the internet (no more "mail a check to this address and we'll send you the full ...


6

If the output bitmap matches the look of the font (the typeface) then it essentially IS the font, and yes you would be violating the license. You may embed the font in electronic documents, but you may NOT include the font in a software product - this requires a special license. Even though it's just an image it would still be the exact font, which is ...


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

You'd probably get a close approximation to what you want by utilizing an exponential system. Make the x based on something like 1-(rnd^value) (Assuming rnd is between 0 and 1) and you'll get a few different behaviors of left to right skewing based on what you use. A higher value will get you a more skewed distribution You can use an online graphing ...


5

Usually, when you're making something that will be ported to different systems (whether a game for multiple consoles, or an app for various mobile devices), it's common to wrap your code so that anything that is specific to one system (rendering, event handling, etc) can be completely replaced without touching the code for the logic. SDL (and SFML) are ...


5

The best solution for site locking is to make sure the start of the url matches your allowed url: if (stage.loaderInfo.url.indexOf("http://www.kongregate.com") == 0) { trace("OK!"); } else { trace("stolen!"); }


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.


4

Because people played the Shareware version of the game and then when it was done. They stopped playing and did not buy it. So the turnover rate was very low. The old shareware model you speak of "died" when the internet came to be popular, since a large part of the old shareware model was the shareware distributes and the copy/delivery fee you had to pay ...


4

A few reasons that I can think of off the top of my head -- I'm sure others will have reasons as well. They have to distribute patches for the existing users no matter what. By doing it this way, they minimize the amount of work they have to do on their end. Building new complete distributions takes a lot of time -- especially QA time. They would have to ...


4

You already accepted an answer, which is fine. I'm just going to add the way you would do this in an ActionScript only Project (which is preferable for games IMHO, since it doesn't add the bloat of the flex classes). package { // Use the "Frame" metatag to add a preloader class at the first frame // of your compiled SWF. You have to enter the fully ...


4

XNA games have the following dependencies: .NET Framework 3.5 Redistributable XNA Framework Redistributable (version depends on which version of XNA you use) To allow people to install your games on their computers without downloading these dependencies themselves, you need to bundle or allow downloading & installing those dependencies right in your ...


4

Don't. People will steal your game, no matter what you do. Trying to sitelock a flash game smells of DRM to me (OK, it's not quite DRM, but it's pretty close), and you can read all about why DRM isn't going to work. That's not to say you shouldn't use any protection system at all, just not something that you have to visit their site a particular way and do ...


4

Desura are fairly good for Indies - even free. They do have an approval process though, but it's more for the purpose of checking that you're uploading an actual game, and the one that you describe, and that it's not Copyright infringing, and that it works. I haven't put any on there myself yet, so I can't testify as to how easy or well it works. Source: ...


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

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.


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 ) { // http://stackoverflow.com/questions/218060/random-gaussian-variables //with mean = 0.5 and variance = 0.5 we get uniform distribution over [0..1] ...



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