[ANNC] B-Venture

G

Guest

Guest
Archived from groups: alt.lang.basic,alt.folklore.computers,comp.lang.basic.misc,rec.games.int-fiction (More info?)

B-Venture (an adventure game in only 2,738 bytes of RAM)
By: Paul Allen Panks (dunric@gmail.com)

I wrote the smallest possible text adventure I could (in just under 2.7KB
of RAM). The total program size is 50 lines of QBASIC code, and requires a
QBasic-compatible BASIC interpreter to play. Does not work under GW-Basic
for some odd reason, but should work fine on QBasic, UBasic and PowerBASIC
for MSDOS.

The game is remarkably large for such a small program, spanning nearly 20
full rooms, with a forest, castle, meadow, lake, town and even a tree you
can climb (where a small hut rests atop a branch). The game verbs include
GO,GET,DROP,USE,INVENTORY,LOOK and others. There is even a fighting mode
where the player can engage other monsters in battle. Although the game is
too small to include statistics for the player, winning each battle raises
the player hit points by 99 with each victory. Items such as the ARMOR,
CLOAK and HELMET protect the player during battle. There is even a SWORD
the player can wield while engaged in combat. Did I mention I squeezed all
of this into only 2,738 bytes of RAM?

The goal of B-Venture is to defeat an evil vampire residing within the
castle. The castle is guarded by a hellish werewolf with fiery eyes and a
mean streak. The rest of the adventure is populated by a few other
creatures, as well as several items the player can use (e.g. armor,
equipment, etc.)

Sincerely,

Paul Allen Panks
dunric@gmail.com

--
panks@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
 
G

Guest

Guest
Archived from groups: alt.lang.basic,alt.folklore.computers,comp.lang.basic.misc,rec.games.int-fiction (More info?)

Oh yes, the download for B-Venture is below:

http://panks.freeshell.org/text.bas

A Commodore 64 version is also available from:

http://panks.freeshell.org/bvent.zip

The source to the game is listed below:

