-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
87 changed files
with
3,992 additions
and
160 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -258,4 +258,5 @@ paket-files/ | |
|
||
# Python Tools for Visual Studio (PTVS) | ||
__pycache__/ | ||
*.pyc | ||
*.pyc | ||
/Publish Win10.bat |
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,81 @@ | ||
Spiele ideen | ||
|
||
|
||
(Text Adventure) | ||
|
||
Console | ||
|
||
Mit Karrrrrrrrrrrrrrrrrrrrrmarrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr als Bösewicht errrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrrr will Magier sein | ||
|
||
Dungeon | ||
|
||
Karte manipulierbar | ||
|
||
1h zeit zum gewinnen | ||
|
||
Multiplayer | ||
|
||
Charakter-Designer | ||
|
||
pen and paper style | ||
|
||
Highscore-Listen (online) | ||
|
||
modbar | ||
|
||
Kartenzufallsgenerierung (Procedural Generated) | ||
|
||
Inventar System (Gewichtsystem?) | ||
|
||
Fallen-System (sichtbare/unsichtbare Fallen, die dem Spieler schaden zufügen oder auf eine andere map teleportiert || Multiplayer können andere spieler fallen aufstellen) | ||
|
||
Zeit (Lebenszeit) wird bei wenig Health schneller abgezogen | ||
|
||
Eigenes Wiki | ||
|
||
Eigene Website | ||
|
||
Sammelbare Items (Z.b. um die Zeit zu erhöhen?) | ||
|
||
Karrmarr klaut zwischendurch Teile der Karte, um zu verhindern dass der Spieler zu ihm durch kommt :D | ||
|
||
Beep-Soundtrack (Amiga version) | ||
|
||
Storymodus | ||
|
||
Npcs | ||
|
||
Bossgegner | ||
|
||
eine Rüstung aus Gurken, so als Easteregg | ||
|
||
Cut-Scenes!hyp | ||
|
||
|
||
|
||
|
||
|
||
Is not going to be implemented | ||
|
||
hollywood voiceover | ||
|
||
8bit Grafik | ||
|
||
Controller-Unterstützung | ||
|
||
Dass man regelmäßig Trinken und Essen muss, sonst stirbt man | ||
|
||
Rogue like | ||
|
||
Crafting-System | ||
|
||
KI Begleiter (Tiere) | ||
|
||
Spendenmöglichkeit für LiveEdu :P +5 | ||
|
||
Shopsystem | ||
|
||
dlc's | ||
|
||
Binary file not shown.
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,10 @@ | ||
namespace TheRuleOfSilvester.Core | ||
{ | ||
public enum ActionType | ||
{ | ||
None, | ||
Moved, | ||
ChangedMapCell, | ||
CollectedItem | ||
} | ||
} |
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,32 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Linq; | ||
using System.Reflection; | ||
using System.Runtime.InteropServices; | ||
using TheRuleOfSilvester.Core.Cells; | ||
|
||
namespace TheRuleOfSilvester.Core | ||
{ | ||
public abstract class BasicMapGenerator | ||
{ | ||
protected Random random; | ||
public List<Type> CellTypes { get; protected set; } | ||
|
||
public BasicMapGenerator() | ||
{ | ||
random = new Random(); | ||
} | ||
|
||
public BasicMapGenerator(Guid[] cellGUIDs) : this() | ||
{ | ||
var types = Assembly.GetExecutingAssembly().GetTypes().Where(c => c.BaseType == typeof(MapCell)).ToList(); | ||
|
||
CellTypes = new List<Type>(); | ||
|
||
foreach (var item in cellGUIDs) | ||
CellTypes.Add(types.FirstOrDefault(c => c.GUID == item)); | ||
} | ||
|
||
public abstract Map Generate(int x, int y); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,22 +1,97 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.ComponentModel; | ||
using System.Drawing; | ||
using System.IO; | ||
using System.Runtime.CompilerServices; | ||
using System.Text; | ||
using TheRuleOfSilvester.Core.Cells; | ||
|
||
namespace TheRuleOfSilvester.Core | ||
{ | ||
public abstract class Cell | ||
public abstract class Cell : IDisposable, INotifyPropertyChanged | ||
{ | ||
public const int HEIGHT = 3; | ||
public const int WIDTH = 5; | ||
public bool Invalid { get; set; } | ||
public string[,] Lines; | ||
public Point Position { get => position; set => SetValue(value, ref position); } | ||
public bool Invalid { get => invalid; set => SetValue(value, ref invalid); } | ||
|
||
|
||
public Cell() | ||
public int Width => Lines.GetLength(0); | ||
public int Height => Lines.GetLength(1); | ||
public bool Movable { get; set; } | ||
public Color Color { get; set; } | ||
public Map Map { get; set; } | ||
|
||
public BaseElement[,] Lines { get; protected set; } | ||
|
||
public BaseElement[,] Layer { get; internal set; } | ||
|
||
public event PropertyChangedEventHandler PropertyChanged; | ||
public event PropertyChangeEventHandler PropertyChange; | ||
|
||
protected bool disposed; | ||
|
||
private Point position; | ||
private bool invalid; | ||
|
||
public Cell(int width, int height, Map map, bool movable = true) | ||
{ | ||
Color = Color.White; | ||
Lines = new BaseElement[width, height]; | ||
Layer = new BaseElement[width, height]; | ||
Invalid = true; | ||
Map = map; | ||
Movable = movable; | ||
} | ||
public Cell(Map map, bool movable = true) : this(5, 3, map, movable) | ||
{ | ||
|
||
} | ||
|
||
public void SetPosition(Point position) | ||
{ | ||
Lines = new string[HEIGHT, WIDTH]; | ||
Position = position; | ||
Invalid = true; | ||
} | ||
|
||
|
||
public virtual void Update(Game game) | ||
{ | ||
|
||
} | ||
|
||
public override string ToString() => $"{GetType()} | {Position.X} : {Position.Y}"; | ||
|
||
public virtual void Dispose() | ||
{ | ||
if (disposed) | ||
return; | ||
|
||
Position = new Point(0); | ||
Invalid = false; | ||
Movable = false; | ||
Color = new Color(); | ||
Map = null; | ||
Lines = null; | ||
|
||
disposed = true; | ||
|
||
GC.SuppressFinalize(this); | ||
} | ||
|
||
|
||
private void SetValue<T>(T value, ref T privateField, [CallerMemberName] string name = null) | ||
{ | ||
if (value.Equals(privateField)) | ||
return; | ||
|
||
PropertyChange?.Invoke(this, new PropertyChangeEventArgs(name, oldValue: privateField, newValue: value)); | ||
|
||
privateField = value; | ||
|
||
PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(name)); | ||
} | ||
|
||
public static bool IsOnPosition(Point pos, Cell x) => | ||
x.Position.X * x.Width <= pos.X && (x.Position.X * x.Width + x.Width) > pos.X | ||
&& x.Position.Y * x.Height <= pos.Y && (x.Position.Y * x.Height + x.Height) > pos.Y; | ||
} | ||
} |
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 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TheRuleOfSilvester.Core.Cells | ||
{ | ||
public class BaseElement | ||
{ | ||
public int ElementID { get; set; } | ||
public ConnectionPoints Connections { get; set; } | ||
|
||
|
||
public BaseElement(int elementID, ConnectionPoints connections) | ||
{ | ||
ElementID = elementID; | ||
Connections = connections; | ||
} | ||
|
||
public static implicit operator BaseElement(char value) | ||
{ | ||
switch (value) | ||
{ | ||
case '│': return new BaseElement(1, ConnectionPoints.Up | ConnectionPoints.Down); | ||
case '║': return new BaseElement(2, ConnectionPoints.Up | ConnectionPoints.Down); | ||
case '─': return new BaseElement(3, ConnectionPoints.Left | ConnectionPoints.Right); | ||
case '═': return new BaseElement(4, ConnectionPoints.Left | ConnectionPoints.Right); | ||
case '┌': return new BaseElement(5, ConnectionPoints.Down | ConnectionPoints.Right); | ||
case '╔': return new BaseElement(6, ConnectionPoints.Down | ConnectionPoints.Right); | ||
case '└': return new BaseElement(7, ConnectionPoints.Up | ConnectionPoints.Right); | ||
case '╚': return new BaseElement(8, ConnectionPoints.Up | ConnectionPoints.Right); | ||
case '┐': return new BaseElement(9, ConnectionPoints.Left | ConnectionPoints.Down); | ||
case '╗': return new BaseElement(10, ConnectionPoints.Left | ConnectionPoints.Down); | ||
case '┘': return new BaseElement(11, ConnectionPoints.Left | ConnectionPoints.Up); | ||
case '╝': return new BaseElement(12, ConnectionPoints.Left | ConnectionPoints.Up); | ||
case '┬': return new BaseElement(13, ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Down); | ||
case '╦': return new BaseElement(14, ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Down); | ||
case '┴': return new BaseElement(15, ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Up); | ||
case '╩': return new BaseElement(16, ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Up); | ||
case '├': return new BaseElement(17, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Right); | ||
case '╠': return new BaseElement(18, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Right); | ||
case '┤': return new BaseElement(19, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left); | ||
case '╣': return new BaseElement(20, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left); | ||
case '┼': return new BaseElement(21, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left | ConnectionPoints.Right); | ||
case '╬': return new BaseElement(22, ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left | ConnectionPoints.Right); | ||
default: | ||
return new BaseElement(value, ConnectionPoints.None); | ||
} | ||
} | ||
|
||
public static implicit operator BaseElement(ConnectionPoints connectionPoints) | ||
{ | ||
switch (connectionPoints) | ||
{ | ||
case ConnectionPoints.Up | ConnectionPoints.Down: return new BaseElement(1, connectionPoints); | ||
case ConnectionPoints.Left | ConnectionPoints.Right: return new BaseElement(3, connectionPoints); | ||
case ConnectionPoints.Down | ConnectionPoints.Right: return new BaseElement(5, connectionPoints); | ||
case ConnectionPoints.Up | ConnectionPoints.Right: return new BaseElement(7, connectionPoints); | ||
case ConnectionPoints.Left | ConnectionPoints.Down: return new BaseElement(9, connectionPoints); | ||
case ConnectionPoints.Left | ConnectionPoints.Up: return new BaseElement(11, connectionPoints); | ||
case ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Down: return new BaseElement(13, connectionPoints); | ||
case ConnectionPoints.Left | ConnectionPoints.Right | ConnectionPoints.Up: return new BaseElement(15, connectionPoints); | ||
case ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Right: return new BaseElement(17, connectionPoints); | ||
case ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left: return new BaseElement(19, connectionPoints); | ||
case ConnectionPoints.Down | ConnectionPoints.Up | ConnectionPoints.Left | ConnectionPoints.Right: return new BaseElement(21, connectionPoints); | ||
default: | ||
return new BaseElement(0, connectionPoints); | ||
} | ||
} | ||
} | ||
} |
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,16 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Text; | ||
|
||
namespace TheRuleOfSilvester.Core.Cells | ||
{ | ||
|
||
public enum ConnectionPoints | ||
{ | ||
None = 0, | ||
Up = 1, | ||
Down = 2, | ||
Left = 4, | ||
Right = 8, | ||
} | ||
} |
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 |
---|---|---|
@@ -1,19 +1,21 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
namespace TheRuleOfSilvester.Core.Cells | ||
{ | ||
public class CornerLeftDown : Cell | ||
[Guid("C37255B3-2C41-431C-AB26-10B740837FA3")] | ||
public class CornerLeftDown : MapCell | ||
{ | ||
public CornerLeftDown() | ||
public CornerLeftDown(Map map, bool movable = true) : base(map, movable) | ||
{ | ||
Lines[2, 4] = "│"; | ||
Lines[2, 0] = "┐"; | ||
Lines[1, 4] = "│"; | ||
Lines[0, 4] = "┐"; | ||
Lines[4, 2] = Movable ? '│' : '║'; | ||
Lines[0, 2] = Movable ? '┐' : '╗'; | ||
Lines[4, 1] = Movable ? '│' : '║'; | ||
Lines[4, 0] = Movable ? '┐' : '╗'; | ||
for (int i = 0; i < 4; i++) | ||
Lines[0, i] = "─"; | ||
Lines[i, 0] = Movable ? '─' : '═'; | ||
} | ||
} | ||
} |
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 |
---|---|---|
@@ -1,19 +1,22 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
using System.Runtime.InteropServices; | ||
using System.Text; | ||
|
||
namespace TheRuleOfSilvester.Core.Cells | ||
{ | ||
public class CornerLeftUp : Cell | ||
[Guid("726D1EE9-90C5-48F1-A206-2EAEB19AC24B")] | ||
public class CornerLeftUp : MapCell | ||
{ | ||
public CornerLeftUp() | ||
public CornerLeftUp(Map map, bool movable = true) : base(map, movable) | ||
{ | ||
Lines[0, 4] = "│"; | ||
Lines[0, 0] = "┘"; | ||
Lines[1, 4] = "│"; | ||
Lines[2, 4] = "┘"; | ||
|
||
Lines[4, 0] = Movable ? '│' : '║'; | ||
Lines[0, 0] = Movable ? '┘' : '╝'; | ||
Lines[4, 1] = Movable ? '│' : '║'; | ||
Lines[4, 2] = Movable ? '┘' : '╝'; | ||
for (int i = 0; i < 4; i++) | ||
Lines[2, i] = "─"; | ||
Lines[i, 2] = Movable ? '─' : '═'; | ||
} | ||
} | ||
} |
Oops, something went wrong.