Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

My very late 1KRL game

5 views
Skip to first unread message

Ralph Versteegen

unread,
Sep 5, 2008, 2:59:47 PM9/5/08
to
Hi all,

I've finally completed my 1krl! This is also my first rogue-like game,
and my first completed game.

It's written in 1024 bytes of FreeBASIC, and needs version 0.15b or
earlier (rather old) to compile. I don't know why, FB is very fond of
making up error messages, and of changing rules between versions.

Since it took me forever to finish it I'm calling it About Time (and
as justification, there is a time pausing item).

Use the numpad to move, with numlock on. The objective is to make it
down 5 levels of the tower to escape. But the downstairs on most
levels are hidden! That is, you must interact with the objects on the
map. You're also given a score when you die or escape. I'm afraid I
couldn't make proper puzzles out of reaching the exit, I had to cut
stuff to make the mark. Still, I hope I achieved some small level of
replayability, and an impressive number of features.

Screenshots:
http://tmc.castleparadox.com/abouttime/shot0.png
http://tmc.castleparadox.com/abouttime/shot1.png


Map features:
s An animated skeleton. Moves randomly slowly towards you. Harmless on
their own, but numerous
% A key
+ (brown) A door. Skeletons can't follow you through them
+ (purple) A locked door. Expend a key to unlock
( A locked chest. Expend a key to reveal something
/ A lever. Modifies the level in some way, sometimes bad (9 different
effects)
? A scroll of Mapping. Can have one of 3 different effects
! Potion of Healing. Cures 6 HP
$ A gold coin. Increases your final score
> (white) Downstairs. No return
> (red) Teleport. Sends you to a random spot (different every time)
O A time portal. Stepping into it pauses everything (that is, the
enemies) for a little while

Status line:
H: HP
K: Keys
$: Gold
L: Level


Linux binary:
http://tmc.castleparadox.com/abouttime/abouttime.tar

Windows binary:
http://tmc.castleparadox.com/abouttime/abouttime.zip

Source:
#define W #define
W B(q):for i=0 to a:j=i\61:k=i U 61:q:next:
W T(q,r,s):v=q:if v then r else s end if:
W N and
W R*rnd
W U mod
W L m(p)
W C m(i)
W RM(m,o)(o\6>=(m-1)\6N(o-1)\6<=m\6)
W H T(v-1,:,:
W G:z=p:L=0
W S:while L:p=a r:wend
randomize:cls:a=1159:y=65:d=3
1:dim m(a),o(a)B(T((k U 6)*(j U 6),T(1r^7,C=8,C=1r^4:C*=((5+9r\1)^(7r
\1)+6)U 15)C+=C*bit(1634,C),T(k U 60N j U 18>0N(p+i)U 5=0,p
+=1r:C=5+0.6r,C=9)))S:x=p:L=f*2 U 6+11S G:while f<5B(T(C=8N q<1,p=i
+sgn((z U 61)-k)r+(sgn(z\61-j)r\1)*61T(p=z,y-
=6R,T(L, ,L=8:C=0)), ))locate 1,1,0B(p=RM((z U 61),k)N-RM(z
\61,j)T(k, ,?)T(z=i,v=10,v=C)o(i)or=p:color v*o(i)N(q>0)+8*p+7:?
mid(" ?O>++%s#@(!/$>",v+1,1);)color
7:?"H";y,"K";d,"$";e,"L";f:T(y>0,v=getkey-49:p=z+bit(73,v)-
bit(292,v)-61*bit(455,v)*sgn(5-v),?"DEAD";f*25+e*4:end:)v=L+1H G)H)H
T(-2r,B(o(i)=2+v),o(x)=1)G)H q=14G)q-=1H S G)H T(d>0,d-=1G+6, ))H G
+6)H d+=1G)H L*=7r\5)H)H)H T(d>0,d-=1T(x=p,L=15,L=(5R+10)U 13+2), ))H y
+=6G)H L=0T(x=p,p=0S:x=p:L=15,p=7R:B(C+=C=p+1N 1R)))H e+=1G)H f
+=1:goto 1)wend:?"WON!";99+y+e*6

