Search results

  1. socram8888

    Removal of all javadoc @author tags - any objections?

    I'm cool with the idea as long as the vast majority of them are removed (I don't want my name to be the only removed from the sources :D)
  2. socram8888

    Proposal: moving math stuff to an independent repository

    As Cervator suggested, I'm opening this thread to discuss whether it's or not a good idea to move the math stuff (org.terasology.math) and random classes (org.terasology.utilities.procedural and org.terasology.utilities.noise) to an independent repository, which would be downloaded as a...
  3. socram8888

    Hi everybody

    https://github.com/socram8888/Terasology/blob/rng/src/main/java/org/terasology/utilities/procedural/Random.java Have a look. If OK I'll start recoding FastRandom and stuff using it. Rather than having many functions with positive, negative, signed, etc... I've just added functions to work...
  4. socram8888

    Modularize flower generation

    Ok :)
  5. socram8888

    Hi everybody

    Actually it is not. Can be modified to: return (long) nextInt() << 32 ^ (long) nextInt(); When you expand an int to a long, if the int was negative, the upper bits from the long are set to 1, in order to keep the sign: (long) 0x01234567 -> 0x0000000001234567L (long) 0x89ABCDEF ->...
  6. socram8888

    Hi everybody

    /* * Copyright 2013 MovingBlocks * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable...
  7. socram8888

    Modularize flower generation

    Yeah, you're right when it comes to the simplicity of RGB to modders. However working with HSL still has the advantage of letting modders add a virtually unlimited amount of colors. So what about mixing both? The artist would create an RGB picture with each component of the plant (stem...
  8. socram8888

    Modularize flower generation

    Actually blue channel is unusued, so it is possible to use it as an index to the hue file. Using blue as the index, images look like this: Which is smaller and more visual
  9. socram8888

    Modularize flower generation

    As I already pointed out, this is designed to be handled by a computer, not an human. Converting to this kind of file is the last step, done automatically by means of a script. The artist only have to build a set of layers, put one aside the other like this: Then run the script which outputs a...
  10. socram8888

    Hi everybody

    I might have misunderstood this:
  11. socram8888

    Modularize flower generation

    This is how do generated images look like for this stripe: Hue file: { "hue": [ "0.23-0.41", "0.5-1.2", "0.5-1.2", "0.5-1.2", "0.5-1.2" ] }
  12. socram8888

    Modularize flower generation

    The scheme doesn't have to be accessible to humans. Artists doesn't need to mess with HSV pictures, in the same way a programmer doesn't need to know how does the CPU process each instruction, or a 3D artist doesn't manually edit each vertex in their models. Here's a picture with the image...
  13. socram8888

    Modularize flower generation

    Why not infinite layers? Using a different file for each image, you can divide the width by the height and get the amount of cells in each strip: Then using a text file, describe the valid chrominance for each cell, like .block, but .plant: { "hue": [ // In degrees "80-160", //...
  14. socram8888

    Hi everybody

    Inhereting Random isn't a good idea. Java Random is synchronized, and that synchronization has an overhead, which might be negligible for some applications, but not for a class called FastRandom that is used all over the code. Check this article talking about the multiply-with-carry RNG (also...
  15. socram8888

    Hi everybody

    Rewrital finished: https://github.com/socram8888/Terasology/commit/791a82704c2d2d88e9eb5c7a42db5703a5cf9010
  16. socram8888

    Hi everybody

    https://github.com/socram8888/Terasology/commit/fb86d65f0c0756539e31348c2a4d4aa851158103 I've created a new branch to rename methods from FastRandom to more meaningful names, for instance: randomInt() -> signedInt() randomIntAbs() -> unsignedInt() randomFloat() -> signedFloat()...
  17. socram8888

    Hi everybody

    Actually I already started fixing the class just after posting that message :rofl: I've already rewritted most of the class, removing magic values with proper constants, but for some reason I can't compile the "multiplayer" branch of Git. It seems that there are some missing classes that are...
  18. socram8888

    Hi everybody

    I've found some weird stuff in org/terasology/utilies/procedural/EPNoise.java. For some reason it tries to do modulus with doubles: for (int i = 0; i < 256; i++) { if (random) { noiseTable[i] = (int) (rand.randomDouble() % 256); // Shouldn't this be...
  19. socram8888

    Hi everybody

    That's the reason I've hadn't issued a pull request yet, I want to add those tests first :) I've modified a bit the FastRandom function (randomCharacterString is now truly random and does not follow any kind of pattern, and uses a local array rather than a StringBuilder, as we know beforehand...
  20. socram8888

    Hi everybody

    https://github.com/socram8888/Terasology/tree/fastpow Here's the branch I've added the new power function. I've also fixed the formatting of the Checkstyle configuration file (replacing tabs with spaces and removing these from blank lines), and moved Matrix utils to their own class (was in a...
Top