background preloader

How to Choose Colours Procedurally (Algorithms)

How to Choose Colours Procedurally (Algorithms)
Changing the colours of art can be a great way to increase the amount of content in your game, and add variety and richness. It is relatively easy to implement. What is not always as easy is to get a set of colours that looks nice. This article gives some ideas for choosing colour palettes that look nice. A few things about colour Colour is surprisingly complex. Although you don’t need to know all about the physics, biology, and psychology of colour vision, it is useful to have some background information (which you can find references to at the end of this article). For palette choosing, there are a few important points. Digital colour theory differs considerably from theories based on pigments (or chemicals, or metals in crystals). Vector distances in RGB and many other colour models don’t correspond to differences in perception. Edit: Turns out I have fallen prey to the very thing I talk about. Brightness These greys are equally spaced. Hue differentiation. Colour harmony theory. 1. 2. 3.

Why YouTube buffers: The secret deals that make—and break—online video Lee Hutchinson has a problem. My fellow Ars writer is a man who loves to watch YouTube videos—mostly space rocket launches and gun demonstrations, I assume—but he never knows when his home Internet service will let him do so. "For at least the past year, I've suffered from ridiculously awful YouTube speeds," Hutchinson tells me. "Ads load quickly—there's never anything wrong with the ads!—but during peak times, HD videos have been almost universally unwatchable. Hutchinson, a Houston resident who pays Comcast for 16Mbps business-class cable, is far from alone. Why does online video have such problems? But cynical types who suspect their Internet Service Providers (ISPs) intentionally degrade streaming video may be right as well. These business decisions involve "peering" agreements that Internet companies make to pass traffic from one to another and negotiations over caching services that store videos closer to people's homes so they can load faster in your browser.

JQuery for Beginners Download source - 858 KB Introduction jQuery is a JavaScript library which has a wide range of actions such as event handling, animation, HTML document traversing, and AJAX interaction for web development. jQuery simplifies JavaScript programming. $(document).ready Method The document ready event executes already when the HTML-Document is loaded and the DOM is ready, even if all the graphics are not loaded yet. $(document).ready(function() { alert("document is ready"); }); Selectors jQuery provides a simple way to select single element or group of elements. Sliding Effect jQuery provides three methods to show or hide elements in sliding behavior. SlideDown(speed, callback): This method gradually increases the height of the elements, from hidden to visible. All three methods has "Speed" and "callback" parameters. slow normal fast milliseconds, e.g., 100, 500, 1000, etc. The callback parameter is the name of a function that executes after the function completes. Sliding Example Fade Effect History