or get at http://tmc.castleparadox.com/abouttime/abouttime.bas

For spoilers and a little documentation of the source, see
http://tmc.castleparadox.com/abouttime/vars.txt

Otto Grimwald

unread,
Sep 5, 2008, 5:13:58 PM9/5/08
to
Hello

Ralph Versteegen wrote:

> It's written in 1024 bytes of FreeBASIC, and needs version 0.15b or
> earlier (rather old) to compile. I don't know why, FB is very fond of
> making up error messages, and of changing rules between versions.

I have only 0.2 version of freebasic. Isn't it possible to adapt the
code to the newest version ?

> Linux binary:
> http://tmc.castleparadox.com/abouttime/abouttime.tar

./abouttime: error while loading shared libraries: libtinfo.so.5: cannot
open shared object file: No such file or directory

I don't know where this libtinfo could come from. I have ncurses 5.6-8
on my system.

Darren Grey

unread,
Sep 5, 2008, 4:25:36 PM9/5/08
to
On Sep 5, 7:59 pm, Ralph Versteegen <TeeEm...@gmail.com> wrote:
> Hi all,
>
> I've finally completed my 1krl! This is also my first rogue-like game,
> and my first completed game.

<snip>

Just completed this and I must say I was impressed. It's fiendishly
difficult, reasonably varied, and most impressively of all it looks
really nice with a lot of cool colour effects. Hard to believe you
managed this in 1k - well done!

--
Darren Grey

Ralph Versteegen

unread,
Sep 5, 2008, 4:39:11 PM9/5/08
to
On Sep 6, 9:13 am, Otto Grimwald

Ah ha. I finally figured out how to get it to compile with FB0.20, and
it's still 1024 bytes in size. The only change is to the T macro,
though strangely it still doesn't compile with FB0.17. I updated the
files.

No idea about libtinfo, it seems to be a subset of ncurses, but is
required by FB0.20 console executables as well?

Michal Bielinski

unread,
Sep 5, 2008, 5:53:33 PM9/5/08
to
On Fri, 05 Sep 2008 22:39:11 +0200, Ralph Versteegen wrote:
> On Sep 6, 9:13 am, Otto Grimwald
> <contact_is_on_webs...@anamnese.fr.st> wrote:
>> Ralph Versteegen wrote:
>> > Linux binary:
>> >http://tmc.castleparadox.com/abouttime/abouttime.tar
>>
>> ./abouttime: error while loading shared libraries: libtinfo.so.5: cannot
>> open shared object file: No such file or directory
>>
>> I don't know where this libtinfo could come from. I have ncurses 5.6-8
>> on my system.
>
> No idea about libtinfo, it seems to be a subset of ncurses, but is
> required by FB0.20 console executables as well?

It is part of older version of ncurses. 5.6-19 seems to be last version
featuring libtinfo. Could you please check your version of ncurses? I have
got 5.6-8 on my system too and same problem.
--
Michal Bielinski

dickey

unread,
Sep 5, 2008, 6:13:50 PM9/5/08
to

libtinfo is part of one of the supported configurations of ncurses.
Whether you have it on your system depends on how ncurses was
configured.

--
Thomas E. Dickey <dic...@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net

Michal Bielinski

unread,
Sep 5, 2008, 6:20:39 PM9/5/08
to
On Sat, 06 Sep 2008 00:13:50 +0200, dickey wrote:
> On Sep 5, 5:53 pm, "Michal Bielinski" <Dungeon_Kee...@tlen.pl> wrote:
>> It is part of older version of ncurses. 5.6-19 seems to be last version
>> featuring libtinfo. Could you please check your version of ncurses? I have
>> got 5.6-8 on my system too and same problem.
>
> libtinfo is part of one of the supported configurations of ncurses.
> Whether you have it on your system depends on how ncurses was
> configured.

I went around this by downloading Free BASIC and compiling the game myself but
thank you for explanation. Now I do not have to get libtinfo and can play; sheep
is whole and wolf is fed at the same time.
--
Michal Bielinski

Otto Grimwald

unread,
Sep 6, 2008, 3:57:49 AM9/6/08
to
I still can't compile it. I got:

