Skip to content

Commit

Permalink
add snowy biome
Browse files Browse the repository at this point in the history
  • Loading branch information
quasilyte committed Dec 15, 2023
1 parent cd409d6 commit eb8592b
Show file tree
Hide file tree
Showing 50 changed files with 885 additions and 135 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/_data/image/landscape/snow/trees.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/_data/image/resources/artifact.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added src/assets/_data/image/ui/items/weather.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions src/assets/_data/raw/en.txt
Original file line number Diff line number Diff line change
Expand Up @@ -272,6 +272,11 @@ Fewer resources mean it will be hard to play a long battle.
Whether a map will have gold deposits.
On moon environment, disabling gold doubles the iron resources capacity.

##menu.lobby.weather_enabled : Weather
##menu.lobby.weather_enabled.description
This switch enables the enviroment-specific weather effects.
Not every environment has weather.

##menu.lobby.world_size : World size
##menu.lobby.world_size.description
The generated world size.
Expand Down Expand Up @@ -401,6 +406,7 @@ some special differences that will affect the gameplay.
##menu.lobby.moon : moon
##menu.lobby.forest : forest
##menu.lobby.inferno : inferno
##menu.lobby.snow : tundra

##menu.lobby.land_flat : flat
##menu.lobby.land_normal : balanced
Expand Down Expand Up @@ -587,6 +593,10 @@ Split-screen multiplayer: competitive (PvP).
##game.hint.resource.scrap.value : Very low value
##game.hint.resource.iron : Iron resource
##game.hint.resource.iron.value : Low value
##game.hint.resource.mineral : Mineral resource
##game.hint.resource.mineral.value : Normal value (requires tier 2)
##game.hint.resource.artifact : Artifact
##game.hint.resource.artifact.value : Upgrades the drone
##game.hint.resource.organic : Organic resource
##game.hint.resource.organic.value : Normal value
##game.hint.resource.gold : Gold resource
Expand Down
10 changes: 10 additions & 0 deletions src/assets/_data/raw/ru.txt
Original file line number Diff line number Diff line change
Expand Up @@ -283,6 +283,11 @@ x1.5 означает, что игра будет работать на 50% бы
Контролирует наличие золотых ископаемых на карте.
При игре на лунном окружении, отключение золота удваивает ёмкость железных руд.

##menu.lobby.weather_enabled : Погода
##menu.lobby.weather_enabled.description
Этот переключатель контролирует специфичные для окружения погодные эффекты.
Не каждый биом имеет погодные эффекты.

##menu.lobby.oil_regen_rate : Регенерация нефти
##menu.lobby.oil_regen_rate.description
Как быстро восстанавливаются нефть и лавообразные ресуры.
Expand Down Expand Up @@ -401,6 +406,7 @@ x1.5 означает, что игра будет работать на 50% бы
##menu.lobby.moon : луна
##menu.lobby.forest : лес
##menu.lobby.inferno : инферно
##menu.lobby.snow : тундра

