05-09-2010, 08:09 PM | #21 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Okay, all debug messages should be gone now. I've filled in some of the missing paragraphs, so that you can play a part of the first module's beginning without getting eaten by the Grues too often.
Far as the engine goes, this is a functional beta. Far as the module goes, it's still in demo phase. |
||
|
|
08-09-2010, 09:12 PM | #22 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
http://www.mediafire.com/?u4x6a49pfyaab9a
Ver. 1.00 full release, with the complete "Crypt of the Vampire" module. Enjoy. Proper documentation coming soon, as some things changed from the beta releases.
__________________
"God. Can't you people see I'm trying to commit a crime against science and nature here?" -- Reed Richards Last edited by The Fifth Horseman; 09-09-2010 at 01:43 PM. |
||
|
|
10-09-2010, 05:43 PM | #23 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
When I go into the witch's room and comply to leave, I get "Paragraph 219 was eaten by a Grue". But there is a 219.par and a 219.lnk.
__________________
Life starts every day anew. Prospects not so good... |
||
|
|
11-09-2010, 09:14 AM | #24 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Found the cause - there was a trailing space in the line declaring the paragraph to move to.
Fixed, and will add a safety measure to prevent this from happening. Added. http://www.mediafire.com/?uygc78yynwgdidc http://files.abandonia.com/extras/Dr...ne%20v1.01.rar And also in attachement here.
__________________
"God. Can't you people see I'm trying to commit a crime against science and nature here?" -- Reed Richards Last edited by The Fifth Horseman; 11-09-2010 at 09:59 AM. |
||
|
|
11-09-2010, 01:21 PM | #25 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
I killed Lord Tenebron!
It's good practice to flush the stdin buffer before every time you request console input, otherwise any keys pressed before the request are saved in line to be input, before anything else, which is also put in line, and so on. Code:
fflush(stdin);
__________________
Life starts every day anew. Prospects not so good... |
||
|
|
11-09-2010, 02:55 PM | #26 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
That doesn't seem to work; possibly because - outside of specific cases - the game is using getch() to receive keyboard input.
|
||
|
|
11-09-2010, 05:36 PM | #27 | ||
Join Date: Mar 2006
Location: ,
Posts: 4,613
|
It's not because of that. I've made a test program and fflush(stdin) does NOT work at all, regardless of what function you use to read input afterwards. Console input is buffered, what function you use doesn't change that.
So forget what I said, I remember reading about this, but it seems I was misled. Here's some info I googled: http://faq.cprogramming.com/cgi-bin/...&id=1043284351 In short, the argument of fflush() must be an OUTput stream, otherwise its behaviour is undefined--that is, it may work as intended, or it may destroy the Universe, or anything. I've read fflush(stdin) may or may not work on different systems. I've just tried in Visual C++ and in Turbo C++ 1.01 under DOSBox, and both times fflush(stdin) returned 0 despite ostensibly doing absolutely nothing. Looks like the only way to "flush" (emtpy) stdin is to read from it (the above linked FAQ links to another FAQ with some code snippets for this). The problem is that if you try to empty stdin and it's actually empty, the program will wait until any key is pressed. People seem to recommend always using fgets() to read console input, and then if necessary fscanf(). PS: I made another test program in C#, since the .NET Framework is way more powerful and safe, and it's my preferred choice now. The Console class has an read-only property called In, but its type is not a Stream, but a TextReader--that is, it has no methods (functions) to modify its content, only to read. I took a detour and called Console.OpenStandardInput().Flush(), but then I got a proper exception (NotSupportedException) saying "Stream does not support writing." So there you have it, you can't flush the console input. Console.OpenStandardOutput() returns the same type as .OpenStandardInput(), but you can .Flush() the object returned by the former, whereas trying to do so with the latter throws a NotSupportedException.
__________________
Life starts every day anew. Prospects not so good... Last edited by Japo; 11-09-2010 at 05:52 PM. |
||
|
|
15-09-2010, 10:26 PM | #28 | ||
Join Date: May 2008
Location: Swan River, Canada
Posts: 842
|
OK, for my digital logic class, i think it'd be kinda neat jsut to make a short little adventure game and show the teacher...
HOWEVER, after going through your code some more of the DE v.101, I got some more questions. Im guessing you compile all the header files into "Dragon Engine.exe" and then Dragon Engine.exe fetches the paragraph files from the '1' folder....thats cool.... But im still not understanding how the lnk and paragraph files work, cause i know the lnk has the actions, but how do i know which action leads to which paragraph?
__________________
Kugarfang: o hai guiz im trying to find this techno song from the radio and it goes like this: DUN duuuunnnn dudududududun SPLOOSH duuunnnnn We ate the horse. |
||
|
|
16-09-2010, 07:40 AM | #29 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
Quote:
Further, that can be overridden entirely by creating a file named modules.ini in the same directory as the executable, and entering directory names into separate lines in the file. Then the game will only look for modules in the specific directories in modules.ini. Quote:
__________________
"God. Can't you people see I'm trying to commit a crime against science and nature here?" -- Reed Richards Last edited by The Fifth Horseman; 16-09-2010 at 07:45 AM. |
||
|
|
17-09-2010, 01:43 PM | #30 | ||
Join Date: Oct 2004
Location: Opole, Poland
Posts: 14,276
|
http://www.mediafire.com/?g6gg4qwlt4g1qq6
Engine 1.02. Alternate includes present for compiling under Linux and some minor changes in the code. |
||
|
|