Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!


BlackJoker

Member Since 28 Feb 2013
Offline Last Active Today, 01:54 PM

Posts I've Made

In Topic: Game Entity object graph serialization

15 December 2014 - 02:09 AM

Solve solution with protobuf-net. Fortunately, this serializer solve my issue.


In Topic: Game Entity object graph serialization

12 December 2014 - 02:30 AM

I faced with the issue that standsrd binary serializer is not present in WinRT and other libraries could not resolve circular references or just have no options to customize serialization/deserialization

Json.Net appears to have some issues when deserializing big files.

I hope to find some customizable lib which could serialize object graphs to/from XML, but witout need to set attributes to each class/member/propery, which is very tediously specially when number of classes increasing.

I found YAXlib, but seems it cannot deal with object graphs, which is very sad.

Does someone know good xml serialization lib for my purposes, which can deal with Dictionary<,> in addition to object graphs?


In Topic: Corrupting of the view if far from world center

14 November 2014 - 06:31 AM

Thanks to all.

I guess that I will stop at keep camera in center suggestion. This seems to be the easiest and cleanest way to workaround such issues.


In Topic: Corrupting of the view if far from world center

13 November 2014 - 11:57 PM

My vertex shader code is:

struct VertexInputType
{
    float4 position : SV_POSITION;
	float3 normal : NORMAL;
	float2 tex : TEXCOORD0;
	
};

struct PixelInputType
{
    float4 position : SV_POSITION;
 	float3 normal : NORMAL;
	float2 tex : TEXCOORD0;
	float3 viewDirection: TEXCOORD1;
};


////////////////////////////////////////////////////////////////////////////////
// Vertex Shader
////////////////////////////////////////////////////////////////////////////////
PixelInputType LightVertexShader(VertexInputType input)
{
    PixelInputType output;
	
	// Change the position vector to be 4 units for proper matrix calculations.
    input.position.w = 1.0f;
	// Calculate the position of the vertex against the world, view, and projection matrices.
    output.position = mul(input.position, worldMatrix);
    output.position = mul(output.position, viewMatrix); 
    output.position = mul(output.position, projectionMatrix); 
	
	output.position.z = log(zNear*output.position.z + 1) / log(zNear*zFar + 1) * output.position.w;

	// Store the texture coordinates for the pixel shader.
	output.tex = input.tex;
    
	// Calculate the normal vector against the world matrix only.
	  
	output.normal = mul(input.normal, (float3x3)worldMatrix);
	// Normalize the normal vector.
    output.normal = normalize(output.normal);

	float4 posWorld = mul(input.position, worldMatrix);
	output.viewDirection = float4(cameraPosition,0) - posWorld;
    

    return output;
}

In Topic: Corrupting of the view if far from world center

13 November 2014 - 05:17 PM

How to use doubles to get more precesion? Could you write about this more detail?

 

How translating the whole world to fixed distance could cause bugs? Dos it not the same as moving the whole world?

 

BTW, I susprect, that game logic gets more complicated if I need to move the whole world with many objects instead of one camera. What if I want to move not only camera. but also binded object? I need to move everything except 1 model and camera? Did I undertand you correctly?


PARTNERS