Random Inn/Tavern Generator Current Settings (Because this is a set of separate images, to save the floorplans you should: press your "print screen" key (or your computer's equivalent) and then open your favorite image editor and paste the screenshot into a new image. Then crop the rest of the screen. Some word processors will also allow you to paste the screenshot and even crop it. You can also print the webpage or print it to a pdf file using free tools like CutePDF and PrimoPDF.) Key Thin Rectangle on a wall: door"S" on a wall: secret doorLarge Rectangle: tableLarge Thin Rectangle: barRectangle with a "T" or "S" or both: table or shelve or table & shelves.Circle: bar stool or chair4/5 Circle: chair next to/under table Small filled Rectangle in a larger rectangle: fireplace/hearthDashed Line: railingMany thin lines getting smaller: stairsFilled Circle: toilet/privvyFilled Triangle: wash basin Coming Soon Here's the list of planned features:

CAGE Web Design | ColorHarmony - Processing Library - CAGE Web Design ColorHarmony is a Processing.org library developed by Rolf van Gelder, CAGE Web Design. With this library, you can generate so-called harmonized color palettes (also called color schemes), which means a set of colors that ‘look good together’. The generated palettes can be used, real-time, in Processing sketches. There are four types of palettes available: monochromatic, analogous, complementary and triads. Example of ColorHarmony palettes (see the palettes.pde example) Every palette is based on a base color. “Another important parameter of a color scheme is the base color. In the library, there is also an option to use a random base color for generating the palettes. Another option is to generate a fully random harmonized palette: the palette type and base color will be selected at random. The library contains a set of color conversion methods, which you, of course, also can use without generating the palettes. Check out the Javadocs for all the details and examples. Compatibility History

Essential Math for Games Programmers As the quality of games has improved, more attention has been given to all aspects of a game to increase the feeling of reality during gameplay and distinguish it from its competitors. Mathematics provides much of the groundwork for this improvement in realism. And a large part of this improvement is due to the addition of physical simulation. Creating such a simulation may appear to be a daunting task, but given the right background it is not too difficult, and can add a great deal of realism to animation systems, and interactions between avatars and the world. This tutorial deepens the approach of the previous years' Essential Math for Games Programmers, by spending one day on general math topics, and one day focusing in on the topic of physical simulation. Topics for the various incarnations of this tutorial can be found below. Current Materials Slides The latest available versions of the slides for the math tutorials at GDC 2015 are as follows: Past Materials Core Mathematics

Preparing Yourself for Modern JavaScript Development There is a lot going on in the JavaScript world these days, both in and out of the browser. Talk about script loaders, client side MVC frameworks, minifiers, AMD, Common.js, Coffeescript, can quickly get your head spinning. And for those people who are completely immersed in that world, it can be easy to forget that the vast majority of JavaScript developers today haven’t heard of any of these tools, and in fact, they likely aren’t even equipped to try these tools. This post is going to be an attempt to simply address some of the low hanging fruit out there, and try to bring together a few different concepts that a developer should understand before they go out and try to tackle something like Backbone.js or Ember.js. Once you understand most of the concepts in this post, then you can go out and approach more advanced JavaScript topics with a bit of confidence. Modules It is a big name, but the implementation is very simple: Namespaces This could also be written like this: Wrapping It Up

Turnkey Linux : dépoloyer votre serveur web en quelques clics Home » Gnu/Linux Il y a quelques semaines, grâce au billet proposé par Baloo (que je remercie encore au passage), j’ai pu découvrir Yunohost . Une distribution faite pour les personnes qui souhaite monter leurs serveurs d’hébergement, mais qui n’ont ni les connaissances pour ça, ni du temps libre à consacrer pour monter les différentes briques de leurs serveurs. Yunohost m’a mis aussi sur le chemin d’un nouveau genre (pour moi) de distributions, c’est ainsi qu’après quelques recherches sur le web, j’ai découvert Turnkey Linux. Mais ce n’est pas l’unique plus qu’offre Turnkey, car en plus des images iso, il est possible de télécharger des images de machines virtuelles et les importer dans VirtualBox par exemple. Pour en savoir plus sur Turnkey Linux, je vous invite à se rendre sur cette page du site officiel du projet Lightweight Portable Security : GNU/Linux made by les militaires US Quelques pistes pour mieux protéger votre vie privé Perl/Linux : la distribution full perl

PShape If you see any errors in this tutorial or have comments, please let us know. This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License. Daniel Shiffman (The source code for this tutorial are in the Processing Examples. One of the very first things you learn when programming with Processing is how to draw "primitive" shapes to the screen: rectangles, ellipses, lines, triangles, and more. rect(x,y,w,h); ellipse(x,y,w,h); line(x1,y1,x2,y2); triangle(x1,y1,x2,y2,x3,y3); A more advanced drawing option is to use beginShape() and endShape() to specify the vertices of a custom polygon beginShape(); vertex(x1,y1); vertex(x2,y2); vertex(x3,y3); vertex(x4,y4); // etc; endShape(); And you can build more complex shapes by grouping a set of drawing functions together, even perhaps organizing them into a class. class MyWackyShape { // Some variables // A constructor // Some functions // Display the shape! PShape is a datatype for storing shapes. ArrayList

samsquire/ideas 2008 - A Year of Awesome JavaScript Games It's been a great year for JavaScript games. It looks like DHTML and canvas-based games are now capable of taking over some of the areas where Flash used to dominate. Many people have been building remakes of classic video games like Super Mario, Pac-Man, Breakout, Space Invaders, Bomberman or T&C Surf Designs. Others took the old arcade traditions and applied them to their own ideas, giving us cool games like Matt Hackett's Spacius, Mark Wilcox's Invaders from Mars, VertigoProject's RedLine Racing or a twist on the classic Tetris game. We've even seen some roleplaying games, like the very cool Tombs of Asciiroth or the more graphical CanvasQuest by Andrew Wooldridge and the Prototype based ProtoRPG by Pierre Chassaing. 2008 also saw a few libraries for JavaScript / DHTML game development pop up, most notably GameJS (pictured to the left with its demo game, Jetris) and GameQuery, the latter being an extension to the popular jQuery library. Demos Emulation Graphics Audio Odds and ends

Le diaporama facile sous GNU/Linux « Vous n'avez pas, Monsieur Borne, le monopole des articles sur les diaporamas, vous ne l'avez pas » J'ai eu récemment à faire un diaporama sous forme de DVD vidéo à partir de photos – typiquement le genre de question qui se pose au mieux tous les cinq ans. Pour ce travail, j'ai cherché un truc simple et efficace, le genre qu'on maîtrise en 45 secondes sans avoir à aller chercher des tutos à droite ou à gauche (investir plus de temps aurait été du gâchis vu mon usage). Je vous donne sans plus attendre le nom du champion, ou plutôt des champions puisque c'est un couple qui a été retenu : Imagination + DeVeDe. À ce jour, sous Debian Sid, le premier est dispo en version 3.0 (dernière version, du 6 mars 2012), et le deuxième en version 3.22 (dernière version, du 22 mai 2012). Voilà la méthode expéditive pour parvenir à mes fins : Première étape : créer un diaporama vidéo avec Imagination Importez les images. Remarquez que l'interface se décompose en trois panneaux. Satisfait du résultat ?

Math Types & Utilities (mathutils) — Blender 2.79b f4dc9f9d68b - API documentation This module provides access to math operations. Note Classes, methods and attributes that accept vectors also accept other numeric sequences, such as tuples, lists. Submodules: The mathutils module provides the following classes: import mathutilsfrom math import radians vec = mathutils.Vector((1.0, 2.0, 3.0)) mat_rot = mathutils.Matrix.Rotation(radians(90.0), 4, 'X')mat_trans = mathutils.Matrix.Translation(vec) mat = mat_trans * mat_rotmat.invert() mat3 = mat.to_3x3()quat1 = mat.to_quaternion()quat2 = mat3.to_quaternion() quat_diff = quat1.rotation_difference(quat2) print(quat_diff.angle) class mathutils.Color(rgb) This object gives access to Colors in Blender. copy() Returns a copy of this color. use this to get a copy of a wrapped color with no reference to the original data. freeze() Make this object immutable. After this the object can be hashed, used in dictionaries & sets. b Blue color channel. g Green color channel. h HSV Hue component in [0, 1]. hsv HSV Values in [0, 1]. is_frozen is_wrapped owner r s v x

Kim Jong-il's Sushi Chef Kenji Fujimoto: Newsmakers The sushi chef was leaving his apartment when he noticed the stranger outside. He could tell by the man's suit—black and badly made—that he was North Korean. Right away, the chef was nervous. Even in his midsixties, the chef is a formidable man: He has thick shoulders, a broad chest; the rings on his strong hands would one day have to be cut off. But he'd long since quit wearing his bulletproof vest, and the last time a North Korean made the journey to visit him in Japan, a decade ago, he was there to kill him. The stranger came closer. "This is about your family," the stranger said. "Go away," the chef told the man, and without another word the man disappeared. A month later, in early July, another North Korean in a black suit came to the chef's door. "Come with me, Fujimoto," the man said, and together they went to a bare-bones hotel near the Sakudaira train station. Luring people back to North Korea to be executed or dispatched to gulags was a favorite trick of the regime.

oCanvas - Object-based canvas drawing

Related: