[GAME] Eldarian Odyssey
[GAME] Eldarian Odyssey
Hi all, it's done. I finished my late 70's era text adventure game. This is a game that I started when I was 16 years old, but didn't have the skill to finish. And now, one day before my 56th birthday--that's right, 40 years later, it's done. Right now it's posted on bitbucket.org (https://bitbucket.org/bytecave/eldarian-odyssey/src) as MIT licensed open source. Development notes are included in the DevAssets folder as a fun little read on my though process during (mostly) the design stages of development. The compiled binary is zipped into the Binaries folder if you don't want to build it.
I deliberately targeted multi-platofrm, and only used only a few lines of Windows specific code, all nicely wrapped in a windows only PureBasic directive. So, the game should compile and work cross-platform. I'm not able to test on those platforms, but if anyone wants to grab the code and have fun, give it a try.
Thanks for the opportunity to post this, and thanks for the help I received from the forums. Borrowed code is attributed on the Credits screen.
I deliberately targeted multi-platofrm, and only used only a few lines of Windows specific code, all nicely wrapped in a windows only PureBasic directive. So, the game should compile and work cross-platform. I'm not able to test on those platforms, but if anyone wants to grab the code and have fun, give it a try.
Thanks for the opportunity to post this, and thanks for the help I received from the forums. Borrowed code is attributed on the Credits screen.
Re: [GAME] Eldarian Odyssey
Love the old school text adventures !
Was having some fun playing yours but when I gave the note to the royal clerk, it told me it wan't possible... then the game crashed.
I was playing the EXE version, not the IDE source so I can't see where in the code what caused the crash ;(
Nice work though !
Was having some fun playing yours but when I gave the note to the royal clerk, it told me it wan't possible... then the game crashed.
I was playing the EXE version, not the IDE source so I can't see where in the code what caused the crash ;(
Nice work though !
Re: [GAME] Eldarian Odyssey
Thanks Paul!
Not sure what is going on. I had my wife and two beta testers try on all of their machines, and tried on all of mine, variously these 8 machines were running Win 7, Win 8.1 and Win 10. Can't repro. BUT... I decided to downgrade to the released version of the compiler, was running 5.7 Beta 1 and now running 5.62 release. I recompiled the EXE and added 32-bit version as well. Maybe it was a beta issue?
*** EDIT: Well, finally found it. Uncommon bug when generating a random response. I forgot to restore a data section before reading from it. *** So, that's good now.
You already gave it a go, so no expectations, but if you're into trying it again, let me know if things work better.
P.S. Had mixed opinions about supporting GIVE NOTE instead of just TALK CLERK. Your vote pushed it over the top, so GIVE NOTE now does what you'd expect, assuming it doesn't crash.
Again, appreciate you just having taken a look at it! --Rich
Not sure what is going on. I had my wife and two beta testers try on all of their machines, and tried on all of mine, variously these 8 machines were running Win 7, Win 8.1 and Win 10. Can't repro. BUT... I decided to downgrade to the released version of the compiler, was running 5.7 Beta 1 and now running 5.62 release. I recompiled the EXE and added 32-bit version as well. Maybe it was a beta issue?
*** EDIT: Well, finally found it. Uncommon bug when generating a random response. I forgot to restore a data section before reading from it. *** So, that's good now.
You already gave it a go, so no expectations, but if you're into trying it again, let me know if things work better.
P.S. Had mixed opinions about supporting GIVE NOTE instead of just TALK CLERK. Your vote pushed it over the top, so GIVE NOTE now does what you'd expect, assuming it doesn't crash.
Again, appreciate you just having taken a look at it! --Rich
- RSBasic
- Moderator
- Posts: 1218
- Joined: Thu Dec 31, 2009 11:05 pm
- Location: Gernsbach (Germany)
- Contact:
Re: [GAME] Eldarian Odyssey
Where can I download your game? I only found the download with a size of 646 MB. Is the game that big?
Re: [GAME] Eldarian Odyssey
The zipped game is in the Binaries folder of the OSS repo: https://bitbucket.org/bytecave/eldarian-odyssey/src. The unzipped game is about 3mb because it's a standalone EXE with all of the artwork and fonts embedded inside. Thanks for your interest!
Re: [GAME] Eldarian Odyssey
FYI
I tried the binaries, they both freeze on the start, I see only the window being created but empty, total gray, the program is not responding.
Tried the source with PB 5.62 x86
Using the debugger it freezes on the line
inside
file Helpers.pbi
I can step through the code until RegisterFontFile(strFontFile), freezes on that line.
The TTF font Glass_TTY_VT220.ttf is in my temp directory, the path is ok, the font looks ok.
I'm using Windows 7 x64.
I tried the binaries, they both freeze on the start, I see only the window being created but empty, total gray, the program is not responding.
Tried the source with PB 5.62 x86
Using the debugger it freezes on the line
Code: Select all
;If font file is corrupt or can't be matched, no worry, IsFont test below will fail and we'll get the default system font
RegisterFontFile(strFontFile)
Code: Select all
;load from data section, private to this app -- after initial load from disk it exists in memory only, cleaned up by OS when app terminates
Procedure.i LoadPrivateFont(strFontFile.s, strFontFace.s, *pFontBuffer, iFontLength.i, iPointSize.i, iFlags.i = 0)
I can step through the code until RegisterFontFile(strFontFile), freezes on that line.
The TTF font Glass_TTY_VT220.ttf is in my temp directory, the path is ok, the font looks ok.
I'm using Windows 7 x64.
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: [GAME] Eldarian Odyssey
Hi Luis. This is a known PureBasic design flaw (issue?). It uses a blocking call to notify apps of font change: viewtopic.php?f=4&t=70402&hilit=registerfontfile. I have seen it a few times on my own PCs A workaround that often worked for me is to delete all the files in my temp directory, and close other apps, then relaunch.
Sorry you hit this issue. Didn't happen to me with beta 5.70 so maybe they changed it or I just got lucky for a long time. I will ecompile with 5.70 beta 1 and reupload just in case.
*** EDIT: Reupload everything compiled with 5.70 beta 1. ***
*** EDIT #2: Got some advice from a long-timer here and now use an alternate (Win API) method for loading font resources on Windows. Should workaround the PureBasic bug as it doesn't send the blocking WM_FONTCHANGE message. The bug doesn't repro reliably, or often, but when it does... that's it for the process.
Thank you to the moon and back for trying it out!
Sorry you hit this issue. Didn't happen to me with beta 5.70 so maybe they changed it or I just got lucky for a long time. I will ecompile with 5.70 beta 1 and reupload just in case.
*** EDIT: Reupload everything compiled with 5.70 beta 1. ***
*** EDIT #2: Got some advice from a long-timer here and now use an alternate (Win API) method for loading font resources on Windows. Should workaround the PureBasic bug as it doesn't send the blocking WM_FONTCHANGE message. The bug doesn't repro reliably, or often, but when it does... that's it for the process.
Thank you to the moon and back for trying it out!
Re: [GAME] Eldarian Odyssey
Hey, now it starts.
I like very much the graphic, the text is so readable and relaxing... some very good taste here and I imagine some time was spent in finding the right settings for the ambient ... I like it very much.
OK, the adventure is the important part, but looking good doesn't hurt !
But just after the first command I've encountered a problem.
> N
The %1 is locked.
Uh ? %1 ? Looks like a placeholder for something. A door perhaps ?
I like very much the graphic, the text is so readable and relaxing... some very good taste here and I imagine some time was spent in finding the right settings for the ambient ... I like it very much.
OK, the adventure is the important part, but looking good doesn't hurt !
But just after the first command I've encountered a problem.
> N
The %1 is locked.
Uh ? %1 ? Looks like a placeholder for something. A door perhaps ?
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: [GAME] Eldarian Odyssey
This was a surprising result of the freeze on RegisterFontFile workaround i put in! I copied some code from the forums that looked similar to this:
hFont = AddFontMemResourceEx_(*pFontBuffer, iFontLength, 0, @"1")
Note the last parameter. Instead of passing the address of a variable that could hold the result, I passed the address of the literal string "1." Not shockingly in retrospect, that overwrote the literal value of the string "1" so that a command like ASC("1") would return 1 instead of 49! Hence the "unrecognized move state," the number one was now CHR(1) instead of CHR(49)! I changed the line to use @i (a variable) instead of @"1" and voila!
Dang, that innocent little workaround really messed with my mind until I took a look at that last parameter. Note to self: just declare another variable.
New binaries uploaded, once again.
hFont = AddFontMemResourceEx_(*pFontBuffer, iFontLength, 0, @"1")
Note the last parameter. Instead of passing the address of a variable that could hold the result, I passed the address of the literal string "1." Not shockingly in retrospect, that overwrote the literal value of the string "1" so that a command like ASC("1") would return 1 instead of 49! Hence the "unrecognized move state," the number one was now CHR(1) instead of CHR(49)! I changed the line to use @i (a variable) instead of @"1" and voila!
Dang, that innocent little workaround really messed with my mind until I took a look at that last parameter. Note to self: just declare another variable.
New binaries uploaded, once again.
Re: [GAME] Eldarian Odyssey
Now it seems to work
I passed the main gate and peeked around. It has a "Zork" vibe in the way the narrator describes the scene.
Do you have any stats on how big it is ? How much dialog there is in it ?
I passed the main gate and peeked around. It has a "Zork" vibe in the way the narrator describes the scene.
Do you have any stats on how big it is ? How much dialog there is in it ?
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
Re: [GAME] Eldarian Odyssey
I don't have any detailed stats. I just counted 94 different valid objects and 48 rooms. The files Nouns.txt and Rooms.txt give you an idea of the objects/actions supported and show you all the environment and description detail that you will see when you LOOK or LOOK <object>. I dynamically alter the room/object strings based on state, which wasn't/isn't overly common. I am going to take a wild guess that there are 300 lines of dialog (mostly in Handlers.pbi but some in Stringtable.pbi), but that number may be higher--I don't think it's lower. There's a lot of detail you'll never see unless you are trying out commands for fun. Nouns.txt and Rooms.txt are full-on spoilers to the game, but view them anyhow if you're interested. So, did you KNOCK or CHOP TREE to get past the main gate?
Thank you for finding the weird addfont parameter issue. The fix was almost as bad as the original bug!
Thank you for finding the weird addfont parameter issue. The fix was almost as bad as the original bug!
Re: [GAME] Eldarian Odyssey
I knocked, and now I've one coin lessbytecave wrote:So, did you KNOCK or CHOP TREE to get past the main gate?
"Have you tried turning it off and on again ?"
A little PureBasic review
A little PureBasic review
- Kwai chang caine
- Always Here
- Posts: 5357
- Joined: Sun Nov 05, 2006 11:42 pm
- Location: Lyon - France