Author Topic: WinAGI Version 3.0.0-alpha8.0  (Read 1238 times)

0 Members and 1 Guest are viewing this topic.

Offline AGKorson

WinAGI Version 3.0.0-alpha8.0
« on: December 17, 2024, 02:52:07 AM »
Here's a very early look at the new and improved WinAGI Game Development System, written in C# using VS2022.
https://github.com/AGKorson/WinAGI-GDS/releases/tag/v3.0.0-alpha8.0

The repository is public if you want to peruse the source. Keep in mind this is a very rough pre-production release.  This version does support all game-level functions (opening, importing, creating new from blank or template, managing setting and properties, rebuilding/compiling, etc) and basic resource management (adding/removing, renumbering, exporting, importing, previewing). The only functional editor is the Logics editor. It is mostly complete- integration with the other editors and tools are the only incomplete features.

As of this progress point, I plan on taking a break from coding this for awhile, but I would still welcome any feedback if anyone wants to offer it.

The learning curve to create robust applications in C# has been steep, and I've still got a long way to go to get to the top. I expect the graphics based editors to be especially difficult. But I do plan on making an attempt later in '25.

Enjoy.




Offline Kawa

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #1 on: December 17, 2024, 06:14:39 AM »
Quote
I expect the graphics based editors to be especially difficult.
Having done graphics editors in both VB Classic and C#, I can tell you this much: it's not that hard to use System.Drawing.

Your picture box control's OnPaint event gives you a PaintEventArgs, and that in turn gets you a Graphics object. And that? Oh, you can draw anything from there. Here's the code from my attempt at a SCUMM room editor, specifically the paint event. I can't imagine doing arbitrary polygons (the walk so-called-boxes) in VB Classic as easily as I had it there.

Note that I've developed an interesting aversion to how the WinForms designer produces, well, designer files, and create all the controls for that room editor myself, by hand. That's entirely my own code, my own choice, and none of that really matters but it might throw you off a bit so I thought I'd mention it. The important thing is how to use Graphics to draw stuff to Bitmaps.

Offline doomlazer

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #2 on: December 17, 2024, 06:00:06 PM »
Cool to finally get a look at the new version. I see the logic files need to be updated if they use extended characters. Was that a significant change?

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #3 on: December 17, 2024, 06:00:58 PM »
Having done graphics editors in both VB Classic and C#, I can tell you this much: it's not that hard to use System.Drawing.

I hope you're right. The biggest paradigm shift I've had to make is that the inherent simplicity of VB Classic graphics came at the expense of flexibility and feature-depth. C# gives you access to EVERYTHING but then you have to learn how to wrestle all the options and syntax to get what you want out of it. That requires a lot of learning about all the objects, methods, properties and events. And a lot of the 'official' documentation is woefully inadequate, often glossing over or ignoring important concepts, or burying them behind a chain of hyperlinks that are nearly impossible to navigate. Most of their examples are no better than a 'Hello World' which doesn't help understand details and nuances.

I probably spent a full day trying to figure out how to print text to a picture box. In VB Classic, you just did "picturebox1.Print("msg"). Not quite that simple in C#... But I did finally figure it out.

I tried to check out your code sample to see some better examples but the link is broken (do you work for Microsoft?  ;D )
« Last Edit: December 17, 2024, 06:11:22 PM by AGKorson »

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #4 on: December 17, 2024, 06:07:15 PM »
Cool to finally get a look at the new version. I see the logic files need to be updated if they use extended characters. Was that a significant change?
Not really. In the current version, I chose to store all characters as single bytes, reading the bytes as the desired DOS code page when loading. This seemed like a good idea until I realized it required a lot of extra code to manage cutting and pasting.

With C#WinAGI I just simplified things - store the text in Unicode, work the editors with Unicode and only convert to DOS code page bytes when compiling. It's significantly easier to manage now.
« Last Edit: December 17, 2024, 06:12:50 PM by AGKorson »

Offline Kawa

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #5 on: December 18, 2024, 04:00:22 AM »
Not quite that simple in C#... But I did finally figure it out.
graphics.DrawString("Hello world!", someFont, Brushes.Black, rectangle) may have more arguments, sure, but...