1 DATA
99,99,99,99,99,99,9,16,14,19,5,18,1,9,"NORTH","SOUTH","EAST","WEST","UP","DOWN","HOBBIT","WEREWOLF","DRAGON","VAMPIRE","SWORD","PLATEMAIL","HELMET","CLOAK"
2 DATA
,2,,,,,1,6,3,,,,4,,,2,,,,3,5,,,,,,,4,,,2,12,7,10,,,,,11,6,8,,,,9,,,7,,,,8,,,,,6,,,,,13,,7,,,6,15,,,,,11,,14,,,,,,,13,,,12,16,,,,,15,,,17,,,18,,16,19,,,,17,,,,,,,17,,,
3 DATA"IN A TAVERN","BY A WELL","IN A CHURCH","AT AN ALTAR","IN
STORAGE","NEAR A VILLAGE","BY A TREE","UP THE TREE","IN A HUT","AT A
MOUNTAIN","IN A MEADOW","IN A FOREST","AT A CLEARING","BY A LAKE","ON A
BRIDGE","BY A CASTLE","IN A HALLWAY","IN A ROOM"
4 DATA"BY A
THRONE","GO","GET","DROP","USE","EXAMINE","LOOK","KILL","INVENTORY","QUIT","HELP","ODD
CREATURE","HAS FIERY EYES","HAS TOUGH SCALES","A BLOOD FIEND","BLOOD
SWORD","IRON PLATEMAIL","BRASS HELMET","ELVEN CLOAK"
5 DIM L(25),O$(25),M(25,15),D$(25),DE$(25),VB$(25):FOR X=1 TO 14:READ
L(X):NEXT:FOR X=1 TO 14:READ O$(X):NEXT:FOR X=1 TO 19:FOR Y=1 TO 6:READ
M(X,Y):NEXT Y:NEXT X:S$="SLICED":M$="MISSED"
6 FOR X=1 TO 19:READ D$(X):NEXT:FOR X=1 TO 10:READ VB$(X):NEXT:FOR X=7 TO
14:READ DE$(X):NEXT:CLS:p=125:R=1:?"B-VENTURE":?:?"'CAN YOU SLAY THE
VAMPIRE?'":?
7 ?"YOU ARE ";D$(R):?"< ";:FOR X=1 TO 6:IF M(R,X)>0 THEN? O$(X);" ";
8 NEXT:?">":FOR X=7 TO 14:IF L(X)=R THEN? O$(X);"."
9 NEXT
10
V=0:N=0:Z=0:A$="":XL$="":N$="":V$="":INPUT">",A$:A$=UCASE$(A$):XL$=A$:FOR
X=1 TO LEN(A$):IF MID$(A$,X,1)=" " THEN V$=LEFT$(A$,X-1):Z=X
11 NEXT:N$=MID$(XL$,Z+1):GOSUB 48:FOR X=1 TO 10:V=V+(X AND
V$=VB$(X)):NEXT:FOR X=1 TO 14:N=N+(X AND N$=O$(X)):NEXT
12 ON V GOTO 14,17,19,21,23,7,25,41,46,50
13 GOTO 22
14 IF M(R,N)=0 THEN 22
15 IF R=16 AND N=4 AND L(8)=R THEN?"IT GROWLS,'LEAVE, NOW!'":GOTO 10
16 R=M(R,N):GOTO 7
17 IF N<11 OR L(N)<>R THEN 22
18 L(N)=101:GOTO 21
19 IF N<11 OR L(N)<100 THEN 22
20 L(N)=R
21 ?"OK.":GOTO 10
22 ?"HOW?":GOTO 10
23 IF L(N)<>R AND L(N)<100 THEN 22
24 ? O$(N);":";DE$(N):GOTO 10
25 IF L(N)<>R OR N<7 OR N>10 THEN 22
26 GOSUB 49:T=INT(RND*250)+1
27 GOSUB 49:?">YOU ";:U=2:IF L(11)>99 THEN U=8
28 IF I<5 OR I>6 THEN? M$
29 IF I=5 THEN?"HIT IT":T=T-U*2
30 IF I=6 THEN? S$;" IT":T=T-U*4
31 IF T<1 THEN?"KILLED IT":p=P+99:GOTO 43
32 ?">THEY ";:U=8
33 IF L(12)>99 THEN U=U-3
34 IF L(13)>99 THEN U=U-2
35 IF L(14)>99 THEN U=U-1
36 GOSUB 49:IF I<5 OR I>6 THEN? M$
37 IF I=5 THEN?"HIT YOU":p=P-U*2
38 IF I=6 THEN? S$;" YOU":p=P-U*4
39 IF P<1 THEN?"ENDED YOU":GOTO 46
40 ?"@ HIT A KEY @":GOSUB 47:GOTO 27
41 FOR X=7 TO 14:IF L(X)>100 THEN?" ";O$(X)
42 NEXT:GOTO 10
43 L(N)=99:IF N=10 THEN 45
44 GOTO 10
45 ?"YOU WON!"
46 ?:?"@ GAME OVER @":END
47 A$=INKEY$:IF A$="" THEN 47
48 IF V$="" THEN V$=N$
49 RANDOMIZE TIMER:I=INT(RND*8)+1:RETURN
50 FOR X=1 TO 10:? VB$(X);" ";:NEXT:?:GOTO 10

Sincerely,

Paul Allen Panks
dunric@gmail.com
 
G

Guest

Guest
Archived from groups: rec.games.int-fiction (More info?)

On Fri, 2 Jul 2004 10:26:53 +0000 (UTC), Paul Allen Panks
<panks@sdf.lonestar.org> wrote:

