Chaosforge Forum

  • October 31, 2024, 18:00
  • Welcome, Guest
Please login or register.



Login with username, password and session length
Pages: 1 [2]  All

Author Topic: "Destroy" method override in Vnode?..  (Read 29079 times)

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: "Destroy" method override in Vnode?..
« Reply #15 on: January 06, 2008, 13:39 »

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 ^^
Logged
at your service,
Kornel Kisielewicz

Igor Savin

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 180
    • View Profile
Re: "Destroy" method override in Vnode?..
« Reply #16 on: January 06, 2008, 13:57 »

\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?
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: "Destroy" method override in Vnode?..
« Reply #17 on: January 06, 2008, 16:19 »

\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".
GenRogue might ^^

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?
Yep.

Try this:
Code: (delphi) [Select]
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.

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
Logged
at your service,
Kornel Kisielewicz

Igor Savin

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 180
    • View Profile
Re: "Destroy" method override in Vnode?..
« Reply #18 on: January 06, 2008, 16:55 »

OK, I'll try it tomorrow (actually, today) after the exam - H-Hour is rapidly approaching :).
Logged

Igor Savin

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 180
    • View Profile
Re: "Destroy" method override in Vnode?..
« Reply #19 on: January 07, 2008, 10:01 »

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)
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: "Destroy" method override in Vnode?..
« Reply #20 on: January 07, 2008, 11:45 »

Do you use FPC 2.2.0?
Logged
at your service,
Kornel Kisielewicz

Igor Savin

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 180
    • View Profile
Re: "Destroy" method override in Vnode?..
« Reply #21 on: January 07, 2008, 13:41 »

Lazarus 0.9.24 (11-14-2007) - fpc 2.2.0
Logged

Kornel Kisielewicz

  • God Hand
  • Apostle
  • *
  • *
  • Offline Offline
  • Posts: 4576
    • View Profile
    • http://chaosforge.org/
Re: "Destroy" method override in Vnode?..
« Reply #22 on: January 07, 2008, 20:20 »

Check you Compiler options.../Parsing/Syntax Options -- the only ones I have checked are Delphi 2 extensions, C Sty;e operators, Allow Label, and C++ style inline. If that helps, I'll put all the options into the valkyrie files so next time you will be able to set the options as you wish.
Logged
at your service,
Kornel Kisielewicz

Igor Savin

  • Elder Chaos Guard
  • Second Lieutenant
  • *
  • *
  • Offline Offline
  • Posts: 180
    • View Profile
Re: "Destroy" method override in Vnode?..
« Reply #23 on: January 08, 2008, 02:06 »

You have no "Use AnsiStrings" turned on?..

Hmmm, anyway, those are the same settings as I have. I'll try it with the latest Lazarus snapshot, maybe it'll help...

\If that helps, I'll put all the options into the valkyrie files so next time you will be able to set the options as you wish\

That'd come handy.
Logged
Pages: 1 [2]  All