Search Results

Search found 248 results on 10 pages for 'contributions'.

Page 1/10 | 1 2 3 4 5 6 7 8 9 10  | Next Page >

  • Tracking contributions from contributors not using git

    - by alex.jordan
    I have a central git repo located on a server. I have many contributors that are not tech savvy, do not have server access, and do not know anything about git. But they are able to contribute via the project's web side. Each of them logs on via a web browser and contributes to the project. I have set things up so that when they log on, each user's contributions are made into a cloned repo on the server that is specifically for that user. Periodically, I log on to the server, visit each of their repos, and do a git diff to make sure they haven't done anything bad. If all is well, I commit their changes and push them to the central repo. Of course I need to manually look at their changes so that I can add an appropriate commit message. But I would also like to track who made the changes. I am making the commit, and I (and the web server) are the only users that are actually writing anything to the server. I could track this in the commit messages. While this strikes me as wrong, if this is my only option, is there a way to make userx's cloned repo always include "userx: " before each commit message that I add, so that I do not have to remind myself which user's repo I am in? Or even better, is there an easy way for me to make the commit, but in such a way as I credit the user whose cloned repo I am in?

    Read the article

  • A better way to encourage contributions to OSS

    - by Daniel Cazzulino
    Currently in the .NET world, most OSS projects are available via a NuGet package. Users have a very easy path towards *using* the project right away. But let’s say they encounter some isssue (maybe a bug, maybe a potential improvement) with the library. At this point, going from user to contributor (of a fix, or a good bug repro or even a spike for a new feature) is a very steep and non trivial multi-step process of registering with some open source hosting site (codeplex, github, bitbucket, etc.), learning how to grab the latest sources, build the project, formulate a patch (or fork the code), learn the source control software they use (mercurial, git, svn, tfs), install whatever tools are needed for it, read about the contributors workflow for the project (do you fork & send pull requests? do you just send a patch file? do you just send a snippet? a unit test? etc.), and on, and on, and on. Granted, you may be lucky and already know the source control system the project uses, but in really, I’d say the chances are pretty low. I believe most developers *using* OSS are far from familiar with them, much less with contributing back to various projects. We OSS devs like to be on the cutting edge all the time, ya’ know, always jumping on the new SCC system, the new hosting site, the new agile way of managing work items, bug tracking, code reviews, etc. etc. etc.. But most of our OSS users are largely the “... Read full article

    Read the article

  • Sécurité : deux millions de mots de passe WordPress réinitialisés suite à la découverte de contributions malicieuses à trois plug-ins populaires

    Sécurité : deux millions de mots de passe WordPress réinitialisés Suite à la découverte de contributions malicieuses à trois plug-ins populaires Automatic vient de lancer une dépêche de sécurité importante sur le blog officiel de WordPress, y notifiant tous les utilisateurs du Blogware/CMS de la découverte de plusieurs contributions malintentionnées au code de trois de ses plug-ins les plus populaires. Des commits acceptés sur le code de AddThis, WPtouch, et W3 Total Cache, se révèlent contenir des portes dérobées soigneusement dissimulées, créées et propagées par un ou plusieurs pirates non encore identifiés. Automatic assure que les contributions malicieuses ne pr...

    Read the article

  • How Have You Implemented Open Source Contributions At Your Company?

    - by Travis
    Ok guys, I know others have asked this question in a similar manner in the past, but I want to go beyond the theoretical and find out answers from people who have worked in an environment that relied heavily upon open source technology and never contributed anything back to the open source community, and was able to convince the boss / owner to contribute back to the open source community. I know alot of the standard answers, but I'm looking for some more practical information? What was the key argument, that changed the culture in your company, and how has it changed?

    Read the article

  • What sites track your open source contributions?

    - by Daniel
    I know there's at least one site where you can register the open source projects you are involved with, indicate your committer name, and it will display the lines contributed, and the languages, along a timeline. Unfortunately, I don't recall what site was that. Anyway, can anyone indicate a site that does this?

    Read the article

  • Patches and translations

    - by Chris Wilson
    When changing a string of text as a part of a patch, how should the translation in the .po files be handled? For example, a recent paper cut I've worked on involved changing the string "Reboot Anyway" to "Restart Anyway" when gnome-session detected applications still running during restart. When I greped for the offending string, I found not only the string on the Gtk button, but identical strings in a long list of .po files which I later learned contained translations. The format of these translations of along the lines of msgid:Reboot Anyway <translated text> Changing the text of only the button would results in a discrepancy between the text on the English button and the translation, and changing the msgid line would result in a similar situation. How should I raise the issue that new translations are needed? I know this is a trivial problem in this example, but there are other such bugs that involve rewriting entire paragraphs of text.

    Read the article

  • ASP.NET MVC, Web API, Razor : Microsoft prendra en compte les contributions externes pour ces produits open source

    ASP.NET MVC, Web API, Razor : Microsoft prendra en compte les contributions externes pour ces produits open source Microsoft vient d'annoncer qu'il allait publier sous licence open source Apache 2.0 le code source de Web Pages et ASP.NET Web API. Web Pages est la plateforme sur laquelle repose le nouveau moteur de vue Razor, la première version avait été publiée avec WebMatrix 1 et ASP.NET MVC 3. Web Pages est actuellement disponible en version 2 beta. ASP.NET Web API, quant à elle, permet aux développeurs d'exposer leurs applications, données et services sur le web directement à travers HTTP. La technologie avait été introduite avec ASP.NET MVC 4 beta. Le passage à l'op...

    Read the article

  • What are the best open-source software non-profits for making financial contributions and/or facilitating useful work?

    - by Jason S
    I'm not a great programmer myself (my main job is more electrical engineering) and have never really helped out with any open source projects, but I've benefited greatly from free and/or open-source software (MySQL, OpenOffice, Firefox, Apache, PHP, Java, etc.) and at some point would like to make some modest financial contributions to help keep this stuff going. I'm wondering, what are the best non-profits to make financial contributions? I'm aware of: Open Source Initiative (founded 10 years ago by several prominent figures including programmer and "The Cathedral and the Bazaar" author Eric S. Raymond) Free Software Foundation Mozilla Foundation Apache Foundation Anyone have a particular favorite? Ideally I'd like to give money to a non-profit that would foster some of the smaller but promising open-source and/or free software projects. The big projects like Firefox and Apache are already well-established. There are a few small individual shareware programs I've already paid for directly. But it's those middle-ground projects that I would really like my contributions to support. (one that comes to mind is a good GUI for Subversion or Mercurial.) It's one thing for a single person to donate a little $$ to a small project. It's another for a foundation or something to give larger grants to projects that give a good bang for the buck. Conservation organizations like The Nature Conservancy, or the Trust for Public Lands, have really honed this approach, but I'm not really sure if there's an equivalent model in software-land.

    Read the article

  • Can I become an Ubuntu Member by contributing on askubuntu?

    - by Kyle Macey
    The Ubuntu Membership Wiki states: Contributions are valued and recognized whether you contribute to artwork, any of the LoCoTeams, documentation, providing support on the forums, the answers tracker, IRC support, bug triage, translation, development and packaging, marketing and advocacy, contributing to the wiki, or anything else. This defines what contributions "count" toward what will be considered valuable when applying for Ubuntu membership. What I want to know is, does my involvement on askubuntu fall under the stipulation "...or anything else"? I'd imagine they don't literally mean anything else, just things they consider to fit the scope of contributing to Ubuntu. So is my help here valuable in contributing? Has anyone ever obtained membership by using their askubuntu contributions as their argument toward membership?

    Read the article

  • ASP.NET, Web API and ASP.NET Web Pages Open Sourced

    - by The Official Microsoft IIS Site
    More Open Source goodness from Microsoft today, with the announcement that we are open sourcing ASP.NET MVC 4, ASP.NET Web API, ASP.NET Web Pages v2 (Razor) - all with contributions - under the Apache 2.0 license. You can find the source on CodePlex , and all the details on Scott Guthrie's blog . “We will also for the first time allow developers outside of Microsoft to submit patches and code contributions that the Microsoft development team will review for potential inclusion in the products...(read more)

    Read the article

  • Where can I find a legal "permission to work on open source" document?

    - by Nathan Long
    One of the things I really like about my current job is that we developers are encouraged to make open source contributions. However, this encouragement has always been verbal. I've read some horror stories about developers having their open-source work legally claimed by their employer. I'd be more comfortable if we had something in writing from my employer saying that contributions are allowed and not owned by the company. Understanding that you are not lawyers, does anyone know where to find a boilerplate document to this effect?

    Read the article

  • Microsoft’s Contribution to jQuery – Client Templating

    - by joelvarty
    I am interested to see the community’s response to Microsoft’s contributions to jQuery.  I have been using jTemplates on and off in my apps for a while, but I will certainly check out the new templating plugins put forth by MS and explained here by Scott Guthrie. It may be that some are against the very idea of a company like Microsoft being involved with jQuery, and Scott explains the process with the following: “jQuery has a fantastic developer community, and a very open way to propose suggestions and make contributions.  Microsoft is following the same process to contribute to jQuery as any other member of the community.” I think we can take this in one of two ways:  It’s great that Microsoft sees themselves as a part of a greater community that they can support. It’s the first step in Microsoft’s attempt to usurp the community and have greater control over the web, it’s standards, and it’s developer community. Personally, I believe Microsoft sees the world (and the web) differently from how they did back when IE had more than %80 of the browser market.  Now, in order to keep it’s development products relevant, they are pushing Asp.Net (as they have been for a few years) towards a more open strategy that’s more “web-like” in my opinion. These contributions to jQuery are a good thing, I think.  Now, let’s go try out these new plug-ins and see if they stack up… more later - joel

    Read the article

  • jQuery Globalization Plugin from Microsoft

    Last month I blogged about how Microsoft is starting to make code contributions to jQuery, and about some of the first code contributions we were working on: jQuery Templates and Data Linking support. Today, we released a prototype of a new jQuery Globalization Plugin that enables you to add globalization support to your JavaScript applications. This plugin includes globalization information for over 350 cultures ranging from Scottish Gaelic, Frisian, Hungarian, Japanese, to Canadian English. ...Did you know that DotNetSlackers also publishes .net articles written by top known .net Authors? We already have over 80 articles in several categories including Silverlight. Take a look: here.

    Read the article

  • multipass shadow mapping renderer in XNA

    - by Nick
    I am wanting to implement a multipass renderer in XNA (additive blending combines the contributions from each light). I have the renderer working without any shadows, but when I try to add shadow mapping support I run into an issue with switching render targets to draw the shadow maps. When I switch render targets, I lose the contents of the backbuffer which ruins the whole additive blending idea. For example: Draw() { DrawAmbientLighting() foreach (DirectionalLight) { DrawDirectionalShadowMap() // <-- I lose all previous lighting contributions when I switch to the shadow map render target here DrawDirectionalLighting() } } Is there any way around my issue? (I could render all the shadow maps first, but then I have to make and hold onto a render target for each light that casts a shadow--is this the only way?)

    Read the article

  • Whats the difference between Command Parameters and Menu Contribution Parameters

    - by Saurabh
    I can see that parameters can be defined for Commands defined using the Commands extension point. I can not define a value for these command parameters. I can also define parameters under the Command element in the menus extension point when defining menu contributions. I can define a value for the parameter here. Are the command parameters in Command different from parameters in menu contributions? If they are different how are they different?

    Read the article

  • To the world, with love

    - by kaleidoscope
    kaleidoscope 1817, lit. "observer of beautiful forms," coined by its inventor, Sir David Brewster (1781-1868), from Gk. kalos "beautiful" + eidos "shape" (see -oid) + -scope, on model of telescope, etc. Figurative meaning "constantly changing pattern" is first attested 1819 in Lord Byron, whose publisher had sent him one. Let’s start by setting some context here. “We” are not a single blogger but a bunch of like minded people who will be contributing to this blog. We belong to a team led by some folks possessed by innovation, and this has rubbed on us in a good way. How it started It all started with initiative from Girish, A. A big thank you, goes to him. To get it straight from the horse’ mouth: What is it? - Everybody (as per the published schedule) post a small write-up (not more than say 5/6 lines) regarding any Azure related concept. - We shall consolidate all these mails (which would be 5/week) and quickly discuss/brain storm about it, end of the week i.e. on Fridays. What’s the benefit? - This should make our basic Azure concepts rock-solid. - As part of this exercise, we will have a very good collection of Azure FAQs. As the team grew stronger, so did the contributions and after almost 3 months of regular contributions and weekly discussions we thought of sharing the content with the world at large. Afterall we are IT folks and the big I in IT is there for a reason. :) The road ahead We will post the entire collection as time permits. Tagged by contributor. Going forward each contributor will post individually adding his/her specific tag. Get blogging!!

    Read the article

  • 4th International SOA Symposium + 3rd International Cloud Symposium by Thomas Erl - call for presentations

    - by Jürgen Kress
    At the last SOA & Cloud Symposium by Thomas Erl the SOA Partner Community had a great present. The next conference takes place April 2011 in Brazil, make sure you submit your papers. The International SOA and Cloud Symposium brings together lessons learned and emerging topics from SOA and Cloud projects, practitioners and experts. The two-day conference agenda will be organized into the following primary tracks: SOA Architecture & Design SOA & BPM Real World SOA Case Studies SOA & Cloud Security Real World Cloud Computing Case Studies REST & Service-Orientation BPM, BPMN & Service-Orientation Business of SOA SOA & Cloud: Infrastructure & Architecture Business of Cloud Computing Presentation Submissions The SOA and Cloud Symposium 2010 program committees invite submissions on all topics related to SOA and Cloud, including but not limited to those listed in the preceding track descriptions. While contributions from consultants and vendors are appreciated, product demonstrations or vendor showcases will not be accepted. All contributions must be accompanied with a biography that describes the SOA or Cloud Computing related experience of the presenter(s). Presentation proposals should be submitted by filling out the speaker form and sending the completed form to [email protected]. All submissions must be received no later than January 31, 2010. To download the speaker form, please click here. Specially we are looking for Oracle SOA Suite and BPM Suite Case Studies! For additional call for papers please visit our SOA Community Wiki.   For more information on SOA Specialization and the SOA Partner Community please feel free to register at www.oracle.com/goto/emea/soa (OPN account required) Blog Twitter LinkedIn Mix Forum Wiki Website Technorati Tags: SOA Symposium,Cloud Symposium,Thomas Erl,SOA,SOA Suite,Oracle,Call for papers,OPN,BPM,Jürgen Kress

    Read the article

  • Microsoft C# Most Valuable Professional

    - by Robz / Fervent Coder
    Recently I was awarded the Microsoft Most Valuable Professional (MVP) for Visual C#. For those that don’t know it’s an annual award based on nominations from peers and Microsoft. Although there are just over 4,000 MVPs worldwide from all kinds of specializations, there are less than 100 C# MVPs in the US. There is more information at the site: https://mvp.support.microsoft.com The Microsoft MVP Award is an annual award that recognizes exceptional technology community leaders worldwide who actively share their high quality, real world expertise with users and Microsoft. With fewer than 5,000 awardees worldwide, Microsoft MVPs represent a highly select group of experts. MVPs share a deep commitment to community and a willingness to help others. To recognize the contributions they make, MVPs from around the world have the opportunity to meet Microsoft executives, network with peers, and position themselves as technical community leaders. Here is my profile: https://mvp.support.microsoft.com/default.aspx/profile/rob.reynolds I want to thank those that nominated me, without nominations this would never have happened. Thanks to Microsoft for liking me and finding my achievements and contributions to the community to be worth something. It’s good to know when you put in a lot of hard work that you get rewarded! I also want to thank many of the people I have worked with over the last 7 years. You guys have been great and I’m definitely standing on the shoulders of giants! Thanks to KDOT for giving me that first shot into professional programming and the experience and all of the training! A special thanks to @drusellers for kick starting me when I went stale in my learning back in 2007 and for always pushing me and bouncing ideas off of me. Without you I don’t think I would have made it this far. Thanks Alt.NET for keeping it fresh and funky! A very special thank you goes out to my wife for supporting me and locking me in the basement to work on all of my initiatives!

    Read the article

  • Microsoft MVP Again for 2011

    - by Vincent Maverick Durano
    Normal 0 false false false EN-PH X-NONE X-NONE MicrosoftInternetExplorer4 /* Style Definitions */ table.MsoNormalTable {mso-style-name:"Table Normal"; mso-tstyle-rowband-size:0; mso-tstyle-colband-size:0; mso-style-noshow:yes; mso-style-priority:99; mso-style-parent:""; mso-padding-alt:0in 5.4pt 0in 5.4pt; mso-para-margin:0in; mso-para-margin-bottom:.0001pt; mso-pagination:widow-orphan; font-size:10.0pt; font-family:"Times New Roman","serif";} I just got a great news from Microsoft that I’m re-awarded as Microsoft MVP (Most Valuable Professional) for this year.  This is my 3rd year in a row as an MVP and  I’m of course very happy about and feel honored by it. Woohoo!! Here’s the Proof =} Dear Vincent Maverick Durano, Congratulations! We are pleased to present you with the 2011 Microsoft® MVP Award! This award is given to exceptional technical community leaders who actively share their high quality, real world expertise with others. We appreciate your outstanding contributions in ASP.NET/IIS technical communities during the past year. The Microsoft MVP Award provides us the unique opportunity to celebrate and honor your significant contributions and say "Thank you for your technical leadership."     BIG thanks to Microsoft, my MVP Lead Lilian Quek, readers, and everyone who has supported me!!!

    Read the article

  • Wiki Application With A Reputation System

    - by Christofian
    I'm really impressed with Stack Exchange's concept of reputation (you gain reputation as you post, and the more you post, the more privileges you get), and I want to apply the concept to a wiki that I am building. Does anyone know of a php wiki that has a concept of privileges/reputation similar to Stack Exchange? I'm not necessarily looking for something identical to SE, I'm just looking for a wiki application that gives users more privileges the more they contribute positively to the wiki (SE has down votes, the wiki should have some way of identifying negative contributions too). The privileges should be category based, so the more active you are in a specific category or page, the more privileges you get for that category. There should also be site wide privileges as well, though those should be harder to access than the category privileges. NOTE: If it is not possible to get category wide privileges and site wide privileges, I will be OK with just category wide privileges or just site wide privileges. I should be able to change the requirements for each privilege, through a administration panel or through editing a file (some wiki applications don't have administration interfaces). Does anyone have a script or a solution that will do this? If the script uses something similar to reputation to determine how much a user has positively contributed to the site, then that is OK too. Please Note: I am looking for a way to rate individual user contributions, not a way to rate the quality of an entire page.

    Read the article

  • Simplex Noise Help

    - by Alex Larsen
    Im Making A Minecraft Like Gae In XNA C# And I Need To Generate Land With Caves This Is The Code For Simplex I Have /// <summary> /// 1D simplex noise /// </summary> /// <param name="x"></param> /// <returns></returns> public static float Generate(float x) { int i0 = FastFloor(x); int i1 = i0 + 1; float x0 = x - i0; float x1 = x0 - 1.0f; float n0, n1; float t0 = 1.0f - x0 * x0; t0 *= t0; n0 = t0 * t0 * grad(perm[i0 & 0xff], x0); float t1 = 1.0f - x1 * x1; t1 *= t1; n1 = t1 * t1 * grad(perm[i1 & 0xff], x1); // The maximum value of this noise is 8*(3/4)^4 = 2.53125 // A factor of 0.395 scales to fit exactly within [-1,1] return 0.395f * (n0 + n1); } /// <summary> /// 2D simplex noise /// </summary> /// <param name="x"></param> /// <param name="y"></param> /// <returns></returns> public static float Generate(float x, float y) { const float F2 = 0.366025403f; // F2 = 0.5*(sqrt(3.0)-1.0) const float G2 = 0.211324865f; // G2 = (3.0-Math.sqrt(3.0))/6.0 float n0, n1, n2; // Noise contributions from the three corners // Skew the input space to determine which simplex cell we're in float s = (x + y) * F2; // Hairy factor for 2D float xs = x + s; float ys = y + s; int i = FastFloor(xs); int j = FastFloor(ys); float t = (float)(i + j) * G2; float X0 = i - t; // Unskew the cell origin back to (x,y) space float Y0 = j - t; float x0 = x - X0; // The x,y distances from the cell origin float y0 = y - Y0; // For the 2D case, the simplex shape is an equilateral triangle. // Determine which simplex we are in. int i1, j1; // Offsets for second (middle) corner of simplex in (i,j) coords if (x0 > y0) { i1 = 1; j1 = 0; } // lower triangle, XY order: (0,0)->(1,0)->(1,1) else { i1 = 0; j1 = 1; } // upper triangle, YX order: (0,0)->(0,1)->(1,1) // A step of (1,0) in (i,j) means a step of (1-c,-c) in (x,y), and // a step of (0,1) in (i,j) means a step of (-c,1-c) in (x,y), where // c = (3-sqrt(3))/6 float x1 = x0 - i1 + G2; // Offsets for middle corner in (x,y) unskewed coords float y1 = y0 - j1 + G2; float x2 = x0 - 1.0f + 2.0f * G2; // Offsets for last corner in (x,y) unskewed coords float y2 = y0 - 1.0f + 2.0f * G2; // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds int ii = i % 256; int jj = j % 256; // Calculate the contribution from the three corners float t0 = 0.5f - x0 * x0 - y0 * y0; if (t0 < 0.0f) n0 = 0.0f; else { t0 *= t0; n0 = t0 * t0 * grad(perm[ii + perm[jj]], x0, y0); } float t1 = 0.5f - x1 * x1 - y1 * y1; if (t1 < 0.0f) n1 = 0.0f; else { t1 *= t1; n1 = t1 * t1 * grad(perm[ii + i1 + perm[jj + j1]], x1, y1); } float t2 = 0.5f - x2 * x2 - y2 * y2; if (t2 < 0.0f) n2 = 0.0f; else { t2 *= t2; n2 = t2 * t2 * grad(perm[ii + 1 + perm[jj + 1]], x2, y2); } // Add contributions from each corner to get the final noise value. // The result is scaled to return values in the interval [-1,1]. return 40.0f * (n0 + n1 + n2); // TODO: The scale factor is preliminary! } public static float Generate(float x, float y, float z) { // Simple skewing factors for the 3D case const float F3 = 0.333333333f; const float G3 = 0.166666667f; float n0, n1, n2, n3; // Noise contributions from the four corners // Skew the input space to determine which simplex cell we're in float s = (x + y + z) * F3; // Very nice and simple skew factor for 3D float xs = x + s; float ys = y + s; float zs = z + s; int i = FastFloor(xs); int j = FastFloor(ys); int k = FastFloor(zs); float t = (float)(i + j + k) * G3; float X0 = i - t; // Unskew the cell origin back to (x,y,z) space float Y0 = j - t; float Z0 = k - t; float x0 = x - X0; // The x,y,z distances from the cell origin float y0 = y - Y0; float z0 = z - Z0; // For the 3D case, the simplex shape is a slightly irregular tetrahedron. // Determine which simplex we are in. int i1, j1, k1; // Offsets for second corner of simplex in (i,j,k) coords int i2, j2, k2; // Offsets for third corner of simplex in (i,j,k) coords /* This code would benefit from a backport from the GLSL version! */ if (x0 >= y0) { if (y0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 1; k2 = 0; } // X Y Z order else if (x0 >= z0) { i1 = 1; j1 = 0; k1 = 0; i2 = 1; j2 = 0; k2 = 1; } // X Z Y order else { i1 = 0; j1 = 0; k1 = 1; i2 = 1; j2 = 0; k2 = 1; } // Z X Y order } else { // x0<y0 if (y0 < z0) { i1 = 0; j1 = 0; k1 = 1; i2 = 0; j2 = 1; k2 = 1; } // Z Y X order else if (x0 < z0) { i1 = 0; j1 = 1; k1 = 0; i2 = 0; j2 = 1; k2 = 1; } // Y Z X order else { i1 = 0; j1 = 1; k1 = 0; i2 = 1; j2 = 1; k2 = 0; } // Y X Z order } // A step of (1,0,0) in (i,j,k) means a step of (1-c,-c,-c) in (x,y,z), // a step of (0,1,0) in (i,j,k) means a step of (-c,1-c,-c) in (x,y,z), and // a step of (0,0,1) in (i,j,k) means a step of (-c,-c,1-c) in (x,y,z), where // c = 1/6. float x1 = x0 - i1 + G3; // Offsets for second corner in (x,y,z) coords float y1 = y0 - j1 + G3; float z1 = z0 - k1 + G3; float x2 = x0 - i2 + 2.0f * G3; // Offsets for third corner in (x,y,z) coords float y2 = y0 - j2 + 2.0f * G3; float z2 = z0 - k2 + 2.0f * G3; float x3 = x0 - 1.0f + 3.0f * G3; // Offsets for last corner in (x,y,z) coords float y3 = y0 - 1.0f + 3.0f * G3; float z3 = z0 - 1.0f + 3.0f * G3; // Wrap the integer indices at 256, to avoid indexing perm[] out of bounds int ii = i % 256; int jj = j % 256; int kk = k % 256; // Calculate the contribution from the four corners float t0 = 0.6f - x0 * x0 - y0 * y0 - z0 * z0; if (t0 < 0.0f) n0 = 0.0f; else { t0 *= t0; n0 = t0 * t0 * grad(perm[ii + perm[jj + perm[kk]]], x0, y0, z0); } float t1 = 0.6f - x1 * x1 - y1 * y1 - z1 * z1; if (t1 < 0.0f) n1 = 0.0f; else { t1 *= t1; n1 = t1 * t1 * grad(perm[ii + i1 + perm[jj + j1 + perm[kk + k1]]], x1, y1, z1); } float t2 = 0.6f - x2 * x2 - y2 * y2 - z2 * z2; if (t2 < 0.0f) n2 = 0.0f; else { t2 *= t2; n2 = t2 * t2 * grad(perm[ii + i2 + perm[jj + j2 + perm[kk + k2]]], x2, y2, z2); } float t3 = 0.6f - x3 * x3 - y3 * y3 - z3 * z3; if (t3 < 0.0f) n3 = 0.0f; else { t3 *= t3; n3 = t3 * t3 * grad(perm[ii + 1 + perm[jj + 1 + perm[kk + 1]]], x3, y3, z3); } // Add contributions from each corner to get the final noise value. // The result is scaled to stay just inside [-1,1] return 32.0f * (n0 + n1 + n2 + n3); // TODO: The scale factor is preliminary! } private static byte[] perm = new byte[512] { 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180, 151,160,137,91,90,15, 131,13,201,95,96,53,194,233,7,225,140,36,103,30,69,142,8,99,37,240,21,10,23, 190, 6,148,247,120,234,75,0,26,197,62,94,252,219,203,117,35,11,32,57,177,33, 88,237,149,56,87,174,20,125,136,171,168, 68,175,74,165,71,134,139,48,27,166, 77,146,158,231,83,111,229,122,60,211,133,230,220,105,92,41,55,46,245,40,244, 102,143,54, 65,25,63,161, 1,216,80,73,209,76,132,187,208, 89,18,169,200,196, 135,130,116,188,159,86,164,100,109,198,173,186, 3,64,52,217,226,250,124,123, 5,202,38,147,118,126,255,82,85,212,207,206,59,227,47,16,58,17,182,189,28,42, 223,183,170,213,119,248,152, 2,44,154,163, 70,221,153,101,155,167, 43,172,9, 129,22,39,253, 19,98,108,110,79,113,224,232,178,185, 112,104,218,246,97,228, 251,34,242,193,238,210,144,12,191,179,162,241, 81,51,145,235,249,14,239,107, 49,192,214, 31,181,199,106,157,184, 84,204,176,115,121,50,45,127, 4,150,254, 138,236,205,93,222,114,67,29,24,72,243,141,128,195,78,66,215,61,156,180 }; private static int FastFloor(float x) { return (x > 0) ? ((int)x) : (((int)x) - 1); } private static float grad(int hash, float x) { int h = hash & 15; float grad = 1.0f + (h & 7); // Gradient value 1.0, 2.0, ..., 8.0 if ((h & 8) != 0) grad = -grad; // Set a random sign for the gradient return (grad * x); // Multiply the gradient with the distance } private static float grad(int hash, float x, float y) { int h = hash & 7; // Convert low 3 bits of hash code float u = h < 4 ? x : y; // into 8 simple gradient directions, float v = h < 4 ? y : x; // and compute the dot product with (x,y). return ((h & 1) != 0 ? -u : u) + ((h & 2) != 0 ? -2.0f * v : 2.0f * v); } private static float grad(int hash, float x, float y, float z) { int h = hash & 15; // Convert low 4 bits of hash code into 12 simple float u = h < 8 ? x : y; // gradient directions, and compute dot product. float v = h < 4 ? y : h == 12 || h == 14 ? x : z; // Fix repeats at h = 12 to 15 return ((h & 1) != 0 ? -u : u) + ((h & 2) != 0 ? -v : v); } private static float grad(int hash, float x, float y, float z, float t) { int h = hash & 31; // Convert low 5 bits of hash code into 32 simple float u = h < 24 ? x : y; // gradient directions, and compute dot product. float v = h < 16 ? y : z; float w = h < 8 ? z : t; return ((h & 1) != 0 ? -u : u) + ((h & 2) != 0 ? -v : v) + ((h & 4) != 0 ? -w : w); } This Is My World Generation Code Block[,] BlocksInMap = new Block[1024, 256]; public bool IsWorldGenerated = false; Random r = new Random(); private void RunThread() { for (int BH = 0; BH <= 256; BH++) { for (int BW = 0; BW <= 1024; BW++) { Block b = new Block(); if (BH >= 192) { } BlocksInMap[BW, BH] = b; } } IsWorldGenerated = true; } public void GenWorld() { new Thread(new ThreadStart(RunThread)).Start(); } And This Is A Example Of How I Set Blocks Block b = new Block(); b.BlockType = = Block.BlockTypes.Air; This Is A Example Of How I Set Models foreach (Block b in MyWorld) { switch(b.BlockType) { case Block.BlockTypes.Dirt: b.Model = DirtModel; break; ect. } } How Would I Use These To Generate To World (The Block Array) And If Possible Thread It More? btw It's 1024 Wide And 256 Tall

    Read the article

1 2 3 4 5 6 7 8 9 10  | Next Page >