These are chat archives for ZaneDubya/UltimaXNA

10th
Jun 2015
Jeff Boulanger
@jeffboulanger
Jun 10 2015 05:45
@ZaneDubya I used 5551 for paradox, tested and it works with everything, including fonts. I think UltimaXNA should definately use 5551 over the 32 bit conversion purely for memory and performance gains.
Zane Wagner
@ZaneDubya
Jun 10 2015 10:41
Ok, I'm convinced :wink:
#192 is the issue for tracking conversion from 8888 to 5551.
Zane Wagner
@ZaneDubya
Jun 10 2015 12:47
Done! Implemented in PR #193.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 14:05
@ZaneDubya so you like parallels? I have a MacBook but only 8gb or memory so running OS X +parallels is a bit tough cause of the speed :(
Zane Wagner
@ZaneDubya
Jun 10 2015 14:21
Interesting! I have the same set up and it works fine; I give Windows 2gb.
And 2 cores.
I can't imagine that my laptop is faster than yours; 2013 1.3ghz i5 over here.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 15:27
Mines the early 2013 MacBook Pro 13". Probably pretty close. I also just realized I was thinking of VMware fusion, not parallels :)
Zane Wagner
@ZaneDubya
Jun 10 2015 15:34
I can't say I have any experience with VMware - I read reviews in 2007 that said Parallels was the better product, and I've stayed loyal since. :)
Zane Wagner
@ZaneDubya
Jun 10 2015 15:53
Hmm. It's not really loyalty though. It's more sort of 'not dissatisfied with the last version, I get a 25% off coupon to upgrade, might as well stick with what I know' kind of reasoning.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:05
haha ya i got that too cause i bought it at some point
oh, i know what my complaint was
i bootcamped my drive
and parallels would load that bootcamp partition but it wouldnt if it was in hibernation, which pretty much made me stop using it
im sure its better now, its been a while
Zane Wagner
@ZaneDubya
Jun 10 2015 16:06
Right?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:06
ill have to give it another shot
Zane Wagner
@ZaneDubya
Jun 10 2015 16:06
Ah yeah, I could never get bootcamp and parallels to work 100%
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:07
ah ya see thats a bummer
Zane Wagner
@ZaneDubya
Jun 10 2015 16:07
So I gave up and went 100% parallels. Sucks for gaming - not mac's strong suit anyways, I've kinda given up on it.
That's why I like uo so much. Not a big resource hog. And (with regards to textures) 50% less so, as of this morning. BGRA5551 was easy to implement - good call!
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:08
nice, is it noticeable in task manager?
Zane Wagner
@ZaneDubya
Jun 10 2015 16:12
You know, I hadn't checked. I'm sure it is though.
I remember reading once that tracking memory usage of a c# application is possible. Don't know the API offhand, not that it's important...
... I wonder if it's also possible to track GPU memory allocation?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:13
look up Pix
granted
A replacement for the PIX for Windows tool is now a feature in Microsoft Visual Studio, called Visual Studio Graphics Debugger
lol
Zane Wagner
@ZaneDubya
Jun 10 2015 16:17
Ah, express for windows desktop doesn't support that. But express for windows does...
... but just 'for windows' doesn't support Win7.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:19
what version of visual studio are you using?
Zane Wagner
@ZaneDubya
Jun 10 2015 16:19
'express for windows desktop'. Free version.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:19
ah
2013?
Zane Wagner
@ZaneDubya
Jun 10 2015 16:19
Yes.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:20
you cna still use pix
its part of the dx sdk
wow
i did not expect that to happen
Zane Wagner
@ZaneDubya
Jun 10 2015 16:22
This gitter app is pretty slick.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:22
ya
Zane Wagner
@ZaneDubya
Jun 10 2015 16:43
Spell books are 'containers'.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:43
yes
according to RunUO ;)
cause you can drop things on them
like spells ;)
Zane Wagner
@ZaneDubya
Jun 10 2015 16:43
Ohhhhh I get it now...
Gotcha.
When you dblclick a spell book, RunUO first tells you to open the container, and THEN sends a packet letting you know that the container is a spell book with xxxx data.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:44
ya
its an int64 bit flag
Zane Wagner
@ZaneDubya
Jun 10 2015 16:44
So how should I defer opening containers until I know whether or not they're actually books, not containers?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:45
inheritence?
Container -> SpellBook
Container -> Book
override whatever methods you need to display something
Zane Wagner
@ZaneDubya
Jun 10 2015 16:46
The problem is that when RunUO sends the first message (open this container!) I don't know if the object associated with that container is a spell book... I need the second message to make that determination...
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:46
I dunno the uxna structure for that atm
you know from the item id
Zane Wagner
@ZaneDubya
Jun 10 2015 16:46
Hm.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:46
im assuming there is another way to find that out maybe
maybe some sort of tiledata or flag
when you get the item from the server, you can create it like you do now, but make 2 new classes, 1 for spellbook, and 1 for book.
for now use the item ids
to know what they are, or what to construct
Zane Wagner
@ZaneDubya
Jun 10 2015 16:49
That's a good solution. K.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:49
for books
public BrownBook() : base( 0xFEF )
0xFEF being the id
Zane Wagner
@ZaneDubya
Jun 10 2015 16:49
nice.
I've looked at all the books, they don't uniformly share any bit flags.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:50
ya
Zane Wagner
@ZaneDubya
Jun 10 2015 16:50
So your solution - using itemids - is probably for the best...
lol, I wonder if broadsword is continually frustrated at all the weird data that they have to deal with, or if at some point someone took the time to fix up the data - perhaps after the new resource format was introduced? :)
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:51
whos broadsword?
Zane Wagner
@ZaneDubya
Jun 10 2015 16:52
The company that is managing operations for UO now.
I think they're an offshoot of mythic.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:52
oh
do they still update the 2d client?
Zane Wagner
@ZaneDubya
Jun 10 2015 16:54
Can't be 100% certain, but based on the UO wiki, it looks like the 'Classic' client is still supported.
Yup, last updated Apr 2, 2015.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 16:56
crazy
Zane Wagner
@ZaneDubya
Jun 10 2015 16:57
It's certainly in the running for the longest continually supported game program in history.
18 years.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:03
ya i wonder if they make money off it
imagine being a developer on the legacy client
what a dead end job
Zane Wagner
@ZaneDubya
Jun 10 2015 17:06
:(
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:15
man i love extension methods
original
    private void printSignatureSection()
    {
        var table = new PrintTableSection(Document.MarginBounds.Left, Document.MarginBounds.Width, false, false);

        table.Columns.Add(new PrintColumn("", 50, PrintStyles.DataValue));
        table.Columns.Add(new PrintColumn("", 50, PrintStyles.DataValue));

        var row = new PrintRow();
        row.CellList.Add(new ImagePrintCell(table.Columns[1], 0, 0, _descriptor.Signature, (1.03f * Document.PrintableHeightRatio), ImageStretch.UniformToFill));

        table.Rows.Add(row);

        Document.FooterSections.Add(table);
        Document.FooterSections.Add(new PrintSpacerSection(0.1f * Document.PrintableHeightRatio));

    }
    private void printSignatureSection()
    {
        var table = Document.BodySections.CreateTable(Document.MarginBounds.Left, Document.MarginBounds.Width, false, false);

        table.AddColumn(0.50)
            .AddColumn(0.50)
            .CreateRow()
            .AddImageCell(table, 1, 0, 0, _descriptor.Signature, (1.03f * Document.PrintableHeightRatio), ImageStretch.UniformToFill);

        Document.BodySections.AddSpacer(0.1f * Document.PrintableHeightRatio);
    }
dont with extension methods ;)
done*
and fluent design pattern
like LINQ ;)
Zane Wagner
@ZaneDubya
Jun 10 2015 17:22
I love that formatting! This is so much better than google talk.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:22
ya and no jelly
Zane Wagner
@ZaneDubya
Jun 10 2015 17:22
Niiiiiice
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:22
:clap:
Zane Wagner
@ZaneDubya
Jun 10 2015 17:22
2nd looks a ton cleaner.
Same performance?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:23
probably close, maybe slower, but its just running 1 time when you click print on the report
so i really dont care
;)
Zane Wagner
@ZaneDubya
Jun 10 2015 17:23
Ha!
That's a good point... I just realized I have been inappropriately focusing on performance everywhere, where it only matters in a very small amount of code.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:26
haha ya
its tough to remember
check out this change
    private void printCustomerInformationSection()
    {
        var printTable = new PrintTableSection(Document.MarginBounds.Left, Document.MarginBounds.Width);

        printTable.AddColumn(0.50);

        var row = new PrintRow();

        row.CellList.Add(new PrintCell(printTable.Columns[0], PrintStyles.DataValue, DateTime.Now.Date.ToString("MM/dd/yyyy")));

        if (!_descriptor.VehicleDescription.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[1], PrintStyles.DataValueRightAligned, string.Concat("VEHICLE: ", _descriptor.VehicleDescription)));
        }

        printTable.Rows.Add(row);

        row = new PrintRow();

        if (!_descriptor.Vin.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[1], PrintStyles.DataValueRightAligned, string.Concat("VIN: ", _descriptor.Vin)));
        }

        printTable.Rows.Add(row);

        row = new PrintRow();

        if (!_descriptor.CustomerName.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[0], PrintStyles.DataValue, _descriptor.CustomerName));
        }

        if (!_descriptor.RepairOrderNumber.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[1], PrintStyles.DataValueRightAligned, string.Concat("RO#: ", _descriptor.RepairOrderNumber)));
        }

        printTable.Rows.Add(row);

        row = new PrintRow();

        if (!_descriptor.StreetAddress.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[0], PrintStyles.DataValue, _descriptor.StreetAddress));
        }

        if (!_descriptor.ClaimNumber.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[0], PrintStyles.DataValue, string.Concat("CLAIM #: ", _descriptor.ClaimNumber));
        }

        printTable.Rows.Add(row);

        row = new PrintRow();

        if (!_descriptor.CityStateZip.IsNullOrEmpty())
        {
            row.CellList.Add(new PrintCell(printTable.Columns[0], PrintStyles.DataValue, _descriptor.CityStateZip));
        }

        row.CellList.Add(new PrintCell(printTable.Columns[1], PrintStyles.DataValueRightAligned, string.Concat("TOTAL: $", _descriptor.EstimateTotal.ToString("#,0.00"))));

        printTable.Rows.Add(row);

        Document.BodySections.Add(printTable);
    }
