So that means only 2.33 months left to program the game into alpha testing for net play. (I've told some of the people who follow the game that I want to be able to have it playable by the end of 2008) Oooh... I am putting pressure on myself. But it's a good thing.

Anyway, at the moment, with the new compiler, DA for linux is not even getting to the main screen. So my first priority is to get that working again. Also on linux Lazarus default development widgetset is gtk2, which will give me a sexier interface than gtk1, but that might be the blame for the non-starting too.

On windows my SVN lazarus (I am going to continue to use lazarus SVN now, as well as glscene SVN) is not rebuilding yet. It is because the compiler is trying to recompile stuff where he only needs to look at the .ppu files. Anyway, so I have some groundwork to be done to actually get it working.

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.

I hate to use this as my excuse, but it really is my main motivator (demotivator?) that I am not continuing at the moment...

Lazarus 0.9.26 is a week or two away, and I'll be getting it when it's hot to start developing Daring Apprentice 0.9.26... (or whatever I'll call the first "release").

I am fairly happy with the way the design of the network play is going now... except for the decks... at first I wanted the server to keep track of the decks, but now I think I'll only let the tournament server do that... You don't want the player in the 1-on-1 game to know your deck just because he's the server.

For the tournament server, you'll need to log in and select your deck from your own little profile thingy on the server. (Which you uploaded)

Although I still don't mind the idea that you can get the other guy's deck if you want it... But functionality must be very limited as it is probably a vulnerability.

Neoshroom (Ryan Davis) who was one of the original authors and maintainers of Apprentice has contacted me. He basically said that the project is neat, and he's glad I kept references to Apprentice.

I'll be hopefully getting some input from him here and there, and this really encourages me to keep at the networking until we have a version 1.0 on the table.

Newer Posts Older Posts Home

Blogger Template by Blogcrowds.