##menu.lobby.land_flat : плато
##menu.lobby.land_normal : сбалансированный
Expand Down Expand Up @@ -587,6 +593,10 @@ x1.5 означает, что игра будет работать на 50% бы
##game.hint.resource.scrap.value : Очень низкая ценность
##game.hint.resource.iron : Железо (ресурс)
##game.hint.resource.iron.value : Низкая ценность
##game.hint.resource.mineral : Минералы (ресурс)
##game.hint.resource.mineral.value : Средняя ценность
##game.hint.resource.artifact : Артифакт
##game.hint.resource.artifact.value : Улучшает дрона
##game.hint.resource.organic : Органика (ресурс)
##game.hint.resource.organic.value : Средняя ценность
##game.hint.resource.gold : Золото (ресурс)
Expand Down
247 changes: 247 additions & 0 deletions src/assets/_data/raw/snow_tiles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,247 @@
{ "columns":58,
"image":"..\/image\/landscape\/snow\/tiles.png",
"imageheight":32,
"imagewidth":1856,
"margin":0,
"name":"snow_tiles",
"spacing":0,
"tilecount":58,
"tiledversion":"1.10.1",
"tileheight":32,
"tiles":[
{
"id":0,
"probability":0.0500000007450581
},
{
"id":1,
"probability":0.0500000007450581
},
{
"id":2,
"probability":0.0500000007450581
},
{
"id":3,
"probability":0.0500000007450581
},
{
"id":4,
"probability":0.100000001490116
},
{
"id":5,
"probability":0.100000001490116
},
{
"id":6,
"probability":0.800000011920929
},
{
"id":7,
"probability":1.10000002384186
},
{
"id":8,
"probability":0.899999976158142
},
{
"id":9,
"probability":0.800000011920929
},
{
"id":10,
"probability":1.10000002384186
},
{
"id":11,
"probability":1.10000002384186
},
{
"id":12,
"probability":0.800000011920929
},
{
"id":13,
"probability":0.800000011920929
},
{
"id":14,
"probability":0.899999976158142
},
{
"id":15,
"probability":0.600000023841858
},
{
"id":16,
"probability":0.899999976158142
},
{
"id":17,
"probability":0.699999988079071
},
{
"id":18,
"probability":0.699999988079071
},
{
"id":19,
"probability":0.600000023841858
},
{
"id":20,
"probability":0.600000023841858
},
{
"id":21,
"probability":0.600000023841858
},
{
"id":22,
"probability":0.400000005960464
},
{
"id":23,
"probability":0.400000005960464
},
{
"id":24,
"probability":0.0399999991059303
},
{
"id":25,
"probability":0.025000000372529
},
{
"id":26,
"probability":0.025000000372529
},
{
"id":27,
"probability":0.0399999991059303
},
{
"id":28,
"probability":0.0399999991059303
},
{
"id":29,
"probability":0.0299999993294477
},
{
"id":30,
"probability":0.0799999982118607
},
{
"id":31,
"probability":0.0799999982118607
},
{
"id":32,
"probability":0.100000001490116
},
{
"id":33,
"probability":0.100000001490116
},
{
"id":34,
"probability":0.100000001490116
},
{
"id":35,
"probability":0.100000001490116
},
{
"id":36,
"probability":0.0799999982118607
},
{
"id":37,
"probability":0.0799999982118607
},
{
"id":38,
"probability":0.0500000007450581
},
{
"id":39,
"probability":0.00999999977648258
},
{
"id":40,
"probability":0.00999999977648258
},
{
"id":41,
"probability":0.00999999977648258
},
{
"id":42,
"probability":0.00999999977648258
},
{
"id":43,
"probability":0.0500000007450581
},
{
"id":44,
"probability":0.0399999991059303
},
{
"id":45,
"probability":0.0199999995529652
},
{
"id":46,
"probability":0.0199999995529652
},
{
"id":47,
"probability":0.100000001490116
},
{
"id":48,
"probability":0.0199999995529652
},
{
"id":49,
"probability":0.0299999993294477
},
{
"id":50,
"probability":0.0299999993294477
},
{
"id":51,
"probability":0.0299999993294477
},
{
"id":52,
"probability":0.0299999993294477
},
{
"id":53,
"probability":0.0199999995529652
},
{
"id":54,
"probability":0.0199999995529652
},
{
"id":55,
"probability":0.0500000007450581
},
{
"id":56,
"probability":0.0299999993294477
},
{
"id":57,
"probability":0.0199999995529652
}],
"tilewidth":32,
"type":"tileset",
"version":"1.10"
}
43 changes: 43 additions & 0 deletions src/assets/_data/shader/snowfall.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
package main

var Time float
var OffsetY float
var OffsetX float

func snow(uv vec2, scale, t float) float {
w := smoothstep(1.0, 0.0, -uv.y*(scale/20.0))
if w < 0.1 {
return 0.0
}

uv += t / scale
uv.y += (t * 2.0 / scale)
uv.x += sin(uv.y+t*0.5) / scale

uv *= scale
s := floor(uv)
f := fract(uv)
k := 3.0
p := 0.3 + 0.35*sin(11.0*fract(sin((s+scale)*mat2(vec2(7, 3), vec2(6, 5)))*5.0)) - f
d := length(p)
k = min(d, k)
k = smoothstep(0.0, k, sin(f.x+f.y)*0.01)
return k * w
}

func Fragment(position vec4, texCoord vec2, clr vec4) vec4 {
t := 0.25 * -Time

resolution := vec2(1920.0/2, 1080.0/2)

uv := (position.xy*2.0 - resolution.xy) / min(resolution.x, resolution.y)
uv.y *= 0.8
uv.y += OffsetY
uv.x += OffsetX

c := vec3(0)
c += snow(uv, 10.0, t) * 0.9
c += snow(uv, 8.0, t)

return vec4(c, 0)
}
Loading

0 comments on commit eb8592b

Please sign in to comment.