-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #3 from GeftGames/dev
0.1.26.0 Update
- Loading branch information
Showing
180 changed files
with
112,733 additions
and
96,559 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
namespace rabcrClient { | ||
public enum Command : byte { | ||
Null, | ||
CheckInMenu, //Status of server | ||
Check, //Status of server | ||
Blank, | ||
|
||
// Starting | ||
GetStatus, // get req to join | ||
Login, // Login into the server with pasword (or without) | ||
LoggedState, // Server say ok or wrong | ||
SetPassword, // Set password enter | ||
Logout, // Logout of the server | ||
Exit, // End | ||
Message, // Send a text message to all the chat clients | ||
|
||
// World | ||
SendingWorldData, //Get chunk of blocks | ||
GetWorldData, | ||
ListPlayersPositions, //get pos of player | ||
|
||
Request, // Check if player exists | ||
EditTerrain, | ||
|
||
// Others | ||
PlayersList, // Get a list of users in the chat room from the server | ||
SomeoneLogout, | ||
ConnectDuringGame, | ||
PlayersTeleportMessageToTarget, | ||
PlayersTeleportMessageToSource, | ||
|
||
// Player data | ||
PlayerBasicStates, // lives, food, water, ... | ||
PlayerInventory, // my inv, ... | ||
EatFood, | ||
SetInventory, | ||
SetInventoryMachine, | ||
SpawnChanged, | ||
PlayerPosition, | ||
JoinWorld, | ||
|
||
} | ||
|
||
enum ErrorJoinWorld { | ||
None, | ||
NotAllowedToJoin, | ||
NotFound, | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
Texture2D SpriteTexture; | ||
//float4 ColorWhite = float4(1, 1, 1, 1); | ||
float Time; | ||
float PosX; | ||
float PosY; | ||
float Opacity=1; | ||
float4 Color; | ||
|
||
sampler2D SpriteTextureSampler = sampler_state { | ||
Texture = <SpriteTexture>; | ||
}; | ||
|
||
struct VertexShaderOutput { | ||
float4 Position : SV_POSITION; | ||
float4 Color : COLOR0; | ||
float2 TextureCoordinates : TEXCOORD0; | ||
}; | ||
|
||
float rand(float2 vec) { | ||
return frac(sin(dot(vec, float2(/*56*/56, 78/*78*/)) /**1.0*/) * 1000.0); | ||
//return frac(sin(dot(vec, float2(12.9898, 78.233))) * 43758.5453); | ||
//return 1.0; | ||
} | ||
|
||
float noise(float2 pos) { | ||
float2 i = floor(pos); | ||
float2 f = frac(pos); | ||
|
||
float a = rand(i); | ||
float b = rand(i+float2(1.0,0.0)); | ||
float c = rand(i+float2(0.0,1.0)); | ||
float d = rand(i+float2(1.0,1.0)); | ||
|
||
float2 cubic = f*f*(3-2*f); | ||
return lerp(a, b, cubic.x) + (c-a)*cubic.y *(1.0-cubic.x)+(d-b)*cubic.x*cubic.y; | ||
} | ||
|
||
float fbm(float2 coord) { | ||
float value=0.0; | ||
float scale=0.5; | ||
|
||
for (int i = 0; i < 3/*Octaves*/; i++) { | ||
value+=noise(coord) *scale; | ||
coord*=2.0; | ||
scale*=0.4; | ||
} | ||
return value; | ||
} | ||
|
||
float4 MainPS(VertexShaderOutput input) : COLOR { | ||
float2 coord = input.TextureCoordinates*5.0+float2(PosX,PosY); | ||
float motion = fbm(coord+float2(Time,Time/4)); | ||
float final = fbm(coord+motion); | ||
|
||
//return float4(final, final, final, 1); | ||
return Color*final*Opacity; | ||
} | ||
|
||
technique SpriteDrawing { | ||
pass P0 { | ||
PixelShader = compile /*ps_4_0_level_9_1*/ps_4_0_level_9_3 MainPS(); | ||
//VertexShader = compile vs_5_0 VertexShaderFunction(); | ||
} | ||
}; | ||
/* | ||
float4 PixelshaderFunc(float4 pos : SV_POSITION, float2 texCoord : TEXCOORD0) : SV_TARGET0 | ||
{ | ||
float4 pixelShift = ScreenTexture.Sample(LinearSampler, texCoord.xy + float2(0.1f, 0.0f)); | ||
return pixelShift; | ||
}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
float WSize; // half window width if bigger than height than with height salt | ||
float HSize; // half window height if bigger than width than with width salt | ||
float Intensity; | ||
|
||
sampler2D SpriteTextureSampler = sampler_state { | ||
Texture = <SpriteTexture>; | ||
}; | ||
|
||
struct VertexShaderOutput { | ||
float4 Position : SV_POSITION; | ||
float4 Color : COLOR0; | ||
float2 TextureCoordinates : TEXCOORD0; | ||
}; | ||
|
||
float rand(float2 vec) { | ||
return frac(sin(dot(vec, float2(56, 78))) * 1000.0); | ||
} | ||
|
||
float4 MainPS(VertexShaderOutput input) : COLOR { | ||
float x; | ||
float y; | ||
|
||
if (input.TextureCoordinates.x < 0.5f) x = (0.5f-input.TextureCoordinates.x) * WSize; | ||
else x = (input.TextureCoordinates.x-0.5f) * WSize; | ||
|
||
if (input.TextureCoordinates.y < 0.5f) y = (0.5f-input.TextureCoordinates.y) * HSize; | ||
else y = (input.TextureCoordinates.y - 0.5f) * HSize; | ||
|
||
|
||
return float4(0, 0, 0, Intensity * (y * y + x * x) + rand(input.TextureCoordinates.xy)/256); | ||
} | ||
|
||
technique SpriteDrawing { | ||
pass P0 { | ||
PixelShader = compile ps_4_0_level_9_1 MainPS(); | ||
} | ||
}; |
Oops, something went wrong.