updated textures

This commit is contained in:
MasterGordon 2022-12-21 13:49:52 +01:00
parent 70bcef619e
commit 19c5bed5fc
30 changed files with 69 additions and 7 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 250 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 233 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 177 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 156 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 255 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 279 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 199 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 B

Binary file not shown.

Binary file not shown.

After

Width:  |  Height:  |  Size: 720 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 235 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 178 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 254 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 175 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 194 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 170 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 249 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

View File

@ -41,8 +41,6 @@ public class PlayerEntity
{
X = inputState.GetAxis(InputAxis.Horizontal) * movement.Speed.X
};
Console.WriteLine(movement.IsGrounded);
Console.WriteLine(movement.CurrentVelocity);
player.Position += movement.CurrentVelocity;
}

View File

@ -0,0 +1,30 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;
using Mine2d.game.core.tiles;
namespace Mine2d.game.core.world;
public struct GenerationSettings {
public int xOffset { get; set; }
public int yOffset { get; set; }
public Tiles tile { get; set; }
public int GetWeight(int height) {
return (int)((-Math.Pow(height - this.xOffset, 2)*0.01) + this.yOffset);
}
}
public class WorldGenerator
{
List<GenerationSettings> settings = new ();
public WorldGenerator() {
this.settings.Add(new GenerationSettings {
xOffset = 50,
yOffset = 16,
tile = Tiles.Stone
});
}
}

View File

@ -4,11 +4,18 @@ namespace Mine2d.game.frontend.renderer;
public class PlayerRenderer : IRenderer
{
private IntPtr playerTexture;
public void Render()
{
if(this.playerTexture == IntPtr.Zero)
{
this.playerTexture = Context.Get().TextureFactory.LoadTexture("character.character");
}
var ctx = Context.Get();
var camera = ctx.FrontendGameState.Camera;
var scale = ctx.FrontendGameState.Settings.GameScale;
var (width, height) = ctx.Window.GetSize();
foreach (var player in ctx.GameState.Players)
{
if (player.Name == ctx.FrontendGameState.PlayerName)
@ -20,11 +27,18 @@ public class PlayerRenderer : IRenderer
ctx.Renderer.SetColor(255, 0, 0);
}
ctx.Renderer.DrawRect(
(player.Position.X - (int)camera.Position.X) * scale,
(player.Position.Y - (int)camera.Position.Y) * scale - 28 * scale,
14 * scale,
28 * scale
// ctx.Renderer.DrawRect(
// (player.Position.X - (int)camera.Position.X) * scale,
// (player.Position.Y - (int)camera.Position.Y) * scale - 28 * scale,
// 14 * scale,
// 28 * scale
// );
ctx.Renderer.DrawTexture(
this.playerTexture,
width / 2,
(height / 2) - (31 * scale),
16 * scale,
32 * scale
);
}
}

20
Mine2d/ores.md Normal file
View File

@ -0,0 +1,20 @@
- Iron ore: #A9A9A9
- Copper ore: #B87333
- Tin ore: #668080
- Silver ore: #C0C0C0
- Gold ore: #FFD700
- Lead ore: #A9A9A9
- Nickel ore: #A8A8A8
- Platinum ore: #E5E4E2
- Cobalt ore: #0047AB
- Zinc ore: #A9A9A9
- Tungsten ore: #BFBFBF
- Uranium ore: #00FF00
- Diamond ore: #B9F2FF
- Emerald ore: #50C878
- Ruby ore: #E0115F
- Mythril ore: #C5C9C7
- Adamantine ore: #B5A642
- Orichalcum ore: #90713D
- Celestite ore: #5DADE2
- Aetherium ore: #00FFFF