Showing posts with label Feature. Show all posts
Showing posts with label Feature. Show all posts

Unfortunately, revision 102 is not the big network release I'd hoped it would be. I'll talk more about networking after the revision 102 parts. (seperate post)

I fixed a bug that was reported on the Bugs part of the wiki (thanks for whoever added that), Also, while testing my next export for excel stats, I found that loading a deck didn't display in the titlebar, and also requested you to save, even though you didn't change anything. So those are fixed too.

I was playing around with Magic Set Editor, and found their statistics to be pretty cool. So I suggested that they maybe fork that part of the project to create more of their nice statistics. I was told no go. For me... the thing about stats is that it's not so easy to program graphs etc. and I already know an application which is pretty good at it... Excel. So I've created an excel spreadsheet which can handle the stats. And added a function in DA to export the stats to a little text file.

So now, via Excel, you can have Mana Curve + Type graphs, or Color + Type (the two I have in by default)... but it's Excel Pivots... just use the data available. You can analyse however you want. I added a column called "mana source" which looks for "add" and "to your mana pool" to check for mana sources. This might be crude, and could sometimes be wrong, but it's a start. Obviously this will not work so 100% if you're using a non-english database. --- Which is kind of a hole...

Revision 102:

C : Lots of "template" code
C : Split the NetSend and NetReceive codes
Fix : Delete from SB button now deletes from SB and does not add to SB (rev 100 fixed the code).
Fix : On deckopen, the filename is now displayed in the deckeditor.
Fix : Loading a file (in deckeditor) no longer makes it dirty. (doesn't prompt for save if you exit without changes)
F : Export tab delimited data to Excel for deck stats (note, it drops it to the folder where the .exe is installed)
F : Added DeckStats.xls to the installs to help with stats (I made it not use macros, for security)

On my wishlist for the deckeditor is the same ol', same ol' mana curve. Hopefully making it look pretty with GLScene, and some cool stacked graphs etc. Anyway... another is to incorporate my Excel "combo" calculator.

For this however, I had to implement the Hyper Geometric Distribution in pascal... I read the wikipedia article... My statistics are a little bit rusty, and I was really struggling. However, I followed the external links, to nerdbucket. He has an implementation for C++ as well as one for Ruby. But what *really* interested me, was the exponent / ln mathematics.

This enabled me to create a decent implementation of Hyper Geometric Distribution for Pascal... and here it follows:

Function lnFactorial(N:Integer):Double;
var i : integer;
aValue : double;
begin
if N = 0 then begin result := 1; exit; end;
aValue := 0;
for i := 1 to N do
aValue := aValue + ln(i);
Result := aValue;
end;


function BinomialCoef(n,k:integer):double;
var aValue : double;
begin
aValue := exp(lnFactorial(n) - (lnFactorial(k) + lnFactorial(n-k)));
BinomialCoef:=aValue;
end;

Function HypGeomDist(RequiredHits, PopulationSize, Targets, Attempts:integer):double;
begin
Result :=
BinomialCoef
(Targets,RequiredHits)
*
BinomialCoef
(PopulationSize-Targets,Attempts - RequiredHits)
/
BinomialCoef
(PopulationSize,Attempts);
end;

Please consider the code as public domain.

For the next revision (still to come out - will release when 0.9.26 is done) searching on colors for the deck editor has been improved.

Previously if you selected "White, Green, Gold, Mono-colored", then the mono-colored would take preference above Gold, and you would only find Mono-White and Mono-Green cards. Now, mono-colored and gold work together. This means, searching for "White, Green, Gold, Mono-colored" will return Mono-White cards, Mono-Green cards, and gold cards that are ONLY green and white. Another change, sees that it also adds all Hybrid-White, and Hybrid-Green cards to it. It assumes that any hybrid card can cast that as a "mono" color. (PLEASE let me know if this is not true!)

So as for color searching in Daring Apprentice... the only thing that remains are for understanding split cards... (ie. finding Fire/Ice on a mono-blue, or mono-red search).

At the moment it understands it as a gold card with colors Blue and Red.

Well, this revision started actually as a bugfix for what the new P2 docking broke, but grew into some other changes too. Crossbuilder updated GLscene so that I can now output the card's names etc. to "canvas". This prompted quite a bit of work into the linux binary, which is now pretty much as playable as the windows one.

I do not know what is the requirements for the linux binary, but it's compiled as a GTK1 widgetset, so I assume you'll need that.

I also hung around quite a bit on #lazarus-ide@irc.freenode.net (IRC Channel) and found out how to launch a browser process in WinXP. So now windows users will be able to view the local help (or go to the website / helpsite) from the help menu. To be tested in Vista of course, and other versions of windows too.

Revision 95:
Fix : Messages should only report the cardname on a random discard, not the casting cost as well
Fix : When closing the application, the docked hand must be undocked first, to prevent a crash
M : About box now has an added tab
M : Camera changes will always wait 1 second before saving now (giving you smoother changes)
F : For linux: Card names and all other texts are now drawn too (does not use GLSpaceText)
F : For windows: Help files can now be opened from the help menu
M : New linux binary uploaded

For this revision, I've added a very cool feature - tilting the camera - and I enabled the docking of the player 2 hand (at the moment it is not optional). The draw card functionality etc. has now shifted a little in the user interface, so that the opponent hand and the player hand works the same way. I've added a screenshot:

In the background I've been working on my test application for networking code, and I made great progress last night. As soon as I have a prototype, I'll post more on it here. You can have a look at the concept here.


Revision 94:
UF : Player2's hand now docks. (This may change for network!)
F : Random Discard implemented
F : You can now change the angle of the camera as well
M : Found the textures readme again

Basically the only change is that I implemented Attaching. And it works (the first card selected is the "base" card) - Please test multiple attachments (ie. 1 Creature with Jitte and Moldervine cloak), as well as nested attachments (1 Creature with Jitte, with Faith's fetters on Jitte) for me, as I am not much of a tester.

The story of how I figured it out is interesting:

I figured out how to do it while I was - as it often happens - trying to explain to someone else what I want to do, and trying to understand why it didn't work.

Initially when I implemented attaching... The card would lie very nicely next to his mate... but then, when I tap it, the attached card would also tap... Which is how many players play... but it is wrong. So what I had was "inherited everything" what I wanted was "Inherited position", but not roll, or pitch etc.

Or the way I explained it... I want to have two mouse wheels, able to turn independantly, connected with a pipe... not a mouse wheel, with one long spoke with another mousewheel attached to it.

So all I did effectively... was to create an imaginary box above the "main" card, and then when you move the main card, you instead move the box above it, and both the children cards (the main card, and the attachee) are then also move. You can at the moment move the child card independantly - which is the way I wanted it initially.

Older Posts Home

Blogger Template by Blogcrowds.