Mouse-Driven Interactive Fiction Engine

User projects written in or related to FreeBASIC.
mrToad
Posts: 402
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Mouse-Driven Interactive Fiction Engine

Postby mrToad » Apr 08, 2013 20:03

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: 659
Joined: Oct 27, 2005 14:40
Location: Sweden
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Postby badmrbox » Apr 09, 2013 15:00

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: 402
Joined: Jun 07, 2005 23:03
Location: USA
Contact:

Re: Mouse-Driven Interactive Fiction Engine

Postby mrToad » Apr 09, 2013 15:23

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

Re: Mouse-Driven Interactive Fiction Engine

Postby badmrbox » Apr 09, 2013 15:41

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

Re: Mouse-Driven Interactive Fiction Engine

Postby mrToad » Apr 09, 2013 15:45

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

Re: Mouse-Driven Interactive Fiction Engine

Postby Imortis » Apr 09, 2013 15:57

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

Re: Mouse-Driven Interactive Fiction Engine

Postby mrToad » Apr 09, 2013 19:40

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

Re: Mouse-Driven Interactive Fiction Engine

Postby agamemnus » Apr 23, 2013 7:20

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

Postby Lachie Dazdarian » Jun 25, 2013 12:31

Same thoughts as agamemnus. Great work on this.

Return to “Projects”

Who is online

Users browsing this forum: No registered users and 5 guests