Jump to content
  • Advertisement


  • Content Count

  • Joined

  • Last visited

Community Reputation

154 Neutral

About FippyDarkpaw

  • Rank
  1. Actually you can use the DirectX math lib for both: D3DXVECTOR3 works fine, as is, with OpenGL calls that accept array[3]. D3DXVECTOR3 v1(0.0f, 0.0f, 0.0f); D3DXVECTOR3 v2(1.0f, 1.0f, 1.0f); glBegin(GL_LINES); glVertex3fv(v1); glVertex3fv(v2); glEnd(); Not sure how/why, but D3DXVECTOR3 look exactly like float[3] when passed to OpenGL functions (same with D3DXVECTOR2, D3DXVECTOR4. etc.). Of course, that only works on a system with both DirextX and OpenGL installed, which makes a separate OpenGL renderer somewhat pointless. =)
  2. FippyDarkpaw

    seek and avoid jitter problem

    Yeah ample space would help. Also, in one game I worked on we solved a similar issue by giving each collidible object 2 collision radii - a hard collision radius and a soft collision radius. The hard collision radius is true collision. The soft collision radius is where any nearby objects would steer around. We were using a somewhat modified BOIDs algorithm.
  3. Quote:Original post by Thunder0ne I am trying both grid and octree using them in order to avoid all of the agents to check terrain proximity (the number of agent's neighbours is cut down just checking their relative squared distance) and I am not noticing differences in performance (I am measuring the whole AI update method which updates all of the agents AI). I was trying and use space partitioning also to find each agent neighbours but this was more expensive than just checking their squared distance as mentioned above. Hmm sounds like you are doing the grid partitioning scheme incorrectly. In a proper grid partitioning or spatial hashing scheme you need never do squared distance check to find neighbors. Neighbors are simply objects in the same grid cells or neighboring cells. So, finding neighbors within X grid squares is essentially O(1). Implemented correctly it should be incredibly faster than N^2 distance checks between all objects.
  4. FippyDarkpaw

    Spore NN?

    These games use NN controlled AI: - Creatures - Black_&_White - Colin_McRae_Rally_2 - NERO - Forza_Motorsport Source: http://wiki.aigamedev.com/FAQ/Which_Games_Use_Neural_Networks
  5. If your camera is looking down on a relatively 2D scene like an RTS, then a grid that breaks the scene into sectors is the way to go imho. You can optimize nearly everything with the grid. If you want to have 100s of units you will need to optimize them all: - culling: only draw objects in a grid radius around the camera - collision: only collide objects in the same grid squares - picking: find the picked sector, collide with objects in that sector - AI: define a sector radius for AI sensors, then only consider objects within that radius (this can be a huge bottleneck, possibly more so than collision) - sound: only play sounds within a certain sector radius of the player Not sure if you can do all that with a tree based solution, mainly due to grid having built in adjacency of sectors. Is it possible to tell if objects in different leaves of a tree are adjacent without actually computing distance?
  6. FippyDarkpaw

    Abusing vectors as arrays

    You don't have to manually track the number of objects in the vector. So you gained something.
  7. FippyDarkpaw

    Skydome very pixelated

    That's weird. I use 1024*1024 sky box textures (space nebulas actually) and they look great even at 1680*1050 resolution. In fact, they seem to look better at slightly lower texture resolution because it gives them a slight blur, as if very distant. Using XNA, default texture filtering, and additive blending. BTW, what exactly is sky box texture? As in, stars, clouds, whatever? I've found individual don't look good as a sky box texture (not sure if you are) and tend to look stretched and pixellated. Make stars a random mix of colored vertex points and either point sprites or billboarded star textures.
  8. I found it was pretty easy to make some nice and functional buttons in XNA. I made a simple button class with the following: - Button(): has parameters posX and posY (the center of the button on screen), scale (on hover the button gets slightly larger), LeftClickSound, RightClickSound, HoverSound, Delegate LeftClickAction, Delegate RightClickAction (delegates that fire when you click the button), and finally, a Texture. - Make some custom constructors such as Button(int x, int y, Delegate onLeftClick, Delegate onRightClick), which would give you a button at position X,Y that fires different functions depending on left or right click. You also need the following functions: - MouseIsOver(): check if mouse X,Y is within the button texture - IsRightClicked(): mouse is over and right button down - IsLeftClicked(): mouse is over and left button down - BeginHover(): this is true the first frame the mouse hovers over the button, to play the HoverSound - Update(): checks for the above items every frame - Draw(): render the button by position and texture. I use a simple Sprite Batch. I can post my functions if you like. Its mostly just mouse position comparison cases.
  9. Edit: oops misundertood the question
  10. FippyDarkpaw

    Dynamic difficulty discourages success

    Seems the majority of opinions are that scaling difficulty is bad. I agree. Oblivion's scaling was especially terrible. I was the "Arena Champion" at level 2. Fallout 3 is a bit better, but the game is way too easy still, even on hard. Difficulty sliders are still better than any scaling system. Mainly because everyone has the same experience which is a good thing. I can say "I beat God of War in God Mode" or "I beat 7 enemies in Gal Civ 2 on Max Difficulty" and everyone who has can acknowledge that those are are pretty tough. Diablo's Normal, Nightmare, and Hell modes were a nice way to do it as well. All games should offer optional ridiculously hard mode for those that would like to try it.
  11. FippyDarkpaw

    Where to play sound effects

    Personally, I call sound effects in the logic code for whatever event triggers the effect. For example, if you have a Gun which is fired in Gun.Fire(), then somewhere Gun.Fire() I'd call Audio.PlayWeaponFire(). Obviously it will be more complex than that, different sounds, or no sounds, would be triggered if the Gun cooldown is not complete, if it is out of ammo, if it is jammed, etc. Audio is definitely a unique architecture challenge because calls to it will be interspersed in a variety of completely un-related classes. Guns, doors, UI buttons, background music, triggered sound effects, local ambient noises, etc.
  12. FippyDarkpaw


    Get a CS degree. If the games thing doesn't work out, or you don't like it, you can go get a nicely paid business/gov't programming job.
  13. FippyDarkpaw

    Making Game Dev Tools - Need to Choose SDKs

    XNA is ideal to make tools. Check the XNA / WinForms tutorials. You can have any number of DirectX windows in windows app and WinForms is very easy to use. http://creators.xna.com/en-US/education/catalog/
  14. FippyDarkpaw

    Spatial Partitioning for Entities

    I've used spatial hashing in several projects nearly the way Nohup describes above. Except: - In one I used a C++ vector, not a linked list, in each grid square. - In another I used a standard C# array the size of the max number of objects. If you only have a few hundred objects it isn't much memory really. In both cases, all grid squares have an "object count" variable, so you never examine them if they are empty. I used the methods described in this paper: http://www.cs.ucf.edu/~hastings/papers/hashing-sim.zip The illustrations in the paper are decent, and will give you a good idea of how to apply grid-based spatial hashing. The simulation in the paper does object-object, object-terrain, frustum culling and a simple AI routine on 10,000 mobile objects at 60+ FPS on 4 year old hardware.
  15. FippyDarkpaw

    Sound in complex environments

    For both performance and realism I split my game levels into simple sectors, and sounds have a sector radius. Only players in a sector radius will hear the sound. Its faster than doing a distance check to every object for every sound. As for the rest of your question, altering sounds based on environment is pretty complex and game-dependent. A good starting place is zone-based sound settings. Most level editors like UT, HL, Quake, that split levels into zones allow you to alter sound settings in each zone. A good way to do underwater, outdoor echoes, tunnels, etc..
  • 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!