Advertisement Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

814 Good

About Nercury

  • Rank

Personal Information

  • Interests

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. Nercury

    What Color is the darn dress?!

    Forget about perception. Everything is fine with perception :) How does brain decide how the object is lit? Well, it depends on the SHAPE of that object. Those who imagine it being worn by a person (convex) see it as dark blue/black. Those who imagine it as a piece of cloth (concave) see it as bright blue/gold. It comes down as object being imagined being convex/concave: Interesting how a photo could accidentally have this property.   Geez. This took some time. Now I can go to sleep. But I can no longer "flip" it back to "convex" in my mind :(
  2. Nercury

    Thoughts on Rust?

    My background: for the little I delved in game programming with C++, I was absolutely scared of the language. Previously, I was programming in C#/Java, and C++ with its manual memory management was so scary I switched completely to "modern" C++11 and used shared_ptr absolutely everywhere. Then my enthusiasm got drowned by "serious" work in PHP "language". And Javascript. I am a huge fan of finding problems on developer machine, and not runtime. And scripting languages are in absolutely the farthest distance from that ideal.   Year and a half later, I found Rust. It is like a breath of fresh air. It has the right idea. It is not that it is "killer" of some particular language. It simply stands out because it leaves less problems for runtime than any language I used before.   I am not saying that "Rust" is special. No, the idea of "ownership" and "borrowing" is special. Even if by some unfortunate event Rust dies, other languages are going to pick up this idea.   How else to explain it? Well, you know, how we find elements in map quickly? We keep it sorted. How do we quickly calculate statistics for the large amount of data? Well, we aggregate it as the data comes in. How do we avoid collecting garbage in language to ensure memory safety? Well, we define strict rules so we can know when all data is deleted at compile time. duh.   Yeah, I know, it sounds like Rust turned me into a fan
  3. Nercury

    The Programming Primer

    As a beginner, I feel I would loose it at the example of adding numbers.   It just does too much demonstration instead of actually doing something. Imagine a beginner who will finally figure out that the best way to write that piece of code in practice would be:   int myNumber = 8;   5 + 3 is 8, duh! :)   I would mark this as peer reviewed, because honestly this article does what it claims to do: confuse the hell out of beginners :). It basically throws to the face all these concepts and says "Get your brain familiar with these words!". It is not for everyone.
  4. Nercury

    How to Think to Design Infinite Games   Can we just agree that there are two types of games, which can be mixed together, and move on?   If not, I will write 3 more articles: "Debunking prejudices against games where you can win", "How to allow your players to make games in your game" and "How to make an infinite game by redirecting players to DirectX SDK download page".
  5. Nercury

    Where to go to start to learn Python?

      Don't rely on single source :) Also when you understand basic language constructs, you can delve into something bigger. For example, I learned python while writing Civ4 script.
  6. Nercury

    Unity 3D vs UDK

    Unreal engine is made for First Person Shooter, meaning that it works best for what you would usually see in other Unreal games: a map, weapons, shooting, jumping, multiplayer, bots.   These are Pros if you need that for your game.
  7.   When I mentioned null pointers I was thinking about those corner tiles which have 7 neighbors instead of 8.
  8. It looks like you will have to store your shortest path node list in memory somehow.   Also it seems that you need a bit more than brute force nearest nodes, you may need to exclude mountains and lakes, or assign appropriate values for hard-to-pass terrain.   So you may need to take that data you use for the terrain (i will call it "6 sphere face"), and use it to compute "shortest path node" only once (or only when it changes). This can be done and tested separately, until you get it right (even with smaller cube density if needed for testing purposes). In case of the corners, just allow null references for your nodes (if you need diagonal path too). Every "shortest path node" may have a reference back to original "6 sphere face" node, so you get the real thing if needed.   This way your lookup algorithm remains simple and fast yet you do not loose any information about your world.   EDIT: As for adjacency of the faces, the most basic approach is naming things right. For example, of two futhermost corners of the box have respectively values of (-1, -1, -1) and (1, 1, 1), this information can be retained in cube face array. For example, cube face array may contain faces from (-1, -1, -1) to (-1, -1, 1) for U and from (-1, -1, -1) to (1, -1, -1) for V. A bit more math, but solving it would help to avoid a lot of repetition. 
  9. Nercury

    I have been fired :(

    From your post, looks like your colleague did not like you :/
  10. My article may help to get started with vectors.
  11. It depends on what is meant by the "best" code. If a company is evaluating a candidate for a team, then the "best" code in this case can do next to nothing and still be the best: clarity, readability, structure, consistency would be the main evaluation points. Another case of the "best" code would be something that has the best value. However if a company is looking for this particular type of code, then they are not actually interested in the code, they are interested if you are awesome.   Thing is, my best code which does something productive looks the same as my code which does something boring. I would send the code for the boring case and a executable binary of the productive case. With a note: this is how my code looks like, and this is what I can do.   THEY ARE NOT GOING TO COMPILE IT ANYWAYS.
  12. You can copy the initial permutation idea from the Perlin noise: basically, you have a permanent 256-sized array which points to a numbers from 0 to 255, call it "permutations". Then your "random" hash number at a specific integer point would be:   int X = (int)Math.floor(x) & 255; int Y = (int)Math.floor(y) & 255; int Z = (int)Math.floor(z) & 255; int hash = permutations[X]; hash = permutations[hash + Y]; hash = permutations[hash + Z];     Also the trick is to expand the 256-sized array and clone the copy of the same numbers to the second half, so you don't need to check for array overflow when adding the coordinates.   You get more variations by interpolating between these values and blending more noises at different scales.   Perlin noise is here: 3D Perlin noise additionally interpolates between 12 points, plus 4 point simplex shape. Although you would want to use improved Perlin noise, which uses 4 point simplex for 3D and 3 point triangle for 2D, which is aptly called Simplex Noise.
  13. Nercury

    Writing Game Music

    A very nicely presented article.   But it is my opinion that music theory would gain from sorting out the way it names things. Also syntactic sugar, just too much of syntactic sugar!
  • Advertisement

Important Information

By using, you agree to our community Guidelines, Terms of Use, and Privacy Policy. is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!