fbc abouttime.bas

abouttime.bas(13) error 41: Variable not declared, a in
'randomize:cls:a=1159:y=65:d=3'
abouttime.bas(13) error 41: Variable not declared, y in
'randomize:cls:a=1159:y=65:d=3'
abouttime.bas(13) error 41: Variable not declared, d in
'randomize:cls:a=1159:y=65:d=3'
/.../
abouttime.bas(14) error 123: Too many errors, exiting

etc.

my version is:
FreeBASIC Compiler - Version 0.20.0 (08-10-2008) for linux (target:linux)

Ido Yehieli

unread,
Sep 6, 2008, 4:49:49 AM9/6/08
to
On Sep 5, 8:59 pm, Ralph Versteegen <TeeEm...@gmail.com> wrote:
> Hi all,
>
> I've finally completed my 1krl! This is also my first rogue-like game,
> and my first completed game.
<snip>
>
> or get athttp://tmc.castleparadox.com/abouttime/abouttime.bas

>
> For spoilers and a little documentation of the source, seehttp://tmc.castleparadox.com/abouttime/vars.txt

Great work! will it be possible to get a bigger, un-obfuscated
version?

-Ido.

Ralph Versteegen

unread,
Sep 6, 2008, 5:28:30 AM9/6/08
to
On Sep 6, 7:57 pm, Otto Grimwald

Use
fbc -lang deprecated abouttime.bas

Ralph Versteegen

unread,
Sep 6, 2008, 6:56:09 AM9/6/08
to

Here's a bigger, much more obfuscated version: the preprocessor
ouput ;) (with newlines added):
http://tmc.castleparadox.com/abouttime/at_preproc.bas

Alternatively, here's an annotated version:
http://tmc.castleparadox.com/abouttime/at_annotated.bas

What fun would reading unobfuscated code be?

Slash

unread,
Sep 6, 2008, 9:58:16 AM9/6/08
to
On 5 sep, 13:59, Ralph Versteegen <TeeEm...@gmail.com> wrote:
> Hi all,
>
> I've finally completed my 1krl! This is also my first rogue-like game,
> and my first completed game.
>
> It's written in 1024 bytes of FreeBASIC, and needs version 0.15b or
> earlier (rather old) to compile. I don't know why, FB is very fond of
> making up error messages, and of changing rules between versions.
>
> Since it took me forever to finish it I'm calling it About Time (and
> as justification, there is a time pausing item).
>
> Use the numpad to move, with numlock on. The objective is to make it
> down 5 levels of the tower to escape. But the downstairs on most
> levels are hidden! That is, you must interact with the objects on the
> map. You're also given a score when you die or escape. I'm afraid I
> couldn't make proper puzzles out of reaching the exit, I had to cut
> stuff to make the mark. Still, I hope I achieved some small level of
> replayability, and an impressive number of features.
>
> Screenshots:http://tmc.castleparadox.com/abouttime/shot0.pnghttp://tmc.castleparadox.com/abouttime/shot1.png
> or get athttp://tmc.castleparadox.com/abouttime/abouttime.bas

>
> For spoilers and a little documentation of the source, seehttp://tmc.castleparadox.com/abouttime/vars.txt

Pretty cool and complete, congratulations!

Will soon review it for roguetemple.

--
Slashie

Otto Grimwald

unread,
Sep 6, 2008, 12:39:47 PM9/6/08
to
Ralph Versteegen wrote:

> Use
> fbc -lang deprecated abouttime.bas

it's compiling and running perfectly now. Really impressive, and
original at the same time. Congratulations!

It seems it's possible to get stuck (I entered this place from upstairs):
http://anamnese.online.fr/temp/abouttime_stuck.png

Ralph Versteegen

unread,
Sep 8, 2008, 9:09:45 AM9/8/08
to
On Sep 7, 5:39 am, Otto Grimwald

Thanks!

Yeah, this can rarely happen. I was generating an extra line of doors
along the middle row, but took it out for lack of room (5 bytes). I
was hoping that there would usually be teleports on each side, but I
guess I also reduced the number of teleports since then. There must be
some cleverer way to place the doors.

0 new messages