Mouse-Driven Interactive Fiction Engine

User contributed sources that have become inactive, deprecated, or generally unusable. But ... we don't really want to throw them away either.
Post Reply
mrToad
Posts: 430
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Mouse-Driven Interactive Fiction Engine

Post by mrToad »

Download source and example project: IfEng4.zip (April 8, 2013)

This engine cuts out a great deal of both coding and playing frustration normally associated with classic text adventures. It allows you to create only the possibilities you want, without having to guess of all the possibilities the user may try. I did this to make text adventures more user-friendly, reaching out to an audience that normally doesn't have the patience for a struggling parser. And for the writer who doesn't want to struggle coding the parser rather than the story.

April 8, 2013: First release to public. (Compiles on fbc version 0.24)
To do:
- Overcome a game saving/restoring issue (due to the use of static variables in scripts)
- Add sounds handling (many actions will produce sound effects. also background music.)
- Add custom colors schemes
- Misc menu items

Image

Code is released as use-and-abuse. Do what you like with it. Individual finished games using this engine are credited to story writer, but please include a credit to Danny Wilfong as engine coder. Enjoy :)
Last edited by mrToad on Apr 09, 2013 15:47, edited 1 time in total.
badmrbox
Posts: 664
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by badmrbox »

I got some errors trying to run your source.

Code: Select all

Type obj_attr
	As Integer kind
	As Integer x,y,z
	As ZString * 32 tag
	As Integer within
	As Integer canView, canReach, canHear, canSmell
	As Integer lookedAt
	As Integer takenBefore
	fp As Function(o As Integer, key As ZString*16, io As Integer=0, io2 As Integer=0) As Integer
	As presense_attr pr(1 To 8) '' Object can be fully or partially present in several locations.
	Union
		s As soul_attr
		r As room_attr
		i As item_attr
	End Union
End Type
key As ZString*16 triggers error nr 56 as does some other variables. What version of freebasic is your code supposed to work in?
mrToad
Posts: 430
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by mrToad »

It compiled on 0.24 with only build options: fbc -s console, strange about those errors. I'll try to reproduce them.
badmrbox
Posts: 664
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by badmrbox »

Nevermind it. I noticed that I used an old version of FB. Downloaded fb0.24 and it now works.
mrToad
Posts: 430
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by mrToad »

Good deal. :]
Imortis
Moderator
Posts: 1923
Joined: Jun 02, 2005 15:10
Location: USA
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by Imortis »

This is very interesting. I really like the interface and am very interested in seeing the source code. Thanks for posting it.
mrToad
Posts: 430
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by mrToad »

Thanks Imortis.
agamemnus
Posts: 1842
Joined: Jun 02, 2005 4:48

Re: Mouse-Driven Interactive Fiction Engine

Post by agamemnus »

I've always wanted to do something like this, but kept getting bogged down.

It looks like a good start. I like the Gemstone-IVesque feel of the GUI.
Lachie Dazdarian
Posts: 2338
Joined: May 31, 2005 9:59
Location: Croatia
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Post by Lachie Dazdarian »

Same thoughts as agamemnus. Great work on this.
Post Reply