Meow 😻 currently working on the IServiceProvider Integration of SereneUI - since I also use it in the Game Projekt of Serene Horizons. On this way I made it possible to set a DataContext/ViewModel based on its type. It also makes the builders more flexible.
#monogame #dotnet #serenehorizons #ui
Ok, meow did the basic pseudo style classes for the Button :hover :active :disabled.
#monogame #dotnet #serenehorizons #ui
Ok, I removed all the old ui stuff from the game and just use my own ui system now and for the button clicks it works with the game.
#monogame #dotnet #serenehorizons
We can click on buttons, nyaaa!!!
And the method that counts a value up shown on the button, sitz in the view model as RelayCommand.
1/2
#monogame #dotnet #serenehorizons #ui
In the image, a code editor is open in the background displaying both a CSS-like stylesheet and XML markup. In the foreground, there's a preview window titled "Serene Horizons" that visually renders the markup with the applied style. **Stylesheet (on the left – `serene_default.css`)**: The stylesheet defines visual styles for UI components in an XML-based interface: - `Panel.top-panel` and `Panel.bottom-panel` use properties such as `Padding`, `HorizontalAlignment`, `VerticalAlignment`, and `BackgroundColor`. - Text styling is defined for `TextBlock` elements with font settings (`Font: 'Fonts/arial 18'`), alignment (`Left`, `Center`), and text color (`#351D2E`). - General `Button` styling includes `Padding`, `BackgroundColor` (`#D9BBC4`), text color, and font (`'Fonts/arial_12'`). - A specific `Button.exit` style overrides the background color with `#B87A91`, likely to indicate a different or important function. **Markup (on the right – XML file, likely `test_page.ui.xml`)**: The XML markup uses a hierarchical structure with elements like `<Page>`, `<Panel>`, and `<StackPanel>`. It defines a vertical stack of buttons with labels such as "Settings Game" and "Exit". Layout attributes such as `Padding`, `HorizontalAlignment`, and `VerticalAlignment` are used to control UI positioning. Each button contains a `TextBlock` element for its label. **Foreground Window (UI preview titled "Serene Horizons")**: The window shows the rendered UI based on the provided XML and CSS: - A header displaying the text: "Hello from test_page.ui.xml" - A horizontal button labeled "Button" - A vertical menu in the center with four buttons: "New Game", "Load Game", "Settings Game", and "Exit" - A bottom bar with the same four buttons arranged horizontally - The UI has a consistent visual style with pastel-colored buttons, soft outlines, and purple text, reflecting the color codes and layout rules defined in the stylesheet
I can haz stylesheet, meow!
ok, not much jet... but I ran over a element, check if there is a style rule and use it after conversion, then also check the xml properties for values.
#monogame #dotnet #serenehorizons #ui
Ok, the first few test properties are now set by the stylesheet.
But I don't want to write it for every possible property... I should iterate over the properties of the element, and search for a rule to apply and use some converters and reflection fu?
#monogame #dotnet #ui #serenehorizons
Ok, nice there is ExCSS a small Library to read CSS Files into an Object... and you can can includeUnknownRules, Declarations, and tolerate invalid selectors, values, constraints... so I'll try to give my ui.xml stylesheets!
#monogame #dotnet #serenehorizons
Screenshot of a development environment showing an open XML file (test_page.ui.xml) at the top and a user interface preview at the bottom. The XML file defines a layout with multiple panels, text blocks, and a button labeled "Button". The preview window titled "Serene Horizons" displays the text "Hello from test_page.ui.xml" at the top, a green button in the center, and a purple text block at the bottom with placeholder text reading "Lorem ipsum dolor sit amet, consetetur sadipscing elitr,".
Ok, not doing that mush these days... reading to many manga 🫣
but you know the GUI Frameworks for monogames I tried, didn't satisfied me - so I startet my own... today I can show a picture of the very basics.
At least I can parse the xml for the Page.
#dotnet #monogame #serenehorizons #gui
Also ich merke mir das Angebot auf jeden Fall mal, wäre schon nice mit netten Leuten aus der Bubble zu arbeiten.
Aber kannst ja mal bei meinen #serenehorizons posts schauen was ich so treibe - wobei aktuell bin ich an einem UI System, die existierenden für Monogame gefallen mir nicht.
Meow 😻 had worked on the FbxInstancedService to render my Decorations (and other object that are Fbx) via instancing, also wrote a little Shader to respect most of the parameters of the fbx model.
Meow 😻 also added fog to the Instancing Shader.
#dotnet #monogame #serenehorizons
To be honest, the code looks a bit like I'm developing a standard business app... using DI/IoC, a async Message Dispatcher...
I'm pretty sure other monogames have a complete different software architekture.
Perhaps some day I will show you a UML diagramm?
3/3
#dotnet #monogame #serenehorizons
it's similar to an enum but you can attach what ever you like to it - since it's a class you can also add ne methods like Update(GameTime gameTime) or perhaps for temporary Drawing a Draw(GameTime gameTime, SpriteBatch spriteBatch).
2/3
#dotnet #monogame #serenehorizons
Good meowning 💖🍵😻
I'm thinking of writing a kind of a state machine today... something that helps me to determine which (input) actions are allowed at the moment. And for sure I'll use my StrongTypedEnumerable<T> as base for the states...
1/3
#dotnet #monogame #serenehorizons
Hey guys, just wanna ask if I should start to post the #serenehorizons updates in english, 'cause it seems most of the likes there comes from non (nativ) german speakers, meow! 😻
Einen wunderschnurrigen guten Morgen und hier noch der letzte Stand von gestern.
#dotnet #monogame #serenehorizons
Hab ja noch mal neu angefangen, und ganz viel im Hintergrund geändert... nun bin ich endlich dabei wieder richtig zu zeichnen und die Shader funktionieren auch wieder.
#dotnet #monogame #serenehorizons
Aber für heute bin ich zufrieden, dass es trotz massiven Deko Overload flüssig läuft. Immerhin 90-100 FPS. Zum Zeitpunkt des Screenshopt 98.02.
2/2
#dotnet #monogame #serenehorizons
Screenshot eines Videospiels mit einer hexagonal aufgebauten Karte in Low-Poly-Grafik. Die Spielfläche besteht aus verschiedenfarbigen sechseckigen Feldern, die unterschiedliche Biome darstellen: dichte Wälder, trockene Wüsten, felsige Gebiete und Wasserflächen. Jedes Hexagon zeigt ein klar definiertes Terrain mit stilisierten Elementen wie Bäumen, Felsen oder Schnee. Oben links sind Schaltflächen für „Main Menu“ und „Debug Panel“ sichtbar, oben rechts wird die aktuelle Bildrate (FPS: 98,02) angezeigt.
Ok, Hardware Instancing scheint zu klappen, auf jedem Tile 300-350 Deko Objekte. Nur die Darstellung und Farben sind noch nicht richtig... da muss ich noch mal schauen ob meine Aufteilung der Meshes oder der Instancing Shader Mist bauen.
1/2
#dotnet #monogame #serenehorizons
3D-Ansicht eines Low-Poly-Geländes mit sechseckigen Feldern in verschiedenen Farben und Texturen, die unterschiedliche Landschaftstypen darstellen (Gras, Wasser, Stein, Sand, Erde). Auf einigen Feldern stehen stilisierte Bäume. Im oberen Bereich werden Debug-Informationen wie Kameraposition, Anzahl der Vertices und FPS angezeigt. In der Mitte befindet sich ein Button mit der Aufschrift "Main Menu".
So nun auch mal angefangen mit der Deko, die Wald Tiles bekommen nun ein paar Bäume. Allerdings muss ich die noch irgendwie in ein Mesh zusammenfassen aktuell gehen die echt hart auf die Framerate.
#dotnet #monogame #serenehorizons
Sicherlich nicht die geilste Wasseranimation der Welt aber für den Moment reicht es mir erst einmal. Shader schreiben ist sooooooo fucking anstrengend.
#dotnet #monogame #shader #serenehorizons
at this point all props to @kenney.nl for the beautiful colormaps and patternmaps 💖
At some point in the future i'll also plan to use your assets to decorate my tiles.
#dotnet #monogame #serenehorizons
Ok, nun wird mit einem Shader gearbeitet und eine Colormap sowie einer Patternmap und so weiter und sofort.
Ok, fürs Wasser brauche ich bei Gelegenheit noch einen anderen Shader aber vorerst reicht mir das. Hab für die Demo mal eine kleinere Map erstellen lassen.
#dotnet #monogame #serenehorizons
Ok, auf der höchsten Zoom Stufe wenn die meisten Objekte vorgehalten und gezeichnet werden steigt der Speicherbedarf auf ~700mb.
Aber zu beachten aktuell läuft es in einem kleinen Fenster und auch im Debug Build.
#dotnet #monogame #serenehorizons
Ok, ein paar Dinge werden sich natürlich noch ergeben aber ich hab nun einen guten Startpunkt.
Für interessierte auf dem jetzigen Stand braucht es ~340mb im RAM.
#dotnet #monogame #serenehorizons
So langsam könnte ich also mit den Spielmachaniken anfangen... das meiste Graphische gibt es ja jetzt (wenn auch als hässliche Platzhalter), das Raypicking im 3D Raum klappt auch.
#dotnet #monogame #serenehorizons
Ok, Code aufgeräumt und einiges Verschoben, für die Services Interfaces erstellt gegen die nun entwickelt wird.
Ein paar HasHitA... Methoden erstellt, also Kreuzungen, Kanten, Kachelmitte.
#dotnet #monogame #serenehorizons
So mal ein Design Dokument geschrieben, damit ich weiß was ich eigentlich machen will also vor allem in Sachen Spielmechanik und so.
Nicht das ich immer weiter Programmiere und irgendwann vergesse was ich eigentlich erreichen will. 😅
#serenehorizons
Aber der Datentyp float ist fies... für meine Dirctionary<Vector3, HashSet<TerrainTile>>
Musste ich erstmal die Position auf 2 Stellen nach dem Komma einkürzen... was irgendwie umständlich ist aber naja.
#dotnet #monogame #serenehorizons
Und yeah ich kann nun die Ecken auswählen und bekomme alle mit der Position verbundenen Tiles.
Sowas dann auch noch für die Kanten.
Und den Tile Center Hit Test, der aber am Einfachen sein sollte.
#dotnet #monogame #serenehorizons
Ok, jetzt mit Texturen (ja die sind hässlich dafür aber selbst gemacht).
Außerdem ist das Spielfeld nun nicht mehr Quadratisch sondern in sich ein großes Hexagon.
#dotnet #monogame #serenehorizons