Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

The game was entirely text mode and had a smart hack to double vertical space by using the top half block and bottom half block ascii characters as well as the block.

This hack got me to look at things differently and explore more possibilities each time I encountered a new problem as a child.



Approximately top and bottom halves. They didn’t actually line up properly, which was endlessly frustrating to me.


Do you know where we can read more about this? Couldn't find anything on google


It's not really a hack as such, which is probably why you wouldn't find anything specific. It's just creative usage of block drawing characters 0xDB, 0xDC and 0xDF as found in code page 437 and others: https://en.wikipedia.org/wiki/Code_page_437

The play field has double the height of number of available characters vertically, but with characters 0xDC and 0xDF you can effectively double this resolution because 0xDC just fills the lower half of the block while 0xDF filles the upper half.


I wonder why they even needed to do this. If I remember right, there was another draw mode in Qbasic where you could basically just flip individual pixels, rather than just use ascii characters.


They could have used a graphics mode, yes. But using regular 80x25 text mode made the game more accessible in terms of required hardware (both graphics hardware and processing power, especially with a "slow" interpreted language like QBasic), which could arguably have been an important factor for writing this kind of demo program. 80x25 text mode was available on all graphics cards including old CGA cards. There was no comparable graphics mode on CGA with the same resolution and number of colors. Their other demo game - GORILLAS.BAS - used EGA graphics instead.


There were quite a few draw modes (SCREEN 7 had a high resolution, SCREEN 13 had the most colors available), but I would reckon that the text mode was a lot faster and easier than trying to do things with the built in graphical functions.

If you wanted to make anything mildly complicated you were better off using a community built external graphical libraries (there were two major ones, but their names escape me).


I can think of a few (DirectQB, BlastLib, UGL, ...) but they all appeared much later than the original QBasic demo programs (late 90s / early 00s). At the time these games were written, if you really wanted faster or better graphics, you probably didn't use QBasic to begin with. And most importantly, if my mind doesn't play tricks on me, I think those libraries only worked with QuickBasic (the commercial compiler), not QBasic (the less feature-right interpreter shipping with MS-DOS). The only assembly speedups you could have in QBasic were through CALL ABSOLUTE.


Ahh, totally forgot that QBasic and QuickBASIC were different. I figure there was no chance that they were going to ever be in a demo program in any case - I just remember it being difficult to make good graphics with the regular drawing tools, while the most interesting games the community was building at the time I was active were all using DirectQB or UGL.


The graphics modes also varied wildly regarding text readability (with sometimes different fonts or different font sizes at least). This approach let them have just normal text as it otherwise also appeared.


https://www.vogons.org/viewtopic.php?t=85598

Interestingly enough it was used in even older times to make 40x25 text look like 80x50 gfx

I remember a PacMan clone that used the text mode graphics like that.





Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: