-
Client prediction in fps
In typical fps games how do they determine how far back to rewind when the server sends the authoritative game state.
Consider the following example where one way try takes 100 ms. At time T the client sends jump to the server. This arrives at time T+100. The server sends back gamestate with the jump processed and this arrives at the client at time T+200.
It would seem the simplest thing for the client to do at time T+200 after receiving the gamestate is to effectively take this gamestate as what should have been the gamestate at time T for client. Thus the client should take this gamestate and simulate from T to T+200 with its buffered input of T to T+200 and use this for the predicted state. However, this in effect would seem to give a prediction of what the server's gamestate will be at time...
-
What's the best C#(XNA) book/site
I just know a bit of Python and Java (but not game programming), I'm preferring to start game programming using C# to be able to use the XNA.. So I had a few questions..
1. What's the best book/site for first-users?
2. (dumb question) Can C# be used to develop iOS/android games?
EDIT: thinking about this
http://www.gamedev.net/page/books/index.html/_/technical/directx-8/xna-40-game-development-by-example-beginners-guide-r1433
but will wait for suggestions if any...
-
Client-server lockstepp for rts
In the article
http://gafferongames.com/networking-for-game-programmers/what-every-programmer-needs-to-know-about-game-networking/
there was the following comment which i could not understand:
"btw afaik StarCraft don’t use peer-to-peer it uses client-server model with lockstep (at least warcraft 3 does so). It has the advantage what theoreticaly laggers will not affect gameplay/response latency at all (but to not let them fall behind server do timeouts so the lagger can catch up, also doing temporary local game speed increasing) and imo it’s the only and true way to do sync in RTS like games. (and for some reasons this technic isn’t good covered in the web) most articles are about FPS or peer-to-peer syncs"
Does anyone understand what is meant by client-server model with lockstep and how that allows laggers to not affect response latency? It would seem to me that the lagger would effect response latency as isn't the effect of...
-
Blurry Texture
Hello!
In my DirectX 9 application I want to render an UI button per textured quad. So I created a button texture of size 250x40 that looks like this:

I load the texture with this D3DX function:
HRESULT hr = D3DXCreateTextureFromFileEx(mRenderSystem->getDevice(),
"NewGameTex.png",
250, 40,
D3DX_DEFAULT, // Mip levels
0, // Usage
D3DFMT_UNKNOWN, // Format
D3DPOOL_MANAGED, // Pool
D3DX_DEFAULT, D3DX_DEFAULT, // Filter, Mip filter
0, NULL, NULL,
&mD3D9Texture);
I load the texture with its original size and create 8 mip maps (even though I do not use mip mapping).
Then I create a quad consisting of 4 vertices. I define the coordinates of the 4...
-
Where to start to program a game
Hello, first post here.
Let me introduce myself, I'm a 15 years old teen who lives in Italy and has the ambition to make a game.
Now, i know that i need to use a programming language, but I'm not sure at all which one. I've had some experience with Squirrel and Pawn mainly in scripting for SA-MP and IV-MP, from which i believe i learned a lot. I developed a few complex functions and also made a small programme that would tell me the number of multiplies needed to reach a certain number with exponential growth ran by the server, but that was pretty easy.
In any case, that was about 2 years ago but now I'd like to start programming again, I've already got a few ideas for games but I simply don't know where to start. My objective is a common 3D computer game, maybe...
-
Cos is not returning 0 for 90 degrees or PI/2
Vector2 Rotate( Vector2 &vec,float Angle )
{
/*
cos -sin
sin cos
*/
// When the Angle is PI/2 (90 degrees), it doesn't return 0, we get 4.37114e-008
float Cos = cos(Angle);
float Sin = sin(Angle);
Vector2 rot = Vector2( Cos*vec.x - Sin*vec.y , Sin*vec.x + Cos*vec.y );
return rot;
}
// If i pass this vector
Vector2 vec = Vector2(0,1);
vec = Rotate(vec,PI*.5f);
// The answer should be '(1,0)'
// But i ACTUALLY get '(-1,-4.37114e-008)'....
/* Anyone know what's going on here, is sin and cos incapable of returning 0? */
-
hlsl texture Sample result?
i have a texture with a DXGI_FORMAT_A8_UNORM format. in hlsl:
float4 color = tex.Sample(sample_state, Texcoord.xy);
then i got the color with a correct alpha channel result and the each r/g/b channel result of 0.
is there any way to get other specified rgb result, when the texture's DXGI_FORMAT has no rgb channel component? thx
-
A question about file size
About how big is a 1 second audio file, if compressed and low quality. How small could I make that file? How big of a file is a set of alpha numeric characters of say, 20 characters?
-
CIE Color Space Conundrum
I have some questions regarding some confusion about color spaces, and since it is fairly graphics related, I was hopping somebody here could help me understand.
The first thing that I'm confused with is how ambiguous some of the terms for various color spaces are. It's hard to get an idea of how they relate to each other when it seems like they are the same but different. E.g. what is the difference between UV (as in YUV), U'V' (as in YU'V'), u*v* (as in L*u*v*) and U*V* (as in U*V*W*)? It seems like the CIE has defined U and V enough times to drive me bonkers.
Another thing that bothers me is that I've seen YUV referred to as being device dependent, while XYZ and xyY are device independent. That makes no sense to me because here...
-
Scene graph for tracking adjacency in space
Hi,
I want to create complex scenes in my 3D application. Like a house with rooms in it and stuff inside the rooms. I want to remove rooms which are not visible in the camera. I know opengl will clip stuff that are not visible, but I am talking about not sending the data about rooms and objects which are blocked, at all.
So I have heard that for complex scenes a scene grah can help. But most implementation of scene graphs seem to take a hierarchical view of the scene. Say we have a city which is the root node, then the buildings would be its children and the rooms in the buildings would be lower level chidlren etc. This structure does not help in knowing which rooms are adjacent to each other(all adjacent rooms are children of the same parent node).
I came...
|