Quote
I tried to check out your code sample to see some better examples but the link is broken (do you work for Microsoft?  ;D )
My bad, it's a private repo.
It's mostly just stuff like
Code: [Select]
private void roomPreviewPictureBox_Paint(object sender, PaintEventArgs e)
{
var g = e.Graphics;
g.DrawImage(anotherImage, 0, 0, targetWidth, targetHeight);
g.DrawRectangle(Pens.White, (obim.Left * zoom) - 2, (obim.Top * zoom) - 2, (obim.Width * zoom) + 1, (obim.Height * zoom) + 1);
etc.

Offline Charles

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #6 on: December 18, 2024, 09:01:51 AM »
It's exciting to see you switch to C# from such a mature VB6 project.

I know from personal experience it's a steep learning curve, but C#'s a great choice from a personal development perspective -- I did VB.net myself years ago, and while I'm proficient in C# it doesn't come as naturally to me as VB syntax does... unfortunately C# is preferred in most circles.

Anyway, I know you'll get to a point where it becomes second-nature, and you'll wonder how you ever survived in VB6 for so long.

Offline Collector

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #7 on: December 18, 2024, 11:00:35 AM »
I am having trouble with the NuGet packages. I have never had a problem with them before. It is throwing 404 errors for all three of the packages.
KQII Remake Pic

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #8 on: December 18, 2024, 05:10:28 PM »
I am having trouble with the NuGet packages. I have never had a problem with them before. It is throwing 404 errors for all three of the packages.
I'm not sure what you are referring to. Are you talking about the release installation files? There's only two - setup.exe and WinAGI.Installer.msi. If you're having trouble downloading I can provide a shared file link.

I don't know much about NuGet - I did some reading on it years ago but it never made sense. And I've been able to continue coding without seeming to need to know...

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #9 on: December 18, 2024, 05:13:37 PM »
graphics.DrawString("Hello world!", someFont, Brushes.Black, rectangle)

Most of their examples are no better than a 'Hello World' which doesn't help understand details and nuances.

LOL!

Offline Collector

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #10 on: December 19, 2024, 06:10:51 AM »
I'm not sure what you are referring to. Are you talking about the release installation files? There's only two - setup.exe and WinAGI.Installer.msi. If you're having trouble downloading I can provide a shared file link.

I don't know much about NuGet - I did some reading on it years ago but it never made sense. And I've been able to continue coding without seeming to need to know...

I was wanting to take a look at the code. NuGet provides the dependencies. I did get it to retrieve the FastColorBoxes package, but not Microsoft.VisualStudio.OLE.Interop nor NAudio.
KQII Remake Pic

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #11 on: December 20, 2024, 02:31:06 AM »
I was wanting to take a look at the code. NuGet provides the dependencies. I did get it to retrieve the FastColorBoxes package, but not Microsoft.VisualStudio.OLE.Interop nor NAudio.
Yeah, I remember now - NuGet is for managing libraries and such that you can add to your projects. It's been a while since I have had to deal with that. Weird that those two won't load.

Offline doomlazer

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #12 on: December 20, 2024, 09:36:35 AM »
WinAGI v2.x wont open a project if the wag states it's v3, but changing back to 2.3 allows it to open again. I assume things would break if you've updated the extended characters in logics. Otherwise, are v2 and v3 projects really incompatible or does WinAGI 2 just not expect a version 3 to be valid?

Offline Collector

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #13 on: December 20, 2024, 09:40:56 AM »
WinAGI v2.x wont open a project if the wag states it's v3, but changing back to 2.3 allows it to open again. I assume things would break if you've updated the extended characters in logics. Otherwise, are v2 and v3 projects really incompatible or does WinAGI 2 just not expect a version 3 to be valid?
Perhaps some kind of import function to convert the wag to v3?
KQII Remake Pic

Offline AGKorson

Re: WinAGI Version 3.0.0-alpha8.0
« Reply #14 on: December 20, 2024, 01:22:43 PM »
WinAGI v2.x wont open a project if the wag states it's v3, but changing back to 2.3 allows it to open again. I assume things would break if you've updated the extended characters in logics. Otherwise, are v2 and v3 projects really incompatible or does WinAGI 2 just not expect a version 3 to be valid?
As of right now the change in extended character support is the only incompatibility.  Changing the version property back to 2.3 is the correct way to revert the WAG file. 
But you are correct in that if you updated your logic source files to v3 any extended characters will display incorrectly in v2. You will need to manually correct them inside WinAGI v2 to revert them.

I'm not planning on creating any standalone converters. But I can add a feature so the v2 logics get archived/backed up prior to being updated to v3. I probably should have included that from the beginning.



SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.112 seconds with 23 queries.