Speaking of "reusing code" on this project...
Wed Dec 15, 2021 2:33am

So, I've so far created the sprite editor, the sprite file name to sprite id editor and I am currently working on the level editor.

I got a very weird error on my sprite id editor after saving it. When I use the file name "SID_EDIT.BAS" I get the error:

"Tried to load module with duplicate procedure definition"
And then QB exits.

I copied the file to "SID_ED2.BAS" and it worked fine. If I copy it back to the original name, it gets the same error.

EVEN IF I reboot the computer, start a new TEXT file with just the TEXT contents of SID_EDIT.BAS and save it as SID_EDIT.BAS it blows up with that error. What makes it even more crazy is that the word "SID_EDIT.BAS" does not exist in the source code!

I have no idea what's going on there and I guess the new name of that editor is "SID_ED2.BAS" because I don't have time to figure out WTF happened there. Even Google doesn't know except one VB help copy/paste result.

That aside, I like the blend idea. Keeping jumping down could help things out. I'm still going to have a decent amount of patforming just because it makes level design a bit easier (jumps fill a nice portion of a level and time is very limited!)

Oh boy... I'm a bit stressed about finishing this on time. We'll see what happens!

Day time edit: I figured it out. I copied both SID_EDIT.BAS and SID_ED2.BAS to my computer and did a diff on it. The only difference I found was one had "^M" at the line breaks and the other didn't. I guess that might have happened when I copied and pasted the code into a new file? Not sure. What was interesting was that BOTH of them ran just fine. (After looking it up, ^M is ASCII code 13 which is the same as carriage return, so I guess that makes sense)

So, I copied SID_ED2.BAS to SID_EDIT.BAS and tested it. Ran fine. Then I copied it to a floppy and moved it back to the 486 and tried to run it. I got the same error. The only thing I could think of is that there must be another file in the directory that QB is looking at. Sure enough, there was a SID_EDIT.MAK file. "type"ing it out, I was surprised it was just a plain text file listing all the included/opened source files for SID_EDIT.BAS.

Long story short, I accidentally loaded the level editor source code in the sid editor source code and that was causing it to blow up. I removed the LVL_EDIT.BAS from the MAK file and SID_EDIT.BAS opened and ran fine again. I guess I could have technically deleted the file as well.

Glad that's solved. :)

    • You mentioned that point earlier, so I thought it might be a - Puckdropper, Sat Dec 11 2021 5:20am
      good way to go. Overhead kinda like Zelda might not be as good for a quick and dirty QB game. I do remember Santa's Adventure having some issues with jump, it wasn't easy to get the timing right. Can you do most levels without jump? Oh, what if Santa has the ability to "blend" in for a few secon... more
      • Speaking of "reusing code" on this project...- Erik_, Wed Dec 15 2021 2:33am
        • That was a strange one... - Puckdropper, Sun Dec 19 2021 4:50am
          I might have renamed the file and left it that way, or might have gone looking along the include chain... Will Santa be able to do multiple things at once, like blend and jump? That might be interesting for a small platform with a snooper where you have to blend then jump and not waste any time ... more
          • The blend sprite is currently nightmare inducing... - Erik_, Thu Dec 23 2021 4:59am
            I wanted to go for a "dotted line Santa outline" but it looks like a horrid speckled tin man. haha Maybe later I'll have time to fix it. To answer the question though, yes! Santa can blend and jump at the same time though he moves at half speed while blending. He can also toggle running which als... more
            • "Horrid speckled tin man" am waiting for the Christmas Demo - Puckdropper, Thu Dec 23 2021 2:25pm
              now! I'm going to have to find a version of QB to run this on with the new machine. It does sound like a good game.
              • I use QB4.5 and DOSBox on my modern computer. - Erik_, Sat Dec 25 2021 2:58am
                I think QB64 should probably work as well as they're big on backwards compatibility but I haven't really messed around with that as much. The debugger was worse than just running the OG QB45 and DOSbox so I haven't spent much time on it. QB4.5: more
                • *Qb64 fails, can't get it to compile - Puckdropper, Mon Dec 27 2021 3:00pm
                  It starts with an error about expected call sub-name () on line 417. The line is "CALL ClearKbBuffer" I wonder if it's either an include that is missing or if qb64 doesn't like declared but not defined subs? If I comment that line, the next error is the same line later on. Then it gets int... more
                  • Hmm. I'm guessing I'm doing some weird string to int - Erik_, Tue Dec 28 2021 12:43pm
                    conversion somewhere. I try to suffix my variables with the appropriate marker and also set "DEFINT A-Z". Most things should be INTs.. I might have a string to int thing going on somewhere that QB is okay with but QB64 isn't. The ClearKbBuffer might also be a problem. I don't know if QB64 allows... more
                    • QB64 probably is trying to run BASIC as a language - Puckdropper, Thu Dec 30 2021 8:44am
                      where the PEEK and POKEs are directly accessing the machine. Dosbox works because it emulates the whole machine. I also noticed QB64 doesn't have a definition for ClearKBBuffer (I guess that's in helpers.bas [I don't remember the name]) but QB45 did.
                      • I managed to get it to some-what run in QB64. - Erik_, Thu Jan 13 2022 3:03pm
                        I had to copy in the contents of HELPERS.BAS into XMAS2021.BAS. I also had to add a "CHDIR" to the current directory at the start of the code. It loaded up and the sound actually works. The problem is, it doesn't read any of the sprite data that was saved as binary using BSAVE and loaded with B... more
                        • It almost seems like COBOL did better than QB64 - Puckdropper, Sat Jan 15 2022 6:07pm
                          QB64 just seems so hard to mess with. I get nostalgia, but there's nothing wrong with making things better. I just tried to open the .mak file and got a "file not found" error and when I went back to try again I would have had to renavigate back to the folder with the files. It is amazing, thou... more
                          • I think that's only because mine is... - Erik_, Mon Jan 17 2022 1:16am
                            actually an QB interpretter where QB64 compiles the QB code into a binary and runs it. Also, CBI doesn't care about any errors interpretting once it does it's basic sanity pass before starting the program. Basically, anything that's not explicitly programmed for is "undefined" behavior.. whether it'... more
                      • Yeah ClearKbBuffer is in helpers.bas - Erik_, Thu Dec 30 2021 2:53pm
                        Might just be that QB64 doesn't read the .MAK file for includes.. or doesn't support it. Is there an option in the file menu to load a file like in QB? Maybe it just needs to be manually done?
                • I tried "QBasic" in the Windows Store - Puckdropper, Mon Dec 27 2021 11:39am
                  It didn't work. The program should never have been there in the first place, it doesn't work. DOSBox ran great, but took a bit to get it set up. I don't understand the Linux "configure this manually first" rather than the Windows Configuration Wizard. Now, when I got to level 3, with 5 sprit... more
                  • I actually posted about that on Pete's QB Site - Erik_, Mon Jan 03 2022 2:17am
                    a while ago. I don't have a Windows computer (besides 3.11) that I could test it out on though. The people that replied said it was terrible. It was basically a tech demo passed off as a final product. I also heard it was only text based if you could get it running. Sounds like it was about as finis... more
                    • I couldn't get anything really working at all. - Puckdropper, Mon Jan 17 2022 9:22am
                      It's kinda like someone started copying by taking the look of QB, then didn't do any of the hard bits... like making things actually compile. I couldn't find a way to actually run a program.
  • Click here to receive daily updates
    "Forces act when not restrained" - Puckdropper