Jump to content

  • Log In with Google      Sign In   
  • Create Account


Madhed

Member Since 13 Jun 2001
Online Last Active Today, 04:19 AM
*****

#5036506 Why do it the easy way?

Posted by Madhed on 25 February 2013 - 05:09 PM

Something I found in our javascript codebase

 

{
    //...
    isActive: function(active) {
        return (active ? true : false);
    }
    //...
}

 




#5032650 Official GameDev.net App

Posted by Madhed on 15 February 2013 - 08:40 AM

There is actually an ios app for the forum software gamedev uses. I didn't try it however since it cost a little bit.




#5030534 What's the proper name for this class?

Posted by Madhed on 09 February 2013 - 05:41 PM

Smells pretty anti SRP to me...

 

anyway, from the methods shown, DBContext, DBConnection, or just Database?




#5027657 Feedback on hard rock sample

Posted by Madhed on 31 January 2013 - 04:57 PM

I think the composition sounds too "melancholic" right now. You say he markets energy drinks and extreme sports, something slighty uplifting, powerful, in-your-face would fit better. Also the mixing and tone of the different tracks is not optimal it all sounds very muddy.

 

Did you record guitar and bass directly to interface or with a microphone? I'd suggest to bypass the amp completely - at least for now - and just plug it straight into the interface and use a software solution instead. You will get a much more defined sound that way.

 

http://www.simulanalog.org/  This is a collection of very good freeware amp and distortion simulations (VST)

 

Another thing is doubling. You seem to have everything in the center. http://homerecording.about.com/od/mixingyourmusic/g/How-To-Double-Guitar-Tracks-During-Recording.htm

 

Sorry if that sounded too hard. Anyway these are my 2 cents




#5024825 Rights to a song?

Posted by Madhed on 23 January 2013 - 01:38 PM

Contact the copyright holder of the song.




#5020479 Projectile Movement C++

Posted by Madhed on 11 January 2013 - 03:58 PM

@Madhed: You are not really helping...

 

Why is that so? Tell me why it wasn't helpful and I might give it another try.




#5018808 How to draw a weapon in a fps

Posted by Madhed on 07 January 2013 - 05:43 PM

You don't need to translate to the player position. Use a special camera that is located at the origin and draw the 1st person model there too.

Most games also clear the z buffer before drawing the hand model and set the projection matrix near/far values very close to the camera to get more precision and prevent the gun from sticking into walls and objects.

You can even experiment with the projection's fov, sometimes it looks good to choose a different fov for the 1st person model.




#5018800 Good sound recorder? Anyone have a Zoom H1?

Posted by Madhed on 07 January 2013 - 05:17 PM

Why not hold it in your hand? How would you suggest using it?

I had some problems where the H1 would record a lot of low frequency rumble when moving, even though I tried to hold my hand perfectly still. In hindsight that may have been the "sock contraption" scraping against the microphone cage though.

I'll see if I can upload the recorded sounds to dropbox or something.

EDIT: Unfortunately I don't seem to have the raw sources on this computer. Most samples are edited in some way. Ambience and waterfall have layered noise.

 

EDIT2: I'm not sure if I am supposed to upload these. unsure.png




#5017814 One vertex buffer, multiple vertex shaders

Posted by Madhed on 05 January 2013 - 11:56 AM

Okay, so I've finally started switching from D3D9 to D3D11.

One thing that confuses me is ID3D11Device::CreateInputLayout().

 

I have to supply my input element definition, so far so good. But it also requires the compiled vertex shader code.

What if I want to draw a mesh with different vertex shaders? Will I have to create a different input layout for each combination or can I just use one for every shader?




#5015276 How to check if dynamic memory is there before deleting?

Posted by Madhed on 28 December 2012 - 08:17 PM

In c++ you can not test if a raw pointer actually points to allocated memory. You have to keep track of that yourself. I guess the problem you were experiencing was double-deleting memory. One solution is to set the pointer to null immediately after deleting it, if you plan on reusing it later.

 

However, you should also look into the standard library containers and smart pointers. (std::vector, std::list, std::shared_ptr, std::weak_ptr, etc.) They are the basics of modern, idiomatic c++ and in many cases eliminate the need to manually manage your memory.




#5013527 Alternatives to a scene graph?

Posted by Madhed on 22 December 2012 - 05:48 PM

You just reference it from the mesh:

(This is all just pseudocode, not actual c++)

 

class SceneNode {
    Matrix transform;
    SceneNode parent;
};
 
class MeshDrawable {
    SceneNode transform;
    MeshData mesh; //The actual mesh data
}




#5003445 Whats a reasonable timestep

Posted by Madhed on 23 November 2012 - 05:13 AM

Logically I would assume that it is more likely that it will take longer than 1/120th of second to compute 1/120th of simulation time than it would be to compute 1/60th in under 1/60th of a second. Then why am I observing a more responsive simulation virtually free of stutter? What do most people use as their timestep?


It's not really clear from your description what kind of stutter there was before. How many frames per second are you rendering? If your physics update rate is less than your rendering rate there will be some stutter unless you employ interpolation to hide the discrete physics updates. Which will introduce some latency itself.

As for what most people use as their timestep: It really depends. If you have a really simple simulation with slow moving, big objects you can get away with a much bigger timestep than you would use for complex simulations involving stiff springs, like in a car suspension for example.


#5003229 What would you want from a zombie apocalypse simulator.

Posted by Madhed on 22 November 2012 - 07:15 AM

^This^

What I really hated about DayZ apart from the bugs was the zombie behaviour. Those spatic, zig-zagging, hawk-eyed sprinters... really killed it for me.
I'd like to see some more complex behaviour. Different types of zombies, with fast and aware types being the exception.
"I am legend" types would be pretty cool, you know, thoses that only come out in the dark.

Some kind of alliance system with base building, safe-zones, pvp.


#5002455 Float Precision Issue?

Posted by Madhed on 19 November 2012 - 03:49 PM

Honestly, to me it sounds like you are overanalyzing the "problem". I never encountered anything along those lines that was really noticeable and without seeing this myself I can't imagine what the problem actually looks like. Are you sure the wrong motion isn't caused by something else?


#5001567 what would be the proper oop way to do this?

Posted by Madhed on 16 November 2012 - 10:18 AM

I usually tend to design more in terms of state and transformations.
Think about what structure can represent each valid configuration of your game unambiguously. Then think about which are valid transformations on that data and which actor has the authority to do these.

This should lead to a nice code structure will well defined operations where classes control the integrity of the game state.

EDIT: I realized this sounds pretty vague. Maybe it is because that's the way one should design regardless of language. I guess the TL;DR version would be: Don't think of OOP as a philosophy that forces you to program a certain way. Rather, think of it as a tool set that enables you to more efficiently implement a sensible design.




PARTNERS