Jump to content

  • Log In with Google      Sign In   
  • Create Account


Member Since 14 May 2008
Offline Last Active Jul 01 2011 07:06 PM

Topics I've Started

GLSL gl_FragDepth and glPolygonOffset

11 April 2011 - 05:54 AM


I have a black and white texture that represents the captured depth.
What I want in my program is to draw geometry occluded by that texture (texture is always aligned with screen). Sort of simulate what glpolygonoffset would do but at a per-pixel level and the offset depends on the texture.

the simple way would be to draw the z coordinate of the pixel to the depth buffer and add the r component of the fragment like this:


But frag depth is in range from 0 to 1, but dividing the texColor.r by the( far plane - near plane) but that doesn't work either.

So, here I ask you: How do I simulate the glPolygonOffset in the fragment shader?

Please help me chose Physics and collision engine

22 February 2011 - 11:17 AM


Before all I'll state some info:
-I made a 2d game engine complete with physics, graphics, entity system, sounds etc before.
-I want to expand and move onto the 3D world
-Contrary to the last engine I want to use third party libs to help me.

I've decided on Horde3D for graphics, Fmod for Sound, custom model and map format.
Right now I want to chose a physics and collision engine.

Here's what I want from it:

  • C++
  • 3D
  • Pretty optimized (my game won't be very physics heavy but the faster the better)
  • Great handling of collisions (things can't fall though floor nor sink into it like it often happens in ODE)
  • It must let me cast rays, polygons, check if a box at a given place would collide and other such things (I'd use this for AI and other such things).
  • it must be able to use convex meshes for collision check.
  • physics-wise it should either enable concave meshes or let one object be made out of several convex ones.
  • I can use it without paying royalties or having to release the source code to my program.
  • not a complete pain to use.
  • should be able to handle physics by its own but also allow me to step in when I need it.
What I want to accomplish in my game:
  • physically reactive animated ragdolls for characters (see one of the Overgrowth fighting videos, you notice they go limp from hits but quickly resume their stance)
  • physics based AI
  • semi-physics based movement (eg: if the player is controling a bird I want it to fly realistically, unlike WoW where it can just stop in mid air)
  • buoyancy
  • being able to destroy houses/towers or other constructions made from preset destructibe geometry pieces.
As you can see my biggest focus is on characters and the amount of control I can have over the behavior of each individual part, I don't know the favs and cons of the existing engines which is why I'm asking you for help. So far I've only tried ODE (since yesterday) and I've seen that it's not the best collision handling engine (things like to sink into each other a bit ). I saw somewhere that it can be used with SOLID to do the collision detection and solution, but I still haven't seen SOLID's features.

So, I'm asking you for your input, which engine do you use or used in the past, which do you think is the best , what are its shortcomings, what are its strengths ,how it compares to others, etc.
I'd also love if someone explained to me how are such libraries integrated into the game engine itself. I did a 2d polygon based collision system for my last engine but it was pretty much well integrated into the entity system from the start so I didn't learn much about adding a 3rd party one.

Also if any of you could point me to open source 3d games that use the physics engines so I could learn from them I would be grateful.

Tl;dr version:
I need a good physics and collision engine, help me chose!.

Software/Methods that make your life easier

08 October 2010 - 01:46 PM

As I'm about to start a game engine for the umpteenth time I decided to use whatever tools I have at my disposal to make it easier.
Lately for small projects (a week or two) I've used SVN for versioning and keeping track of the updates. I've also tried UML in the past but that turned out to be more hassle than simply writing stuff my way (writing things my way on the paper meant it was easy, fast but horribly messy and disorganized so I might get back to it if I find programs that make easy to use and more of an asset than inconvenience).

What I wanted to as of you is what programs/methodologies do you use to help you make your projects. I'm especially interested in areas like Organization of elements, descriptions of how everything works, TODO software and bug trackers.
Since I'm still studying my budget is rather low so free software/software with free versions are a lot of help.

Also I would ask of you if any of you knows a program that helps you design the project, with various views on it (for example, you it lets you see how every big part is connected to others, with a general description of what each part does, but in another view/zoom level it shows you which function names it has). Such a program would be a huge help when beginning a project, and would help you keep track of how far you've gone.

Huge Thanks in advance:

Creating an Editor

15 September 2010 - 06:47 PM

I'm currently starting to work on an editor for my game models and animations. Since they are 2D I can't really use any outside software. At least I don't know of any.

The editor should be able to acreate simple models by the edition of 2D polys, then add a skeleton to it, skin it, add one or more collision polys and finally animate it.

My game engine (built from scratch) is in it's final tweaks and already supports all of this. It's a pretty big project that's already been going on for almost three years.

My problem is with how do I design the editor? How do I manage the states or how do I integrate all of this together? I haven't done anything of this scale/type yet so I don't know where to start.

I've already started working on the basics. I've quite a bit of practice with wxWidgets GUI, and made some smaller programs like a mp3 player or a photo organizer (which turned out to be quite useful btw), I even made a very simple map editor where you could place;transform,copy/paste,undo/redo. But those are only stepping stones and now I need to jump a big gap.

Basically I'm asking for references to any tutorials, videos or talks on creating editors, be it map editor, model editor, anything that's got a lot of integrated parts/states that have to work together, prefarably talking on making it from start to finish independently of the language. My searches so far only yelded mediocre results, most of them being how to use such editors to create something rather than building the editor myself.

All of your input is hugely appreciated.

Animation Keyframe Timing

17 June 2010 - 06:42 AM

I hit a little curiosity making my 2D animation system.
Basically I want to know what's the industry standard way of dealing with timing of keyframes, should all frames be a keyframe so in a 10frames per second I would have 10 keyframes for each bone in the body(or at least the selected parts of the body) or is it better if the animation itself has irregularly spaced keyframes, thus saving space when less are necessary and having more precision in more complicated animations?
(please note that in both cases I would use linear interpolation between the keyframes).

Thanks for your help in advance