Jump to content
  • Advertisement
  • Sponsored by Amazon GameLift

    1. Past hour
    2. The key question may be, How do you communicate the experience? In a game like Space Invaders, think of the timing of the sprite movement, the sound effects...that increasing pace. Left right left right left right left right leftrightleftright. How fast your ship moves, timing the bullets. This, rather than fidelity to original code and hardware limitations, is what makes or breaks adaptations (at least for a player). There was a Mario game for the CD-I and what struck me was how much the designers talked about the challenge of getting the feel of Mario's jump right. Beyond that, I'd stick to data structures and pseudo-code with diagrams for sprites, controls.
    3. Ashley_H

      5x3 Slot Game Logic

      Whilst I can't speak for every company, as a former Novomatic employee I can confirm that this is exactly how their engine and the engines of their subsidiaries would work. The other option would be create a mathematical representation of a set of reel bands which was statistically proven to hit a desired RTP (That method was way beyond my understanding so I won't even attempt to describe it here), however the Monte Carlo approach was generally the most commonly encountered method due to its simplicity and ease of validation (You don't need to write fancy simulators or mathematical models to prove the RTP of your game - Simply write something to brute force about 10 billion game rounds and then output the final win-to-loss ratio). For feature games, prizes and bonuses etc those would generally work as you described - There would be a list of predefined prizes or game outcomes and the RNG would select from these rather than selecting random positions on a reel band. However, this was more to conform to legal obligations whilst controlling the outcome of a game than for any practical reason.
    4. Today
    5. Yeah this is what i think. We can still modify it such as change hairstyle and color maybe by putting scar or tattoo on face like you said. Because for me, that type of game where we can change our job or class like become knight or mage with additional with our face is more exciting.
    6. So, I'm making this screen recording program that captures screenshots via front buffer as frames. I want to add a logo (.png or .jpeg) and a time caption to each frame in real time. I load the logo (.png or .jpeg file) as IDirect3DTexture9 and I try to add it to a IDirect3DSurface9 image frame (screenshot). As I'm new to DirecX9, I have no idea how to copy the logo (texture) to the screenshot (surface/buffer). Any help would be appreciated. P.S. If there's any other way to add logo to each frame without involving texture, please do tell me.
    7. Alberth

      Storing full games on paper?

      You would also need to explain how a computer works, how video works, and what those images you project onto the screen are.
    8. Oh traversing? I use this method: //outIndexStart and End are passed with -1 in the beginning to signify they're empty void FindPointInTree(XMVECTOR point, const _node* tree, int* outIndexStart, int* outIndexEnd) { //check if the point is in the root node at all if (tree->isRoot) if (IsPointInBox(point, tree->bounding_box) == false) return; //if a left node exists see if the point belongs in that volume, then decend if (tree->leftChild != nullptr) if (IsPointInBox(point, tree->leftChild->bounding_box)) FindPointInTree(point, tree->leftChild, outIndexStart, outIndexEnd); //outIndexStart and End are passed with -1 in the beginning to signify they're empty //if we set them already then the point is already found and so no reason to test further if (!(*outIndexStart == -1 && *outIndexEnd == -1)) return; //otherwise search the right side if(tree->rightChild != nullptr) if (IsPointInBox(point, tree->rightChild->bounding_box)) FindPointInTree(point, tree->rightChild, outIndexStart, outIndexEnd); //this part of code is only reached when the last leaf node is found //at which point, just pass out the triangle indices caontined in that node if (*outIndexStart == -1 && *outIndexEnd == -1) { *outIndexStart = tree->start_box_index; *outIndexEnd = tree->end_box_index; } } Thanks for looking over the code, I know it's a lot.
    9. ArcanaDragon

      New Hero Added 08-22-2019

      New hero added: Explosive RC Helicopter Click here to play Hero Land for free in your browser
    10. ArcanaDragon

      Hero Land

      Play as over 100 heroes who fight against the forces of evil. This game is in the alpha stage and a lot of the graphics are currently placeholder graphics. Trailer Click here to play Hero Land for free in your browser Check out the Hero Land gameplay videos!
    11. GoliathForge

      animating sprites

      use the float version instead. The image coordinate space are all values between 0.0 and 1.0
    12. No, what i mean is the process of traversing the tree (for trcing or queries), not how to build it. But 'ill respond in more detail later the day, i see some issues with your building as well...
    13. @Gnollrunner I see what you mean, I actually do have a collision box associated with a character, I suppose I can just check the triangles inside the BVH volume that my character is in for collision instead of just using a ray? At this moment I'm just using a single point to see if I can get the BVH to work correctly. @JoeJ Yea I think I'm missing some part of the process of building the tree. This is my current approach: 1. I go through every triangle in the terrain and generate a bounding box around that triangle 2. I sort all the triangles and their respective bounding boxes along the longest axis of the terrain 3. I find a bounding box surrounding the entire terrain, essentially the bounding box that contains all the bounding boxes of the triangles, and assign that to the root node 4. I split list of organized triangles in half and find a bounding box that covers that split, I assign the one half of the list to the left branch of the binary tree and the other side of the list to the right branch. 5. I go on splitting the list until each leaf contains about 100 triangles I don't want to overwhelm with code but I'll try to keep it as short as possible, this is those 5 steps as I have them in code right now: struct _node { //pretty much the start and end index of the trianlges contained in this node //in actuality they are the start and end indices of the bounding boxes that surround the triangles //the bounding boxes themselves have indices to actual triangles UINT start_box_index; UINT end_box_index; //the bounding volume surrounding the triangles defined by the indices above _bounding_box bounding_box; _node* leftChild; _node* rightChild; bool isRoot; }; //I pass this method the root of an empty tree and the list of bounding boxes around each triangle, this list is organized according to //the longest axis void midpoint_split(_node* tree, const _bounding_box* const boundingBoxList, UINT numBoxesInList, UINT unitsPerLeaf = 100) { if (tree->isRoot) { //the root holds all the triangles in the terrain ( 0 to number_of_triangles ) tree->start_box_index = 0; tree->end_box_index = numBoxesInList; //find the volume of all the triangles the terrain tree->bounding_box = FindBoundingBox(boundingBoxList, tree->start_box_index, tree->end_box_index); //generate a left branch tree->leftChild = new _node; tree->leftChild->isRoot = false; //split the list of triangles in half (0 to 1/2 list) tree->leftChild->start_box_index = 0; tree->leftChild->end_box_index = UINT(float(numBoxesInList) / 2.0f + 0.5f); //just set the leaf nodes to null tree->leftChild->leftChild = nullptr; tree->leftChild->rightChild = nullptr; //find the bounding box around that split half tree->leftChild->bounding_box = FindBoundingBox(boundingBoxList, tree->leftChild->start_box_index, tree->leftChild->end_box_index); //descend in order to generate the entire left branch midpoint_split(tree->leftChild, boundingBoxList, numBoxesInList); //generate the right branch tree->rightChild = new _node; tree->rightChild->isRoot = false; //assign the other half to the right branch (1/2 list + 1 to end) tree->rightChild->start_box_index = UINT(float(numBoxesInList) / 2.0f + 1 + 0.5f); tree->rightChild->end_box_index = numBoxesInList; tree->rightChild->leftChild = nullptr; tree->rightChild->rightChild = nullptr; tree->rightChild->bounding_box = FindBoundingBox(boundingBoxList, tree->rightChild->start_box_index, tree->rightChild->end_box_index); midpoint_split(tree->rightChild, boundingBoxList, numBoxesInList); } else // this is done when the node passed in recursively is no longer the root { //find how many triangles are in this node UINT numTrianglesInRange = tree->end_box_index - tree->start_box_index; //if less than the set minimum then don't split further if (numTrianglesInRange <= unitsPerLeaf) return; tree->leftChild = new _node; tree->leftChild->isRoot = false; //split the node in half tree->leftChild->start_box_index = tree->start_box_index; tree->leftChild->end_box_index = UINT(float(numTrianglesInRange) / 2.0f + 0.5f) + tree->start_box_index; tree->leftChild->leftChild = nullptr; tree->leftChild->rightChild = nullptr; tree->leftChild->bounding_box = FindBoundingBox(boundingBoxList, tree->leftChild->start_box_index, tree->leftChild->end_box_index); midpoint_split(tree->leftChild, boundingBoxList, numBoxesInList); tree->rightChild = new _node; tree->rightChild->isRoot = false; tree->rightChild->start_box_index = tree->leftChild->end_box_index + 1; tree->rightChild->end_box_index = tree->end_box_index; tree->rightChild->leftChild = nullptr; tree->rightChild->rightChild = nullptr; tree->rightChild->bounding_box = FindBoundingBox(boundingBoxList, tree->rightChild->start_box_index, tree->rightChild->end_box_index); midpoint_split(tree->rightChild, boundingBoxList, numBoxesInList); } }
    14. You're talking about a non-uniform probability density function (PFD). Typically you'd want a Gaussian, sometimes called Normal, distribution (the classic single-humped camel graph) which can be generated using something the like Box-Muller algorithm. If you use the the right search terms you can find several libraries that will give you what you're looking for.
    15. DerTroll

      Check out our mall for our game, Wanted Alive!

      Looks great so far. Just one remark: Have you asked permission to use the name "LEGO" in your game? I don't know much about copyrights and trademarks, but I would make sure not getting sued by such a big company. Greetings
    16. Gnollrunner

      Storing full games on paper?

      I read the title and had a green and white computer paper flashback
    17. Ah ok, i get what you mean. Personally i have also used spheres / capsules for vehicle wheels or characters and queries mentioned above to find a set of triangles for penetration tests. Not easy to make robust, but worked for my simple needs. I agree raytracing won't work well if the terrains are not pretty flat. (I have no experience with ray traced collision detection using minkovski sums and could not help with this. Also i don't know if such approaches are used for concave stuff like terrain at all in practice... would be a topic for the physics experts here.)
    18. Because that's what OP said: And then the talk about recognizing the map and stuff. It should be pretty clear that it's not an AI for their game, but a "cheat/trainer/autoclicker" software for a third party game. Of course, image recognition is still the overkill approach, since the game can be played on a PC, reading of process memory should be the "easier less hard" approach. But still too complicated for someone who might not even be a programmer.
    19. So, I've recently updated the SharpDX libraries in my project (which I've barely worked on in the past years) from v2.6 to v4.2 It took a lot of code changes to get everything to compile again, but now it works. Except for keyboard input. Now, I haven't done any changes to code related to RawInput, but now I'm getting no responses to key presses anymore. If I set a breakpoint in the event handler responsible for reacting to keyboard input and sending it to the InputMapper (which is just another class that maps keys to game functions) void KeyboardInput(object sender, KeyboardInputEventArgs e) { if (e.Key == _lastKeys) { _lastKeys = Keys.None; return; } GameServices.GetService<InputState>().Mapper.InvokeAction(e.Key); _lastKeys = e.Key; } then e.Key is always Keys.None The event does actually fire when I press a key, so I know that it has detected something, but just no Keys. Mouse input works fine as before. Has anyone else run into this?
    20. blacephalon27

      Wizard Character Model

      Decent work though. Have you made any new progress with your skills?
    21. Not exactly. I know it's not stored as a hightmap ,but essentially right now it looks like height mapped terrain. Characters aren't single points. They should have some bounding volume associated with them. If you walk over a small crack in the terrain. You don't fall through it just like in real life. As another example, If you're walking along, your head may run into a overhanging branch. It shouldn't go though it. Also how do you intend to go up stairs? Most of the time some sort of bounding volume is used that can slide along the mesh. This can be a ellipsoid, multiple spheres or a pill. It can be other shapes too but these are commonly used because the calculation is easier. The only time I've seen casting a ray downward being used, is when you are only on an (essentially) hightmapped surface and you simply move your character forward and then set his feet at the new height. But this is pretty crude and not really suitable for most games. As for the BVH tree, that parts fine. You just need to use it the right way. You don't really need to cast a ray downward. You have the point where you are, and you have the point where you are tying to get to. That means you have a vector. You need to take that vector and go through your tree and see what triangles collide with it. When you find the nearest one you do collision response and generate a new movement vector. But again using a single point isn't realy going to work very well. You need some bounding volume around it if you intend to have any semblance of realism. You can of course use your method right now with the terrain you have if you just want to get something basic working. I'm just explaining there are some limitations with it.
    22. 1024

      5x3 Slot Game Logic

      I don't think anyone who is aiming for a specific RTP would do it this way. Instead, you would weigh your outcomes (if the player will win or not, and how much if they do) with regards to your RTP, and then use RNG to select the outcome. Then you make the reels stop in such a way to end up with the selected outcome. The rolling, stopping reels one by one, and even STOP buttons are all smoke and mirrors.
    23. a light breeze

      Storing full games on paper?

      Paper is a terrible medium for long-term storage. Which is why book preservation is focused on scanning books into computer systems. Only a tiny fraction of the books written before the invention of movable type have survived, and even later books have been lost forever. But the books on Project Gutenberg? They will probably outlive the human species.
    24. Dawoodoz

      Storing full games on paper?

      Pong would be easy, but Super Mario would be a heavy book of sprite sheets.
    25. Green_Baron

      Storing full games on paper?

      In case of ancient Egyptian we can do so because we had Greek and Roman translations. Maya hieroglyphs, though Spanish transcripts, interpretations, depictions and history are available, is another process and still a field of claims and counterclaims. It would be a guessing game to translate another writing without knowing the connotations and semantics that come with the symbols (though not impossible if the content is very simple, like cuneiforms). I personally doubt a few sheets of letter/A4 paper has sufficient information density to store a game so that some future AI can generate an executable program out of it. But its a nice play of the mind :-)
    26. Dawoodoz

      Storing full games on paper?

      I did that in the 1990s, so I know the pain. Higher languages change and dependencies go missing. The format needs to be minimalistic and stable against dialects by being expressive like a binary. Entering code would be automated by the camera once someone deciphered the document explaining how it works.
    27. No, it can not happen you have to check all triangles. There are usually 2 things that you do with a tree (BVH or octree does not matter): Raytracing: Usually you have a stack per ray, and you begin with putting the root node on the stack if it intersects the ray. Then, recursively pop a node from stack, test its child bounding boxes for ray intersection, and push them to the stack as well if they interect. So you process only the nodes if their boxes intersect the ray, and no matter what ray origin / direction, it will never be the whole scene (Assuming the scene has higher complexity than the image that justifies using a tree.) Neighbour search / box queries: Here you want to find all triangles/objects in a givien region, usually defined by a bounding box. Usuful for example for broadphase collision detection to find potential colliding pairs. You would make the query box from the object in question extruded by its velocity. Algorithm is the same, just replace ray-box intersection test with querybox-boundingbox overlap test. The stack finally contains all overlapping nodes from the tree, but again not the whole scene. Seems what you're missing is the recursive / subdividing / hierarchical nature of the process? You're right. Likely @Gnollrunner assumed your terrain would be just a height map? (No tree would be necessary in that case). Some details: Physics engine usually support hight maps as a special case. But still it is possible to put them in to a BVH like any other object. In raytracing it is common to sort the intersecting children by ray distance before putting tham on the stack, so closer intersections can be found first. This shortens the ray and will cull nodes behind that for a spped up. (It's also possible to RT without a stack using per node skip pointer which permits that option).
    28. Thanks, I've checked it and it works fine. But now I've got another question. The point is that I got pretty big map and it's got only one navigation volume. So is it ok to use runtime navmesh generation with one big navmesh volume or I should better divide it into smaller chunks?
    29. Dawoodoz

      Storing full games on paper?

      Sure, it might not be mainstream, but we can still decipher hieroglyphs using specialists. Only need one person per generation to write a decoder. Future civilizations will probably have a lot more advanced games, but eventually they will ask themselves how it all started.
    30. _WeirdCat_

      Linux sockets + http get request = no data

      I just read your code and compared it to mine: after.changing sockfd = socket(AF_INET, SOCK_STREAM, 0); to sockfd = socket(AF_INET, SOCK_STREAM, IPPROTO_TCP); Web page is being downloaded. Hopefully i won't run into any additional problems, thanks and cheers
    31. tayetex

      I can't find an artist, why?

      I have created a separate thread HERE with my answer to the post above.
    32. Allright, being an artist myself who has participated in several games (sometimes commisioned, sometimes for free because I liked the project), some basic guidance from my point of view (an artist's point of view) to hook a graphics pro for your game: 1.- Paid position: Basic rule: if you need a minimum quality for your illustrations/concepts/sprites/pixelart/voxels/UI/whatever, you have to pay for it. Artists that have spent more time painting than breathing are scarce and they are really demanded. But think of it: you are going to leverage their knowledge as they will know for sure what you need, what requirements they need to know, and reduce the time spent *A LOT* (If you talk about IK I'll know what it is. If you talk about MagicaVoxel flow I know what you mean. I will give your hints for your graphics flow based on my experience that you probably haven't thought of. I will know the differences of working with Unity or with Godot...) Also, the difference between an amateur and a pro is noticeable at first sight; so, if you have spent so much time on your game you cannot afford not spending money on art. If you are going to hire an artist, make very clear what you need: # of graphics needed Type and size of those graphics (it is not the same to create an illustration for the splash page than a 32x32 sprite). Deadlines Budget: how much you will pay for EACH concept, sprite, illustration, mesh... So # of graphics x prize of each piece = grand total of the contract. Anything out of scope will be charged, like new frames in animations, bigger sprites, etc. So you need to have a very clear vision of what you need to avoid overspending your budget. Description of the items: is there a design doc? how are you going to describe what you need to the artist? really detailed? just a brief indication for the artist to do his best? what type of game is it? what is the game about? in what era does it happen? what kind of environment are the characters facing? etc... Style: it helps A LOT being really clear of how do you want your graphics to look: realistic? Blizzard-like? manga? If you can provide examples of what you expect, the artist will appreciate that. Just a screenshot of Hearthstone for example and some indications: "I want this kind of illustrations but with less saturated colors" is enough. Approval flow: most of us have a fixed workflow that has to be followed in order to avoid misalignments and misunderstundings. For example, my steps are usually these: Requirements agreement (see the bullets above) Contract sign off Submission of 2-3 drafts for selection of 1 and approval (by mail) Submission of finished piece and approval (by mail). Payment of finished piece. I usually grant 2 amendings to the final piece. I.E.: I may correct the final piece following your instructions for a 1st time, and then for a 2nd after submitting the first modification. After that, I will charge you for further amendings. This is to avoid constant changes of mind in the customer (sometimes it happens that it is first approved and after some time another guy in the customer's team sees the illustration and wants to change X, and then another guy wants to change Y, and then...; also some customers don't want to say "it is ok" because they don't want to pay and it is a way to say it is finished, though they actually include the image in their game). 2.- Non paid position: As I mentioned, some times I work for free because I like the project. I say "for free" because promising money if the game makes revenues is like saying "for free". So, what do I check in order to at least take a look at your post or avoid it?: If you tell me you need "full commitment" (very usual to read), forget about counting on me: if I join your team it will be for fun, and my kids need to have lunch everyday so probably my full commitment is in a paid position right now, and I will do your tasks when I have some spare time AND I feel like it. This also means you cannot have tight deadlines. Milestones are for paid projects. Be VERY clear about what you expect and the style. The last free project I attended I told from the 1st moment that I had joined because I wanted to try a concrete illustration and sprites style, to learn and try it myself. They told me I was in, to later tell me they just needed a very simple graphic style that any amateur could achieve. Thus, it wasn't fun anymore for me, the reason I joined the project didn't exist any more, and I quitted. We both wasted our time because they just wanted a qualified artist and didn't take into consideration the reasons I told I was going to work for free. Be clear if you are going to give revenues if the game sees the light and makes money how much will the artist receive (% of sales or whatever) and how he may track those figures. Also how and when it will be paid and how the artist's name will appear in the game credits, etc. If you are well known in the games world, I will take a look to your post for sure. If Cliffsky ("Democracy" and "Production Line" games from Positech) writes me, I will attend promptly as I both love his games and know he is a real pro and a turstworthy person. Don't create a big hierarchy. If I am going to depend on another artist ("art director") which will also work for free and which knows less than me about art, just because he is your friend or joined earlier, it will discourage me. If you have a HUGE number of followers I might consider working on your project because of the exposure, but it is probably the least reason for me to join. Again, the bullets in the "Paid Position" apply, except the ones regarding the prices and probably the approval flow. 3.- How to keep an artist motivated in a project? So, you have your artist now and have started working jointly. Everything is smooth and you want to keep it that way, so following these basic rules will keep your artis in your team: Paid position: Pay promptly Follow the approval workflow Respect the contract regarding the exposure, credits in the game, etc... Non paid position: Answer mails, keep in touch, praise his work (yes, vanity is king among artists), expose him in your social media. Don't talk anymore about "my project". Now it has become "our project" as there is a guy spending part of his time for free on it. This is really irritating and I find it a lot among the youngsters who think they have a big idea. In a recent case I decided to leave a project I was liking (and with me the secondary artist and the sound guy) because the leader always emphasized that it was "his project" as if we were going to steal it or something like that. Obviously "his project" never was finished even though he had some talented artists with him working for free and the Unity development was completed. Do your work: make the game progress. If I notice you are lazy on it I will stop drawing as I won't feel motivated. How am I going to be passionate about your project if you are not? Keep the artist updated: let him test the game after each sprint, make him aware of the next steps. If there are any changes let him know as fast as possible. Don't waste his time.
    33. There is a root bounding box, in the image you see it as the navy blue box that surrounds the red bounding boxes (which are bounding boxes for individual triangles). But if the player is located only in the root bounding box and not in any of it's children bounding boxes (as Player Position is in the image), doesn't that mean I have to check every triangle in the terrain for collision? Also I'm using a binary tree, and I store triangles in every level of the tree. Also can you elaborate why this wouldn't work for things like houses and trees? I'm not using heightmaps, so I'd imagine the triangles of a house or a tree (if it's a part of the terrain) would just get mapped to the bvh tree like the rest of the terrain, or that wouldn't work for some reason? If not what would be a more wholesome approach that would work in every case?
    34. Panagiotis Kouvelis

      The One Sound All Games Need and How To Use It

      I agree on the user interface options, maybe if the developer has done a lot of work and the designer believes that muting the audio will significantly diminish the experience, a warning can be shown to the player when the mute sound button is pressed in the game's options. Something like: "Hey, the game is designed to be experienced with sound on, and you payed for that anyway, are you sure you like to mute it? Yes/No". 😁 for the psychoacoustic impact of this technique see my answer above with the vector/noise texture and virus/microscope examples. Also, if done correctly it can create great atmosphere for the players. Many developers put the sounds as-is in the game, they don't pre-mix the content because they lack the knowledge.Proper implementation includes a pre-implementation mixing stage, with some filters baked in the original sounds and the equivalent export from the audio editing application, to prepare them for a better fit within the game. You are talking about diegetic and non-diegetic sound and you are right. Sometimes it fits sometimes not, one should choose according to the design. A good practice is to follow the method you have chosen all the way through and not prime the player's ears for most of the game in one way and then change it to another. At least not without a reason. Changing from one method to the other is a great way to create uncanny atmospheres and ominous anticipation, or spoken dialog versus player character's inner-thoughts voice. Adding extra elements or common processing to different components of the sound, works like in visual effects compositing and CG, it's the glue component. Gluing elements together like that is a great practice and will help you create coherent results. Interesting that you mention the convolution here, I am in the process of gathering those and I think that I solved the problem of the big area impulse recording that happens due to large mass of air you have to move to excite the air to give enough reflections. More on that on a related post, I hope soon. 🙂
    35. Unfortunately you really don't have many options here when doing this on the GPU. There's 0 mechanisms for allocating more memory on the GPU timeline, that's something you can only do from the CPU. So if you really don't want to run out, you need to somehow get things back to the CPU (and perhaps gracefully handle things on the GPU until the CPU can get the results, allocate more memory, and then pass it on the GPU).
    36. Panagiotis Kouvelis

      The One Sound All Games Need and How To Use It

      Imagine that in graphics and the answer is easy. If I have a texture with beautiful ornaments made in a vector program, that is applied on top of a wall's 3D model and I apply a small percentage of noise upon the texture, will it be noticeable? For the players it will not be noticeable, but it will change the style enough to add to the overall realism. The player doesn't notice those things, she or he notice the end result, which includes those details. And those details are what make aesthetically pleasing games. Even in the minimal design trend of the hyper-casual games, those details are present and the minimalism is applied as simplicity of rules, not as absence of elements. The creator will notice them only with the combination of 2 things: Has the knowledge of what is missing and its role in the production. Has the equipment to translate it for observation. For us creators it's the science and engineering that drives our art and design processes. It's like a virus which is there and affects the end user, but for the engineer to see and analyse, without the proper microscope and training for what to look for, there is no virus there.
    37. Wanted to show off our mall scene in our game, Wanted Alive! If you're looking to find out more, join us on our discord! https://discord.gg/nf4mfs
    38. Presumably there is a root bounding box. If you are out of the tree you just start checking at the top. Also with a hierarchy not everything is supposed to be directly under the root. By your description it sounds like that's your issue. Your hierarchy should be several levels deep otherwise, what's the point. So as an example if you were using an octree, you have a root and that has 8 children. Then each child may have 8 children and so forth. There are some variations with this. Sometimes triangles are only stored in leaf nodes of the tree. In other implementations they are stored at all levels. I will also add, in the long run doing collision this way may be a dead end (depending on how for you want to go with it). First doing proper collision response might be tricky. Second, once you get things like trees and houses into your world which are no longer really height mapped, you're method won't be able to handle it.
    39. I'm trying to implement walking on a polygonal mesh terrain. I've chosen to use the ray-trace method (by shooting a ray from the player position downward until it hits a terrain triangle) to find out the height of the terrain at that point. I'm using BVH approach to segment the space around the level so that I only have to ray-trace a small number of triangles. However I'm having trouble conceptualizing the following scenario (see the image for an illustration). Lets say the player jumps up over the bounding volumes (or dives off a cliff or out of plane). If you look at Player Position 1 in the image I've attached, the player is located in the largest bounding volume of the word, meaning that I'd still have to iterate over every triangle in the world to find the position. Also if you look at Player Position 2, how would I even handle that? Since the player is completely outside of the terrain bounding box. I
    40. Gaius Baltar

      Ray-Sphere intersection explanation

      I found a great site that goes in-depth about how this method works: https://www.scratchapixel.com/lessons/3d-basic-rendering/minimal-ray-tracer-rendering-simple-shapes/ray-sphere-intersection Solved my problem.
    41. phil67rpg

      animating sprites

      well I have done this before, but it has been awhile since I have done this. I think that I can use the glTexcoord2i function, thanks for all the help.
    42. Hey there, I recently came across this: https://github.com/ssloy/tinyraytracer It's a raytracer implemented in a very minimal way. This person uses a method to find intersections between a ray and a sphere that I can't understand. His implementation is as follows: bool ray_intersect(const Vec3f &orig, const Vec3f &dir, float &t0) const { Vec3f L = center - orig; float tca = L*dir; float d2 = L*L - tca*tca; if (d2 > radius*radius) return false; float thc = sqrtf(radius*radius - d2); t0 = tca - thc; float t1 = tca + thc; if (t0 < 0) t0 = t1; if (t0 < 0) return false; return true; } This code confuses me, because I've always used the quadratic formula to get the discriminant of the ray-sphere function. It looks like he is doing the same thing, but perhaps using a different formula to begin with? If someone has the time I'd appreciate an explanation or a breakdown of this method.
    43. Yesterday
    44. markypooch

      animating sprites

      Hey Phil, How I've done it before is to divide the number of sprites in a column, and row by 1.0 y_stride = 1.0f / number_of_sprites_in_column x_stride = 1.0f / number_of_sprites_in_row And define a "step" rate for my animation, that is, how often should I increment the current animation U/V values by the aforementioned strides. With these u/v values, you can then plug them into your immediate mode code there with the spritesheet bound.
    45. Hodgman

      Storing full games on paper?

      Yeah for musical notation to be readable by a future civilization with no connection to our history, you'd have to also include documents on how to interpret that notion in the most basic possible form... maybe including physical tuning forks to illustrate the different notes, etc? When we sent music off into the eternal darkness, we used the oscillation of hydrogen as the clock reference and binary digits to encode timing values, assuming that anyone who finds it will know enough physics/math to enable space travel, and will have a chance of decoding the symbols:
    46. phil67rpg

      OpenGL animating sprites

      I finally got soil to load a png file. my next step is to animate a sprite using a sprite sheet I am unsure of how to start. here is my code. GLuint textureBrick[8]; GLuint loadTex(const char* texname) { /* load an image file directly as a new OpenGL texture */ GLuint texture = SOIL_load_OGL_texture ( texname, SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID, SOIL_FLAG_INVERT_Y ); return texture; } void init() { textureBrick[0] = loadTex("C:\\Users\\Owner\\Desktop\\img.png"); } void renderScene(void) { glClear(GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT); glPushMatrix(); glEnable(GL_TEXTURE_2D); glBindTexture(GL_TEXTURE_2D, textureBrick[0]); glBegin(GL_QUADS); glTexCoord2i(0, 0); glVertex2i(10, 10); glTexCoord2i(1, 0); glVertex2i(10, -10); glTexCoord2i(1, 1); glVertex2i(-10, -10); glTexCoord2i(0, 1); glVertex2i(-10, 10); glEnd(); glPopMatrix(); glutSwapBuffers(); glDisable(GL_TEXTURE_2D); }
    47. Prototype

      Storing full games on paper?

      You obviously haven't lived through the 80's and experienced the agony of typing 6 pages of code from a magazine that never worked.
    48. Not true at all. If you don't understand western musical notation you're not going to be able to read music written in it. Why are you asking any of this? If society reaches a point where video games only exist in dusty old tomes I think we have more pressing issues at hand.
    49. Yes, gethostbyname() should take the string "www.google.com" Separately, the Host: header does not include the protocol, but it (can) include the port number. Thus, the Host: header should be "www.google.com" or "www.google.com:80" not "http://www.google.com" I wrote a small library to do exactly what you want to do, and the last version update was 11 years ago. Time flies ... You may want to read the source code: http://www.enchantedage.com/http-get
    50. You can also just average a few random numbers between 0 and 1000. The more numbers you average, the more concentrated the distribution will be around 500. Play with it.
    51. Pepsidog

      How to change AI Navigation in game

      Realtime navmesh generation. You should probably check it out.
    52. Lucrecious

      Has C# replaced C++?

      Sorry, I didn't mean it to be offensive, it was just supposed to be a way to describe a view I felt was exactly what I said - simplistic. Even now you're asserting that enforcing virtual class methods is trivial when in reality that fact alone would make it easier to port from C++ to C# than from Java to C# (in fact, it's impossible to do a 1:1 port). And that's just one design difference. I mostly agree with what you've said. I wasn't trying to imply that you were being dishonest, I just personally thought your take didn't tell the full story. You're not lying, I didn't mean to imply that, sorry! For the record, I'm not much of a C# user, I just think it's designed a lot better than C++. I also feel that the hate for GC is mostly unfounded for most problems. [Redacted](using unsafe pointers is a pretty easy way to avoid the GC in C# btw) I fully agree about cutting edge 3D games - C# would be terrible for that, but that was also the exact problem I was talking about for C++. That being said, most of us aren't making cutting edge 3D games and that's why it's cool to use scripting languages or really any language you want.
    53. A musical score can be printed on paper, survive ransomware attacks, be understood by people in a distant future who doesn't speak the same language and be independent of the instrument that plays it. Computer software is however a lot more volatile when storage devices go out of fashion like floppy discs and cloud services get hacked. If someone would make a minimalistic hardware agnostic standard for describing classic computer games in paper format, what would be your preferences? Syntax: Using a high-level programming language would have all the issues of alternative interpretations, dialects and transpiling that comes with scripted languages. English keywords would be like writing in latin once the standard gets old, so I guess math is the language somehow. Storing byte-codes with scattered error correcting bit patterns would not be human readable, but to mystery games, that might be the point. File size: A tiny game could be read with a phone camera from a large book and played instantly, but a larger paper only used as a reliable backup could be scanned in a higher resolution and saved on the computer. Security: Would you trust a game that you downloaded from a physical book to not contain malware? The exploit would be very old compared to your anti-virus, but books in a library can be tampered with. Material: Would there be a point with only using cheap paper if it cannot withstand the inevitable era of nuclear winters? Would steel and wolfram-carbide printing plates be too expensive compared to opto laser crystal discs which store more data but are harder to decipher?
  • Advertisement

Important Information

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

GameDev.net 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!