Jump to content
  • Advertisement

All Activity

This stream auto-updates     

  1. Past hour
  2. For performance reasons Sparse Voxel Octrees should not be used. The update just takes too long if you move a light or have moving objects. Volume textures are easier to handle but updating them takes even longer because you have to invalidate everything. Thus Nvidia uses clipmaps where moving things doesn't imply the need to revoxeliz i guess. Thanks for the link to tomorrows children tho, Im having a look at it
  3. Hello Zakwayda, The x and y corner of the colliders represent like so, The x and y represent the top left corners of the rectangles, and the top right corners, the max width and height. Then, about the movement of the player, I am reading the keyboard like this, and moving 1 pixel (int) to the desired direction. (The method move(xMove, yMove) has the collission code that I post previously. @Override public void update() { super.update(); int xMove = 0; int yMove = 0; // Read keyboard events if (keyboard.up) { yMove--; } else if (keyboard.down) { yMove++; } else if (keyboard.left) { xMove--; } else if (keyboard.right) { xMove++; } if (xMove != 0 || yMove != 0) { move(xMove, yMove); } } Thank you so much for your response.
  4. Today
  5. Hello, and thank you for your support! Yes, I linked it to show what I have available, so basically nothing. It also shows what I need to feed to the class to make a mesh appear. What I need is to fill the Mesh.vertices[] and the Mesh.triangles[]. To make my questions more precise: (They mainly revolve arround the structure/architecture of data storage) 1. In what fashion do I index the vertices? Is there some "best practice" amongst graphic programmers? 2. Is there a fitting, elegant algorithm already existing that matches the indices of the vertices[]-array to the triangles[]-array? 3. (Partly answered) How do I store the information for later usage in the pathfinder? This is what I got so far (creating a flat hexagon in C#): using UnityEngine; public class D_HexTile : MonoBehaviour { public float mSize = 1f; public Material mMaterial; void CreateHex() { gameObject.AddComponent<MeshFilter>(); gameObject.AddComponent<MeshRenderer>(); Mesh mesh = GetComponent<MeshFilter>().mesh; mesh.Clear(); // === Vertices === Vector3[] vertices = new Vector3[7]; vertices[0] = transform.position; for(int i = 1; i < vertices.Length; i++) { vertices[i] = GetCorner(transform.position, mSize, i - 1); } mesh.vertices = vertices; // === Triangles === int[] triangles = new int[6 * 3]; int triNum = 1; for(int l = 0; l < triangles.Length; l++) { if (l % 3 == 0) { triangles[l] = 0; } else if(l % 3 == 1) { triangles[l] = 1 + (triNum % 6); } else if(l % 3 == 2) { triangles[l] = triNum; triNum++; } } mesh.vertices = vertices; mesh.triangles = triangles; } private Vector3 GetCorner(Vector3 center, float size, int i) { float angleDeg = 60f * i; float angleRad = Mathf.Deg2Rad * angleDeg; return new Vector3(center.x + size * Mathf.Cos(angleRad), center.y, center.z + size * Mathf.Sin(angleRad)); } } I omitted parts for UV's and normals. I show this to give an example usage of the Mesh-class ... Now I have to feed it. So, this is obviously not enough. GetCorners() will suffice for the hexagon corners, but using the midpoints by doing vector-math for sub-devided triangles (as you suggested) seems more appropriate. So, now I have to deal with the questions above. I can't seem to wrap my mind arround what question to prioritize first. The answer to question 2. depends on how I deal with 1. and 3. If I want the indices stored in a certain way, I will have to traverse the QuadTree / BinaryTree in a certain way (whatever that will look like). The other way arround: When I store the sub-devided triangles in a certain way, they may predefine the indices of the vertices. I found this idea very inspiring and would like to know more. I will probably need the edges more often than the faces (pathfinding). Do I understand this correctly, when I say the following? I have a List of edges. When it is just the hexagon, I have 12 of them. 6 of those contain data for two triangles, the other 6 have only one triangle (the outer edges). I thereby have 3 references to any one triangle. When I call SubdevideTri() on any triangle, it will tell all three edges to SubdevideEdge() and then .... .... well, this is where my brain locks up .... To the point: @Gnollrunner Could you ellaborate on how you did this? How is your data stored? Do the edges contain the corners and the triangles? Why do I need the triangles stored in a QuadTree, when I already have their reference in the edges, stored in 6 BinaryTrees? What about the new edges "in between" midpoints? Or is the QuadTree of triangles the "dominant" storage? Do the triangles reference the edges? Do I really need the BinaryTree in that case? Or do you do both, to simplify access? I will try things out a bit and come back to you. Valueable knowledge, thank you for this! Thanks again for your support! Cheers!
  6. Madman's Journal

    2D and 3D artist needed for horror adventure.

    Please forgive the delay in responding, it definitely was not do to disinterest. If you're looking for experience this is the right project. I love your work and would be delighted to have you involved. Please drop me a line at bradgoodman@hotmail.com if you're still interested.
  7. Welcome to the dilemma of game programmers everywhere. *Spoiler* You will never have the assets you want. The alternatives: Make better use of the assets you do have available - compromise Learn to make your own assets Work with artists Or some combination of the above. In the long haul learning to make your own assets is really useful, both for prototypes and maybe final assets, but of course it comes at the expense of programming time. A lot of the trick in game programming, like a good chef, is to make good use of what you've got, rather than spending time wishing you had more ingredients.
  8. Eimantas Gabrielius

    Daily Bonus Logic

    For example - Castle Crush. 7 Days, every day from 1 to 6 you get some reward after doing some battles. In day 7 you get LEGENDARY card which is game changing cards. Point is, if you miss atleast 1 day from 7day week, you continue getting daily rewards, but you cannot get LEGENDARY card at the week ends.
  9. Well, there are a number of humanoid player characters out there on the free pile, not a lot of animals and whatnot though, a few robots... What exactly are you Not finding? If you give us something more specific, I bet somebody knows where a good prototype asset is to be found. Otherwise, for anything that is highly specialized you might want to pick up some basic Blender/etc. modeling and animation skills. Takes a few weeks to get enough skills to do prototype quality work, but it's well worth the time.
  10. Silence@SiD

    Symbol lookup error on Linux

    And there is no options to enable this when configuring the build (./configure --help might give your some hints if the project uses autoconf, and config.h is the file where all enabled options get their defines set) ?
  11. a light breeze

    Which artstyle works best? (3 versions of world-map)

    I don't like the first one. The borders don't look natural at all. If you're going to with a low-res approximation of the borders, own up to it and go with option 2 instead. Option 3 looks the best. Since you haven't posted any sprites, I can't tell how well it will work with your sprites.
  12. Hi All, I'm a solo programmer. I want to mess around and make a game/prototype. However, I have no art or modeling skills. I poked around the Unity3D asset store(non-exhaustive search), but didn't really find anything that would match what I was going for. Furthermore gameplay (for me) is tightly tied to animations and effects to get the right feel. What do you do about this? How do you go about prototyping and playing/creating a game and getting assets that "will do" without wrecking your ability to get a feel right? I'm fine with programming but as far as finding the right animations and assets I'm stuck. Any suggestions for getting around this? One idea is to stitch something together using primitives. I'm really not sure how to go about this one. I'm looking for something practical so I can just start coding and putting something together. Regards, Plot
  13. NVs implementation is very slow, i've heard (but that was many years ago). AFAIK it has not been used in a game yet. I think they used anisotropic voxels (6 colors for each), and octree. Anybody else ruled both of them out. Instead anisotropic voxels it's better to just use one more subdivision, and instead octree it's better to use plain volume textures for speed. That's what people say... personally i would give octrees still a try, though. Cryengines approach is very interrestig: IIRC they use refractive shadowmaps, and the voxels are used just for occlusion. Likely they use one byte per voxel to utilize hardware filtering, but using just one bit would work too. This means big savings in memory, so the resolution can be higher and the light leaking becomes less of a problem. They have detailed description on their manual pages. The developers of PS4 game 'Tomorrows Children' have a very good paper on their site. They really tried a lot of optimization ideas and have great results, so a must read if you missed it. An unexplored idea would be to use oriented bricks of volumes. So you could prevoxelize also dynamic models like vehicles and just update their transform instead voxelizing each frame. Similar to how UE4 uses SDF volumes for shadows.
  14. Hodgman

    "Nice" tweakable S-function

    This thread is a great resource! At one point in time, I wanted a tweakable S-curve that could have a linear section in the middle and ended up with this mess: float SCurve( float x, float white = 10, float shoulder = 3, float slope = 1.5; ) { float invWhite = 1/((slope/shoulder)*(white-shoulder*2)); float one_on_shoulder = 1/shoulder; float slope_on_shoulder = slope/shoulder; float white_minus_two_shoulder = white-shoulder*2; float white_minus_shoulder = white-shoulder; x = min(x,white); float a = pow( abs(x*one_on_shoulder), slope ); float b = slope_on_shoulder*(x-shoulder)+1; float c = slope_on_shoulder*white_minus_two_shoulder + 2 - pow(abs((white-x)*one_on_shoulder), slope); return x < shoulder ? a : (x > white_minus_shoulder ? c : b); } The maximum x value is called "white" because I was using it for tonemapping HDR images http://www.wolframalpha.com/input/?i=plot+piecewise[{+{abs(x%2F3)^1.5,+x+<+3},+{(1.5%2F3)*(10-2*3)+%2B+2+-+abs((10-x)%2F3)^1.5,+x+>+10-3},+{(1.5%2F3)*(x-3)%2B1,+3<%3Dx<%3D10-3}+}],+x+%3D+0+to+10 http://www.wolframalpha.com/input/?i=plot+piecewise[{+{abs(x%2F5)^4,+x+<+5},+{(4%2F5)*(10-2*5)+%2B+2+-+abs((10-x)%2F5)^4,+x+>+10-5}+}],+x+%3D+0+to+10 Left: white = 10, slope = 1.5, shoulder = 3 (x<3 is the bottom shoulder, 3<x<7 is linear, 7<x is the top shoulder) Right: white = 10, slope = 4, shoulder = 5 (x<5 is the bottom shoulder, 5<x is the top shoulder)
  15. Tereize

    Watchbot - an idea i had

    Yes, please do let us know what type of game it is. Btw, do help me out as well. I'm trying to create a text-based decision making game and I have 4 game ideas, which one sounds best? Here's the link:
  16. I think it will be hard to keep concistancy with other assests, such as UI, units, buildings, all icons etc. As delta said, style should be throrough.
  17. Alexander Orefkov

    Mobile Brick Break

    Hi All! I present my new game - “Brick Break”. There is old classic puzzle game, moved to 3D, in graphics and gameplay. Link to Play Market Gameplay video Game was created by Urho3D engine. Screenshots
  18. Alexander Orefkov

    Brick Break screenshots

    Screenshots from "Brick Break " game.
  19. swiftcoder

    OOP is dead, long live OOP

    I've always assumed that Linus objection is to the rest of the baggage that goes along with "not C", rather than the OO part. There's quite a bit of OO in the linux kernel. Besides, Linus clinging to C is a bit of an outlier at this point: operating systems written in high-level languages abound... Symbian was written in C++, and prior to the emergence of iOS/Android, it was the dominant mobile OS. Microsoft Research's Singularity uses a C# kernel and device drivers written over a C++ HAL. Redox is shaping up to be a fairly complete OS written entirely in Rust. And of course, if you go back a bit in computing history, LISP and Smalltalk were each operating systems in addition to programming languages for the machines they were originally developed on.
  20. Zemlaynin

    The Great Tribes

    Album for The Great Tribes
  21. sQuid

    "Nice" tweakable S-function

    You could also check out the generalized logistic function.
  22. Regarding this code: // Right collision if (playerCollider.x - mapCollider.x < 0) { isCollisionX = true; } // Left collision if (playerCollider.x - mapCollider.x > 0) { isCollisionX = true; } // Top collision if (playerCollider.y - mapCollider.y > 0) { isCollisionY = true; } // Bottom collision if (playerCollider.y - mapCollider.y < 0) { isCollisionY = true; } What are x and y? Do they represent the centers of the rectangles? Or perhaps a corner? How are the rectangles represented? (E.g. min/max, min/size, center/extent, etc.) Also, you mentioned that the move deltas are +/-1. Is the movement time-based? Or are the deltas fixed, e.g. one pixel per move or something like that?
  23. Bit depths that are not a power of two (96-bit) are not particularly fun to support.
  24. Yesterday
  25. fleabay

    What's a frog TODO?

    I'm not too impressed with myself, sorry to say. I've just got to buckle down. Thanks for checking up on me, I needed it.
  26. Oberon_Command

    OOP is dead, long live OOP

    Note that the poster you're quoting said applications. Kernels and embedded software for network switches aren't really what I would call "applications." Applications are things like Word, Maya, Call of Duty, Steam... Consumer software that runs on top of an operating system. The software industry is a young field. It's continually evolving. We're constantly learning with everything we do; in fact, I would say that the death of a programmer's career can often be pinpointed by looking for the point at which he stopped learning new things. A programmer who stops learning is the walking dead, doomed to stagnation and to eventually be superseded by the folks who kept growing. I suspect this "how-to-usev2" will eventually be superseded, too. You make this out like it's a bad thing. Why is that?
  27. Servant of the Lord

    Accessing a subrect of a texture using a UV map [GLSL]

    I got my effect working. Thanks gents! 😃 https://twitter.com/JaminGrey/status/1053107844474646528
  1. Load more activity
  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!