Flakes Construction Yard

YSFlight addon development, questions, tutorials, & more!
User avatar
Flake
Staff
Staff
Posts: 4151
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR600RR. Shit I mean Boeing F/A-18A.
Location: Newcastle, Australia
OS: Windows 10 (x64)
Has thanked: 771 times
Been thanked: 1058 times

Re: Flakes Construction Yard

Post by Flake » Sun Dec 31, 2017 1:38 pm

So today I improved the UI a lot more, so I'm not reusing code in places and it's less error prone.

Image
Image

Now console and debug inherit a common abstract console for their code base. Same with the debug/console message types menu.

Improved how richtextstrings are created so that the messages written to the console are less funky when being made and written.

All in all I'm happy with how the console and debug is working for now. Next I'm going to redo all the debug information in MetaData and World, because I'm very sure I've screwed something up there and I want to catch it before I progress any further into the netcode side of things.
Image
(At this stage, I get more enjoyment coding for this game then playing it. Weird right?)

User avatar
Flake
Staff
Staff
Posts: 4151
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR600RR. Shit I mean Boeing F/A-18A.
Location: Newcastle, Australia
OS: Windows 10 (x64)
Has thanked: 771 times
Been thanked: 1058 times

Re: Flakes Construction Yard

Post by Flake » Mon Jan 01, 2018 7:17 am

I'm going to have to redo the UI to use WPF instead of WinForms, as everytime I try and write anything substantial to the form I get a AccessViolation exception due to memory errors in .Net's use of the forms. Fan-freaking-tastic.

EDIT: WPF is actually much easier then I thought it would be. I can design the UI in WPF, then do all the logic in traditional C#, then link it all up and voila. New goal for the next day or three. :)

Image

This works pretty nicely. I like that I can see the output while working on the code, that's a massive help.
Image
(At this stage, I get more enjoyment coding for this game then playing it. Weird right?)

User avatar
Flake
Staff
Staff
Posts: 4151
Joined: Thu Feb 10, 2011 8:47 pm
Favorite Aircraft: Honda CBR600RR. Shit I mean Boeing F/A-18A.
Location: Newcastle, Australia
OS: Windows 10 (x64)
Has thanked: 771 times
Been thanked: 1058 times

Re: Flakes Construction Yard

Post by Flake » Sat Jan 13, 2018 4:30 am

Image

Gott Dammmmn this took ages to do! :(

WPF is both powerful and sometimes completely useless. After screwing around trying to set bindings, I decided the smartest way to do this would be to just do it all programatically.

I tried DataGrid, ListView, DataGridView, StackPanel...

In the end, it was just easier to use a Grid and then modify the Grid in code behind.

All working now. In fact, now I can have Debug and Console messages in the same window so what I'm going to do now is link those two together, clean up a bit, then stress test. Hopefully WPF is less cancer than WinForms and I can finally get on with it!

All this work for a UI! Christ all mighty! >:|

EDIT: Console and Debug are now one window. Will add checkboxes to choose to see debug messages which will all be off by default.

Image

Unlike winforms, the loading for this is FAAAAAST.
Image
(At this stage, I get more enjoyment coding for this game then playing it. Weird right?)

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest