Coding > FPC Valkyrie
"Destroy" method override in Vnode?..
Kornel Kisielewicz:
Yeah. Insted of 1 microsecond, you'll use 10 microseconds. So your roguelike will not quickly on a PC 386 DX2 -- on the others there will be no difference :P. Come on, we're writing text games here! DiabloRL used to LINEARY check it's WHOLE database each time it wanted any SINGLE attribute. And it was as fast as the others. TBH, you'd need to do some pretty fucked up shit to make a roguelike as slow as Dwarf Fortress :). Anyway, all those Java roguelikes have a massively bigger overhead on *each* operation, and still they work fast, so AnsiStrings are a yes, yes :P.
P.S. BTW, I started work on the GUI classes ^^
Igor Savin:
\Yeah. Insted of 1 microsecond, you'll use 10 microseconds. So your roguelike will not quickly on a PC 386 DX2 -- on the others there will be no difference :P.\
LOL.
\TBH, you'd need to do some pretty fucked up shit to make a roguelike as slow as Dwarf Fortress :).\
I still have to scale BaL's 1 lair, 1 village, 1 army x100 and see what happens (-: Though lags produced will have nothing to do with AnsiStrings...
\Anyway, all those Java roguelikes have a massively bigger overhead on *each* operation, and still they work fast\
We haven't seen JADE yet. It might compete with DF in category "Angel of Sluggishness".
\so AnsiStrings are a yes, yes :P\
*Persuasion roll successful*
\BTW, I started work on the GUI classes\
Ah, now I know their EXACT release date. It's when I finish my own berserk-based implementation :). And they'll be up the same moment I'll check up the forums to brag about it...
\BTW, I started work on the GUI classes ^^\
Like vtextui in the latest SVN?
Kornel Kisielewicz:
--- Quote from: Igor Savin on January 06, 2008, 13:57 ---\Anyway, all those Java roguelikes have a massively bigger overhead on *each* operation, and still they work fast\
We haven't seen JADE yet. It might compete with DF in category "Angel of Sluggishness".
--- End quote ---
GenRogue might ^^
--- Quote from: Igor Savin on January 06, 2008, 13:57 ---Ah, now I know their EXACT release date. It's when I finish my own berserk-based implementation :). And they'll be up the same moment I'll check up the forums to brag about it...
Like vtextui in the latest SVN?
--- End quote ---
Yep.
Try this:
--- Code: (delphi) ---program s;
{$mode objfpc}{$H+}
uses
Classes, SysUtils,
vsystems, vinput, voutput, vtinput, vtoutput,
vtextut, vnode, vtextui, vutil;
var UI : TTextUIArea;
W : TTextWindow;
TM : TTextMenu;
TS : TTextUISeparator;
begin
Systems.Add(Output,TTextModeOutput.Create);
Systems.Add(Input,TTextModeInput.Create);
UI := TTextUIArea.Create(nil);
TTextModeOutput(Output).UI := UI;
TTextWindow.Create( UI, NewRectXY(10,2,50,15) );
W := TTextWindow.Create( UI, NewRectXY(15,4,65,20));
W.Title := 'S*** UI';
TS := TTextUISeparator.Create( W, False{Vertical}, 30 );
TTextContent.Create( TS.Left, 'Welcome to the new not abstract '+
'and fully working Valkyrie text user interface that was specificaly '+
'designed and written for @RS*****@> but will also be used in '+
'other Chaosforge roguelikes.' );
TM := TTextMenu.Create( TS.Right );
TM.Add( 'Option 1' );
TM.Add( 'Option 2' );
TM.Add( 'Option 3' );
TM.Add( 'Option 4', false );
// false means inactive - can't be chosen
TM.Add( 'Option 5' );
TM.Run;
end.
--- End code ---
Works for revision 97
Note that memory management is completely automatic -- we even create anonymous (unnamed) classes! :P Another funny thing is that the interface will be drawn everytime you call Output.Update. The third cool thing is, that to get rid of the window, you just need to call FreeAndNil(W), and that's it xP.
HOWEVER, this is very volatile -- it may change any minute :P
Igor Savin:
OK, I'll try it tomorrow (actually, today) after the exam - H-Hour is rapidly approaching :).
Igor Savin:
E:\Elwin\Yhacking\Pascal\Valk\vtoutput.pas(68,18) Error: There is no method in an ancestor class to be overridden: "TTextModeOutput.ScreenShot(const AnsiString, Byte="0")"
E:\Elwin\Yhacking\Pascal\Valk\vtoutput.pas(70,17) Error: There is no method in an ancestor class to be overridden: "TTextModeOutput.ScreenShotExt(Byte="0"):AnsiString"
\\\
If I comment override out:
E:\Elwin\Yhacking\Pascal\Valk\vrltools.pas(383,47) Error: Incompatible type for arg no. 1: Got "<address of procedure(const ShortString,const ShortString);Register>", expected "<procedure variable type of procedure(const AnsiString,const AnsiString);Register>"
E:\Elwin\Yhacking\Pascal\Valk\vini.pas(346,16) Hint: Found declaration: TINI.QuerySection(TINIFileCallbackProcedure)
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version