Scrolling ASCII tile based QB game in the "works".
Tue Mar 02, 2021 4:39am

I started messing with a Qbasic tile based scrolling game using DOS ASCII graphics. I've been sort of on a retro QB binge lately and ran across "QBasic - The RPG" which sort of reminded me of something that would have popped up here back in the day but much more polished. Anyway, I really dug the style of the game so I was curious if I could make something with a similar feel. (At least on the world view)

I don't really have any plans so far for it, I just never attempted to write a tile based scrolling game before. The ones that have been tile based before have been screen by screen style like Zelda on NES (that I can remember... at least in QB!) so I figured I'd give it a shot. So far I have the "game" which loads the set map file (using BLOAD) and allows the player to move around. The world scrolls as the player moves about the map. Also, collision detection is handled where tiles are marked as "blocking" or not in the editor.

I also I have the editor where you can set the foreground color, background color, ASCII character code and flag if the tile is blocking or not. You can also set the file name to save to. All saving is done via BSAVE. I don't currently have the scrolling implemented in the editor yet so it can't build a full map (yet). I'm also going to add loading so you can edit preexisting map files.

So far, it works pretty well. I'm not really sure where I'm going to go with this as I don't have the time to work on a full story or anything. Maybe go the action/rpg route and just make it really simple? Who knows. :)

Anyway... here's a screen shot of the editor in action:

Here's a video of the "game play" in the screen created by the editor:

(Video/screenshot quality is bad because of using my phone on a CRT on my 486. My friend was throwing one away and I'd been looking for one for my 486 because switching between Windows and full screen DOS mode and back would leave the LCD monitor in "Input Not Supported" mode with no way to get the display back without restarting. This CRT is definitely at EOL but it works well enough for now...)

Edit: I guess those pine trees are so common because they're easy to draw. haha. Qbasic RPG uses them, this uses them and so does my Atari 2600 game that I was working on last summer!

    • I've been meaning to update the website with the code for this since I switched over to working on COBOL Roguelike instead of continuing on with this original Qbasic version. Link to download if interested: ... more
    • I always liked this style of game... - Retna, Sun Mar 07 2021 8:24pm
      I think at some point I had a demo that did something similar, but mine wasn't a seemless scroll. So for instance, imagine you were in "the forest" area and that area was 100x100 tiles (like a 100x100 block of numbers) And the viewport could only show a 10x10 area. So you could explore the forest... more
      • Kind of got something working... - Retna, Sun Mar 07 2021 10:12pm
        Still need to figure out how to move the viewport based on the characters position. And also how to stitch the two areas together. Should be able to copy and paste this into your browser console on newer browsers. document.write(` <html> <head> <style> body { overflow:hid... more
        • Started working on the same game using COBOL... - Erik_, Sun Mar 14 2021 3:32am
          Being that COBOL is more my programming language of interest outside of work lately, I decided I'd try to make the QB game in GnuCOBOL instead. So far, I don't have the area scrolling like I do in the QB version. It's just a full map view for now. (I'll be working on that next). This is defini... more
          • Got the scrolling working now. - Erik_, Wed Mar 17 2021 5:28pm
            Looping gif example:
            • Sweet! - Retna, Wed Mar 17 2021 9:43pm
              Do you scroll the viewport and the player position at the same time when they press the direction? I might try doing that too...
              • This is the second time of me writing this after clearing... I guess that's definitely a sign it needs to be rewritten. :) * Player position holds x/y coordinates on the tile map. * Screen is drawn based on player xy as the starting point and drawn until it reaches the defined screen width and ... more
                • I removed the "if player's position in the x/y is less than so and so" and just made the player's screen position constant. I was having a weird issue where as you approached 1,1 on the map, you would move 2 tiles instead of one. The new way fixes this. To get the player's map position, I just ne... more
        • Nice! That worked in Firefox. - Erik_, Mon Mar 08 2021 6:29pm
          That's really cool! I never would have thought to make a ASCII style game like this in Javascript. I would totally play a full fledged game that was done like that. Your screen drawing is similar to how I'm doing it. My 2d array just is a TILE type instead of straight integers so it can ho... more
          • Having a tile type could be a good way to define define more things the player can interact with. Like a chest or a door that can be open or closed.
            • and then having some TileHandler or something that defines the action based performed based on the tile type. I guess you would also need some sort of id or something to specify that it was, for example, a specific treasure chest on this specific map? Currently, the only different tile type I hav... more
  • Click here to receive daily updates
    "Forces act when not restrained" - Puckdropper