transformed to
    private void printCustomerInformationSection()
    {
        var table = Document.BodySections.CreateTable(Document.MarginBounds.Left, Document.MarginBounds.Width);

        table.AddColumn(0.5).AddColumn(0.5);

        table.CreateRow()
            .AddCell(table, 0, PrintStyles.DataValue, DateTime.Now.Date.ToString("MM/dd/yyyy"))
            .AddCellIfNotNullOrEmpty(table, 1, PrintStyles.DataValueRightAligned, string.Concat("VEHICLE: ", _descriptor.VehicleDescription));

        table.CreateRow()
            .AddCellIfNotNullOrEmpty(table, 1, PrintStyles.DataValueRightAligned, string.Concat("VIN: ", _descriptor.Vin));

        table.CreateRow()
            .AddCellIfNotNullOrEmpty(table, 0, PrintStyles.DataValue, _descriptor.CustomerName)
            .AddCellIfNotNullOrEmpty(table, 1, PrintStyles.DataValueRightAligned, string.Concat("RO #: ", _descriptor.RepairOrderNumber));

        table.CreateRow()
            .AddCellIfNotNullOrEmpty(table, 0, PrintStyles.DataValue, _descriptor.StreetAddress)
            .AddCellIfNotNullOrEmpty(table, 1, PrintStyles.DataValueRightAligned, string.Concat("CLAIM #: ", _descriptor.ClaimNumber));


        table.CreateRow()
            .AddCellIfNotNullOrEmpty(table, 0, PrintStyles.DataValueRightAligned, _descriptor.CityStateZip)
            .AddCell(table, 1, PrintStyles.DataValue, string.Concat("TOTAL: $", _descriptor.EstimateTotal.ToString("#,0.00"));
    }
Zane Wagner
@ZaneDubya
Jun 10 2015 17:26
2nd is much more readable tbh.
I like it.
For the spell books...
Hmmm.
I have zero interest in implementing anything but the standard magic spell book.
I hope someone else implements necro/spellweaving/etc., because I have no idea how those work.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:29
haha, i'd imagine they are exactly the same
2nd image is not necro
its whatever the "crusader" spell book is called
oposite to necromancy
but they work the same as the original
Chivalry
Zane Wagner
@ZaneDubya
Jun 10 2015 17:38
Nice! If they're that similar, then it'll be that much easier for someone else to do it ;)
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:38
haha
Zane Wagner
@ZaneDubya
Jun 10 2015 17:38
They can just build off of the base spell book class.
Zane Wagner
@ZaneDubya
Jun 10 2015 17:49
@jeffboulanger - better way to do this?
T InternalCreateEntity<T>(Serial serial) where T : AEntity
{
AEntity e;
Type t = typeof(T);
switch (t.Name)
{
case "Item":
e = new Item(serial, m_Model.Map);
break;
case "Container":
e = new Container(serial, m_Model.Map);
break;
case "SpellBook":
e = new SpellBook(serial, m_Model.Map);
case "Mobile":
e = new Mobile(serial, m_Model.Map);
break;
case "PlayerMobile":
e = new PlayerMobile(serial, m_Model.Map);
break;
case "Corpse":
e = new Corpse(serial, m_Model.Map);
break;
case "Multi":
e = new Multi(serial, m_Model.Map);
break;
default:
throw new Exception("Unknown addObject type!");
}
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:49
you take the same interest in UO as I do, i do not recognize anything after UOR as Ultima
Zane Wagner
@ZaneDubya
Jun 10 2015 17:49
formatting :(
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:50
easy
get rid of those constructors
;)
Zane Wagner
@ZaneDubya
Jun 10 2015 17:50
haha
how?
Some kind of reflection magic?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:50
no i mean, make each of those have a ctor that is empty
Corpse()
Multi()
Zane Wagner
@ZaneDubya
Jun 10 2015 17:51
Oh ---
Gotcha.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 17:51
btw
it didnt format cause you forgot a }
    private T InternalCreateEntity<T>(Serial serial) where T : AEntity, new()
    {
        T entity = new T();

        entity.Serial = serial;
        entity.Map = m_Model.Map;

        return entity;
    }
