Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

3266 Excellent


About Capoeirista

  • Rank

Personal Information

  • Role
  • Interests

Recent Profile Visitors

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

  1. Capoeirista

    Grouping NPCs

    Hey feorang, Yeah that sounds like a reasonable approach, unfortunately I have zero control over the actual spawning of the NPCs. I have to execute a search around a particular position with a given radius, and operate on the returned array of NPCs. At least I can specify a max count to return though Cheers!
  2. Capoeirista

    Grouping NPCs

    Hey haegarr, Kylotan, Thanks for the responses - and apologies for the late reply, been out of town for the last week. I'll have a maximum of around 50 NPCs to sort in to groups for any given frame, so I will probably have to do most of the processing in separate thread. This shouldn't pose too much of a problem though; the results of the clustering don't have to be precises and individual NPCs swapping from cluster to cluster will have a negligible effect. This system is going to be driving audio events so there are plenty of things I can do to mask any small changes in the data being generated. I'm not sure I can use a hierarchical clustering algorithm in this case, as the distance between each NPC from other NPCs in a given cluster is more important to the grouping than the distance from the player... I'm doing a simple radius-around-the player check to find any NPCs within range, and then grouping those NPCs in to clusters based on their proximity to each other. The clustering is definitely a dynamic process. Thanks for the advice!
  3. Hey folks, I'm about to start work on a system that involves grouping NPCs located within a certain distance from the player in to cells; eventually each cell may exhibit different behaviors based on the 'mood' of the contained NPCs, although the NPCs themselves will have control over their own position & orientation (so no flocking). Before I begin work on this system I wanted to reach out and see if there are any algorithms that I should check out with regard to creating the NPC cells. At the moment my plan is pick a random NPC from a list of those around the player, and search within a small radius (from the chosen NPC) to find other nearby NPCs and create a cell. For each NPC added to a cell I repeat this radius check until there are no more valid NPCs for the current cell. Then repeat the cell creation process for any remaining NPCs in my list of those around the player: Example! So is that a reasonable approach to take? Thanks for the advice!
  4. These days you're probably better off using nullptr instead of 0... but essentially, yes Asserts allow a programmer to raise an error if continued execution of the code will result in a crash. http://www.cplusplus.com/reference/cassert/assert/ In your case you have a couple of options. If you want the code to continue executing and just spit out an error message, at the start of your function use an if statement (as in your last post) to check if your soundPointer is null and output an error (then return from the function). If your soundPointer being null is going to a cause catastrophic failure in your game, you can use an assert. There's a lot of debate about how and when asserts should be used, but I don't want to get all philosophical
  5. You should be able to set break points in your own code, even if you don't have fmod.pdb - assuming your project is set up to generate debug information. You'll have to try and catch this crash in your own code - it sounds the code is running through a couple of FMOD function calls before it hits something that actually makes it crash (accessing an invalid memory address)... which is why you're not seeing anything in the callstack. Try putting in nullptr checks in your function that's trying to modify the volume, and assert if your sound object isn't valid.
  6. Capoeirista

    Why unresolved externals? (C++)

    Hah ha, no trouble
  7. Capoeirista

    Why unresolved externals? (C++)

    Are you linking to the XInput lib in your release build?
  8. Capoeirista

    Nobody Wants A Cybergod?

    I doubt that anyone on this forum doesn't understand the significance of the idea but that's all it is at the moment, an idea. All we have is your word that Rube is an actual 'thing'. People tend not to care about other peoples ideas; everyone has ideas. If you want help building it though this is the place; gamedev.net is an exceptional helpful community. Demonstrate what it is Rube can do, show us why we should care.
  9. Capoeirista

    [Solved] OpenGl Shader Output

    Oh damn, thanks for that! I assumed that OpenGL would map the 'out' variable from the vertex shader to the 'in' variable of the fragment shader - assuming the types matched; had no idea the actual variable names had to be the same. Thank you, this was driving me a bit insane!
  10. Capoeirista

    [Solved] OpenGl Shader Output

    I had a quick look at the fragment shader using NSight, and while the vertex shader looks like it has valid input parameters, I couldn't see anything relating to color in the fragment shader. I've attached a couple of screen-caps from NSight.
  11. Hey folks, Seeing some odd behaviour with a very simple OpenGL shader I'm trying to get working. Here's the vertex shader: #version 400 //////////////////// // Input Variables //////////////////// in vec3 inputPosition; in vec3 inputColor; //////////////////// // Output Variables //////////////////// out vec3 outputColor; //////////////////// // Uniform Variables //////////////////// uniform mat4 worldMatrix; uniform mat4 viewMatrix; uniform mat4 projectionMatrix; //////////////////// // Vertex Shader //////////////////// void main( void ) { // calculate the position of the vertex using world/view/projection matrices gl_Position = worldMatrix * vec4( inputPosition, 1.0f ); gl_Position = viewMatrix * gl_Position; gl_Position = projectionMatrix * gl_Position; // store the input colour for the fragment shader outputColor = vec3( 1.0f, 1.0f, 1.0f );//inputColor; } And this is the fragment shader: #version 400 //////////////////// // Input Variables //////////////////// in vec3 inputColor; //////////////////// // Output Variables //////////////////// out vec4 outputColor; //////////////////// // Fragment Shader //////////////////// void main( void ) { outputColor = vec4( inputColor, 1.0f );//vec4( 1.0f, 1.0f, 1.0f, 1.0f); } If I try and use the 'inputColor' in the fragment shader everything is just rendered black... however if I explicitly set the colour (in the commented out code) everything renders correctly... so there's a breakdown in communication between my vertex and fragment shaders. Is there anything obvious I'm missing in the shader code? I'm not seeing any compilation warnings from the C++ code side of things, and all of the world/view/projection matrices are being passed in correctly. Thanks!
  12. Capoeirista

    Audio Integration into games?

    Audiokinetic have some great, free Wwise tutorials available online (you only have to pay if you want the certificate), you can check them out here. It's definitely worth running through them - as a sound designer the more you know about Wwise the better. You won't have to touch any code, but you'll need to understand how audio works in games.
  13. Capoeirista

    Interior Volume Detection

    Haven't figured out exactly how recast works yet, but it can output voxels for walkable surfaces it detects. The code is reasonably well documented too. I was half thinking I could grab it's interior edge detection algorithm to walk around the interiors of the geometry I'm looking at... then just extend the resulting mesh to the desired height. It's an impressive piece of tech; very quick generation and handles things like stairs without any trouble. https://github.com/recastnavigation/recastnavigation
  14. Capoeirista

    Interior Volume Detection

    Hey JoeJ, Thanks for the awesome response The purpose of this is to automate the placement of sound occlusion volumes in the world, so a completely robust solution isn't necessary. I'm just trying to cut down the manual, repetitive work that sound designers have to do in our level editor. Performance isn't really an issue since this is all going to be done in an offline process, and while the voxel solution is working well so far it is by no means complete... just trying to cover all of my bases here I haven't tried Simplygon, but I have been looking at Recast - an open source navmesh generation system. It seems to do a really good job mapping out mesh interiors.
  15. Capoeirista

    Interior Volume Detection

    Sounds like you want something like a low poly occlusion mesh? Simplygon can generate this, but i have not tried yet: https://simplygon.com/#get Your algorithm may work depending on your needs and inputs. Other ideas: * Voxelization + flood filling * BSP tree for exact solution Hey JoeJ I've been having a play with a couple of the ideas you suggested, and while the voxel flood fill seems to work quite well (although expensive) I'm not sure how to go about evaluating space with a BSP tree. I've been able to build a BSP tree of course, but I don't see how to extract the spatial information from it since it only really storing the relationship between individual polygons... if that makes sense I've read that you can represent the empty space using something called a solid-leaf BSP tree, but can't find any descriptions of the algorithm, just that it exists. Cheers!
  • 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!