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
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 :)
Mouse-Driven Interactive Fiction Engine
Mouse-Driven Interactive Fiction Engine
Last edited by mrToad on Apr 09, 2013 15:47, edited 1 time in total.
Re: Mouse-Driven Interactive Fiction Engine
I got some errors trying to run your source.
key As ZString*16 triggers error nr 56 as does some other variables. What version of freebasic is your code supposed to work in?
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
Re: Mouse-Driven Interactive Fiction Engine
It compiled on 0.24 with only build options: fbc -s console, strange about those errors. I'll try to reproduce them.
Re: Mouse-Driven Interactive Fiction Engine
Nevermind it. I noticed that I used an old version of FB. Downloaded fb0.24 and it now works.
Re: Mouse-Driven Interactive Fiction Engine
Good deal. :]
Re: Mouse-Driven Interactive Fiction Engine
This is very interesting. I really like the interface and am very interested in seeing the source code. Thanks for posting it.
Re: Mouse-Driven Interactive Fiction Engine
Thanks Imortis.
Re: Mouse-Driven Interactive Fiction Engine
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.
It looks like a good start. I like the Gemstone-IVesque feel of the GUI.
-
- Posts: 2338
- Joined: May 31, 2005 9:59
- Location: Croatia
- Contact:
Re: Mouse-Driven Interactive Fiction Engine
Same thoughts as agamemnus. Great work on this.