Zane Wagner
@ZaneDubya
Jun 10 2015 17:53
Ok!
Zane Wagner
@ZaneDubya
Jun 10 2015 18:27
Complete aside - almost hypothetical question - I wonder how much of RunUO would remain if one had only a very basic feature set. Say, only UOR, targeting a known client.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 18:27
1/2 the scripts (if not more) would not be necessary
i tried to do that 1 time
Zane Wagner
@ZaneDubya
Jun 10 2015 18:28
how long did you spend on it? What caused you to stop?
Jeff Boulanger
@jeffboulanger
Jun 10 2015 18:34
a day, and it started to realize i didnt care lol
i actually have the source code to rebirth, which was based on RunUO R35 i think, which was before all the expansion stuff was done.
its tiny
rebirth was UO back in 1997
before T2A
so like 2 minute bandage timers (but they instantly heal, so more like a cooldown)
skill and stat atrophy
house looting
no skill locks, no stat locks
anatomy and eval int, didnt help any skills
basically everyone was a tank mage
;)
those were the days
Zane Wagner
@ZaneDubya
Jun 10 2015 18:42
House looting. Dear god, yes. Finding a key in a corpse's backpack was the most exciting thing in the world.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 18:42
ya, i was a thief, i stole a lot of keys ;)
i use to scam ppl into buying a house that wasnt mine too
Zane Wagner
@ZaneDubya
Jun 10 2015 18:43
HAHA
That's great.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 18:43
before they had the secure trading
i was a crook
lol
Zane Wagner
@ZaneDubya
Jun 10 2015 18:44
I fell for every trick in the book. At least once. And then I passed those tricks on by playing them on other people.
Cake in the street? Ate it. And then left many more behind, also poisoned, for others. ;)
Trapped boxes too!
That game was so horrible and fun.
Jeff Boulanger
@jeffboulanger
Jun 10 2015 18:46
haha ya
i remember taking trapped boxes to another level when t2a came out
i would stealth into ppls houses with a trapped box that looked like a box most ppl had in their house
then wait for them to logout
or get on another character
and drop it somewhere in the house
wait for them to dbl click it
;)
it was just more likely someone would do it in their house
Jeff Boulanger
@jeffboulanger
Jun 10 2015 19:02
i use to go to the lich room in deceit, and stealth into the door, back then you couldnt walk over a stealth person if you didnt have 100% stamina. Most people trying to run out of the room were getting chased by either a lich, or a pk, and either way, they were hit 1x so their stamina was not 100%. So I would bloc kthem, and they would die, and I would loot and recall out lol
Zane Wagner
@ZaneDubya
Jun 10 2015 19:07
HAHA
So much griefing!
Jeff Boulanger
@jeffboulanger
Jun 10 2015 19:07
ya i was pretty mean looking back lol
i literally did the door blocking thing in different dungeons for like 2 years lol
i had so many vanqs cause of it
and made so much money
Zane Wagner
@ZaneDubya
Jun 10 2015 19:09
Would you play that kind of game today? I don't think I would - it's too easy to take advantage of people - that includes me!
Jeff Boulanger
@jeffboulanger
Jun 10 2015 19:12
theres no game like that today cause to many ppl complain
Zane Wagner
@ZaneDubya
Jun 10 2015 19:12
And rightly so ;)