Jump to content

  • Log In with Google      Sign In   
  • Create Account

Awesome job so far everyone! Please give us your feedback on how our article efforts are going. We still need more finished articles for our May contest theme: Remake the Classics

SIC Games

Member Since 22 Jun 2012
Offline Last Active Oct 23 2012 09:18 PM
-----

Topics I've Started

Some WEB UI issues

21 October 2012 - 07:12 PM

It could just be me but perhaps; if anyone notice lately there has been issues. Regarding when i click on my username it suppose to pop up a little menu thing - but it doesn't work. On addition note, when I click on login \ sign in I am suppose to see a pop up login thing. I don't see it.

What is the basis of Scene or Resource Management?

05 October 2012 - 02:14 PM

Recently, I've been tearing my old framework apart - rebuilding a improved one. Instead of classes for meshes, lights, etc... I'm utilizing structs due to their public accessors. I came about thinking about types of mesh's to load in game. If I gather this right that mesh holds the vertex, normals, UV coords and any subset the mesh file has, bones, skin weights, blendshapes.

Am I on the right track thinking that a static mesh should only read everything but excluding the bones, skin and blendshapes; whereas animating meshes store the whole mesh data?

Would this seem right?

struct MeshStructureData {
Mesh's Vertices position, normals, uvs, etc...
};

struct MeshBase {
...
neccessary functions to initialize buffers (vertex and indices).
function to apply material.
function to detect collision.
function to render out buffers.
};

struct StaticMesh : public MeshBase {
function to load mesh file and store necessary information.
};


The meshbase is the interface object. So, does this seem like the correct assumption how loading various of different types of meshes are? As of Static Mesh, Fracture Mesh, Physic Meshes, Foliage Meshes, Actor Meshes or what not?

Thanks for taking the time out and reading this thread!

Help on Picking Ray to Triangle \ Intersection

22 September 2012 - 02:46 PM

Before anyone read this - just be sure to note that I'm using DX11 and never will use DX10 or 9. So, D3DXIntersect is not an option. Another note is that I'm very poor in math.

Anyways; In the editor I noticed when I move the mouse over the mesh the cursor sets to cross. This is good, however - calculation is totally wrong and off path. I believe I successfully Unprojected the 2D Mouse Coordiants to 3D World Space. This is what I did:


GetCursorPos(&MousePos);

ScreenToClient(DXWindow,&MousePos);

GetWindowRect(DXWindow,&DXWindowSize);
const XMVECTOR RayOrigion = camera.CameraPosition;
XMVECTOR Mouse2DSpace = XMVectorSet(MousePos.x,MousePos.y,0.0f,0.0f);
XMVECTOR Mouse3DSpace = XMVector3Unproject(Mouse2DSpace,0,0,m_screenWidth,m_screenHeight,0.0f,1.0f,camera.CameraProjectionMatrix,camera.CameraViewMatrix,XMMatrixIdentity());
RayDirection = Mouse3DSpace - RayOrigion;
RayDirection = XMVector3Normalize(RayDirection);
RayDirection = RayDirection * 100.0f;

XMVECTOR vEye;

XMVECTOR vDir;

XMStoreFloat3((XMFLOAT3*)&vEye,RayOrigion);

XMStoreFloat3((XMFLOAT3*)&vDir,RayDirection);

XMStoreFloat3(&MouseFloat3,RayDirection);


I stored the vectors into float3 because I can actually see what is going on. Onward the managed side, if the mouse moves inside the DX Window inside the editor; it goes back and calculates the intesection of Mouse point and Mesh Verticies.

I am having difficult time with finding p0, p1, p2 then finding center point of the triangle.

bool computeIntersection(XMFLOAT3 &p, XMFLOAT3 &target) {
        bool result;
        result = false;

        float iX = (target.x );
        float iY = (target.y );
        float iZ = (target.z );
       
        float iX1 = (target.x);
        float iY1 = (target.y);
        float iZ1 = (target.z);
        t = XMFLOAT3((iX - p.x) + (iX1 - p.x),(iY - p.y) + (iY - p.y), 1.0f);


       
       
       
        if(p.x > iX && p.y > iY) {
            result = true;

        }

       
       
        return result;

    }

 


Thanks for the help.

What improves better memory performance?

06 September 2012 - 10:26 AM

What imrpoves performance in memory management? By using the keyword New or malloc? What if one allocated memory doesn't get deleted - will it literally screw the memory leaving it too fragmented or after the computer restart the memory will automatically free anything it has resides?

New and Malloc are termed as Heap, right? Stack Heap, Pool Heap - etc?

Have a great day everyone! I wanted to know about your perspective on better performance in memory.

Game Scripting question

02 September 2012 - 07:08 PM

I'm a bit hazy on the thought of Game Scripting. Currently, I'm reading Game Engine Architect ebook and trying to put the pieces together. When I looked at Unreal Script that is Object Orientated Programming - like how does it get implemended in the game or engine. In unreal script, I can make sense that it defines the player, weapons, ammo, etc.. by properties and how it should be handled logical in game. If I was going to make a script language - how would it get translated from script to usuable game code in C++.

Just wondering.

Thanks.

PARTNERS