>Oh yes, the download for B-Venture is below:
>
>http://panks.freeshell.org/text.bas
>
>A Commodore 64 version is also available from:
>
>http://panks.freeshell.org/bvent.zip
>
>The source to the game is listed below:
>
>1 DATA
>99,99,99,99,99,99,9,16,14,19,5,18,1,9,"NORTH","SOUTH","EAST","WEST","UP","DOWN","HOBBIT","WEREWOLF","DRAGON","VAMPIRE","SWORD","PLATEMAIL","HELMET","CLOAK"
>2 DATA
[snip]

For pity's sake, please stop posting code at least to rgif. And
regarding raif, it is somewhat customary for people to post code
snippets when they need help debugging, but almost no one posts the
ENTIRE code for a game.

Of course I realize asking you for this token gesture of etiquette is
just pissing in the wind, but what the hey.
 
G

Guest

Guest
Archived from groups: alt.lang.basic,alt.folklore.computers,comp.lang.basic.misc,rec.games.int-fiction (More info?)

Heya Paul.

Paul Allen Panks wrote in message ...
>B-Venture (an adventure game in only 2,738 bytes of RAM)
>By: Paul Allen Panks (dunric@gmail.com)
>
>I wrote the smallest possible text adventure I could (in just under 2.7KB
>of RAM). The total program size is 50 lines of QBASIC code, and requires a
>QBasic-compatible BASIC interpreter to play. Does not work under GW-Basic
>for some odd reason, but should work fine on QBasic, UBasic and PowerBASIC
>for MSDOS.

When you leave out (mismatch at line 10) A$=UCASE$(A$) at line 10 the game
works fine under GWBASIC with CAPSLOCK ON.

Greetz, Katzy.
 
G

Guest

Guest
Archived from groups: alt.lang.basic,alt.folklore.computers,comp.lang.basic.misc,rec.games.int-fiction (More info?)

Weird that GW-Basic lacks a UCASE$ command. I'll try it under UBasic as
well. I know Blassic doesn't like it much, because it failed in Line 5.
Blassic runs over 95% of all GW-Basic programs, at least the ones I've
tried, anyway.

Sincerely,

Paul Allen Panks
dunric@gmail.com

In comp.lang.basic.misc Katzy <katzy@noname.at.all> wrote:
> Heya Paul.

> Paul Allen Panks wrote in message ...
>>B-Venture (an adventure game in only 2,738 bytes of RAM)
>>By: Paul Allen Panks (dunric@gmail.com)
>>
>>I wrote the smallest possible text adventure I could (in just under 2.7KB
>>of RAM). The total program size is 50 lines of QBASIC code, and requires a
>>QBasic-compatible BASIC interpreter to play. Does not work under GW-Basic
>>for some odd reason, but should work fine on QBasic, UBasic and PowerBASIC
>>for MSDOS.

> When you leave out (mismatch at line 10) A$=UCASE$(A$) at line 10 the game
> works fine under GWBASIC with CAPSLOCK ON.

> Greetz, Katzy.



--
panks@sdf.lonestar.org
SDF Public Access UNIX System - http://sdf.lonestar.org
 

julian

Distinguished
Apr 18, 2004
153
0
18,680
Archived from groups: alt.lang.basic,alt.folklore.computers,comp.lang.basic.misc,rec.games.int-fiction (More info?)

Paul Allen Panks wrote:

> Weird that GW-Basic lacks a UCASE$ command. I'll try it under UBasic as
> well. I know Blassic doesn't like it much, because it failed in Line 5.
> Blassic runs over 95% of all GW-Basic programs, at least the ones I've
> tried, anyway.

Blassic has the UPPER$ function that converts his argument to uppercase.
Changing this, my current version of Blassic can run the program. The las
public version probably fails because there is a comma at the end of a DATA
statement. I have corrected this in my work version when a user informed me
of the problem, but I don't have yet released a version with this fix.

In the meantime, you can add "" or 0 after the comma, depending on the type
of the DATA readed.

--
Salu2