Chaosforge Forum

  • April 18, 2024, 16:51
  • Welcome, Guest
Please login or register.



Login with username, password and session length

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Topics - konijn

Pages: [1]
1
FPC Valkyrie / Need to be able to create voutput buffers
« on: March 21, 2007, 19:29 »
That sounds cryptic , but is quite simple ;)

I want to be able to have the map draw to the output, and then for example the inventory writer to an output buffer, and then first I draw the map, and then overlay with the inventory screen buffer.

Also, in my grep results I saw you have a dungeon generator and drunk walking, you need a tutorial on that ;)

Cheers,
T.

2
FPC Valkyrie / Some Pascal Object help
« on: March 15, 2007, 07:15 »
I could find it on Google I guess,
but my questions here could illicit some design advice as well.

I am planning to have door tiles with a door Entity, so that when the player bumps into the door , the door knows it should change the tile it is on to 'open door' and remove itself from the map ( destroy itself ? ).

Now ( starting from the roguelike tutorial ):

- Is it possible to assign 1 door entity to several different cells to save memory ( in that case I would not destroy the entity )
- How do I know if object x is an instance of class y ? What is the keyword in other words ?
- How do I pass the bumper to the entity ( do I use self or this or still some other keyword ? )

if Cells[tx,ty].Entity <> nil then
  Cells[tx,ty].Entity.bump( this or self or myself or what ? )
  exit(False);
end;

-How does one do casting of an object ?

Cheers,
T.

3
FPC Valkyrie / I want a lua tutorial
« on: March 14, 2007, 13:51 »
The compilation speed of fp is driving me nuts!

Its 1992 all over again !

So an alternative I want to look into is lua script plugging ;)

He Who Sheds Light,
T.

4
Hmm,

did I mention that I can get prolific and drive people nuts ;)

Anyways
Code: (delphi) [Select]
,
vtextut.pas:  if Sub   = '' then Output.DrawString(3,25,LightGray,'@BArrows, PgUp, PgDown, Home, End, Escape')
vtextut.pas:                else Output.DrawString(3,25,LightGray,Sub);
vtextut.pas:  if Sub   = '' then Output.DrawString(3,25,LightGray,'@BPress <Enter> or <Escape>...')
vtextut.pas:                else Output.DrawString(3,25,LightGray,Sub);

I modded Valkyrie to work with 50 lines and grep told me that these lines should not use 25 but Output.ScreenSizeY instead ;)

He Who Sheds Light,
T.

Edit : use "delphi" syntax highliting, I modded it so it looks fine on the forum

5
FPC Valkyrie / TimeLine
« on: March 14, 2007, 10:23 »
Hey,

every RL after a bit of tinkering has different speeds, effects that work after a while, and effects which only last a certain amount of time.

So a standard valkyrie object with 2 add methods :
timeline.add( actor , howmanytimeunitsfromnowwillitact? );
timeline.add( actor , whenwillthetimedeffectstartexpressedinunitsoftimefromnow? , whenwillthetimedeffectendexpressedintimeunitsfromthestartofthetimedeffect? )

The first method would add the actor to the timeline-slot, once the timeslot is reached it would call the 'doYourThing' method of the actor

The second method would also add the actor to the timeline-slot, also call 'doYourThing' but then once the actor should stop it would call 'stopYourThing'.

Ofcourse I leave the naming up to you ;)

then finally I would need a timeline.run or something to call from the main method ;)

He Who Sheds Light,
T.



6
FPC Valkyrie / Issues with vutil.pas
« on: March 13, 2007, 14:01 »
vutil.pas(303,14) Error: Illegal expression
vutil.pas(303,14) Error: Illegal expression
vutil.pas(303,14) Fatal: Syntax error, ";" expected but "identifier RANDOM" f
vutil.pas(3,24) Fatal: Compilation aborted

Do I need a special for the random instruction ?

It would be hard to write a roguelike without some randomization ;)

Cheers,T

PS : I downloaded free pascal from the web for windows with the installer and then put my source straight in the valkyrie folder.

Pages: [1]