Thursday, April 28, 2022

🕹Wumpus !

From Wikipedia:

Hunt the Wumpus is a text-based adventure game developed by Gregory Yob in 1973. In the game, the player moves through a series of connected caves, arranged as the vertices of a dodecahedron, as they hunt a monster named the Wumpus. The turn-based game has the player trying to avoid fatal bottomless pits and "super bats" that will move them around the cave system; the goal is to fire one of their "crooked arrows" through the caves to kill the Wumpus. Yob created the game in early 1973 due to his annoyance at the multiple hide-and-seek games set in caves in a grid pattern, and multiple variations of the game were sold via mail order by Yob and the People's Computer Company. The source code to the game was published in Creative Computing in 1975 and republished in The Best of Creative Computing the following year.

The game sparked multiple variations and expanded versions and was ported to several systems, including the TI-99/4A home computer. It has been cited as an early example of the survival horror genre, and was listed in 2012 on Time's All-Time 100 greatest video games list. The Wumpus monster has appeared in several forms in media since 1973, including other video games, a novella, and Magic: The Gathering cards.

BASIC Anywhere Machine version of Wumpus:




Friday, April 22, 2022

⏱ Removed program throttling (for now)

I had not realized that wwwBASIC was throttling BASIC programs.

That does make sense to do so, because so many classic games from the golden years of BASIC would not be playable without throttling.

For the moment, I've significantly reduced the impact of throttling.  Not being too confident of my javascript skills and not quite sure what the javascript code (in wwwBASIC) is doing, I made a simple change that does not break the interpreter but does speed things up significantly.

You'll find a "Benchmark Test" program in the latest version of BASIC Anywhere Machine.  The benchmark results will be different between computers/devices/browsers.  On my Chromebook (Intel Pentium CPU N4200 @ 1.10GHz, 4GB RAM), the benchmark program now completes in about 5.25 seconds, versus the 22.5-ish seconds before the throttling change I made today.

On my TODO list: setup an interface (i.e. widgets in BASIC Anywhere Machine) to adjust throttle settings for every program.

Something like that.

Cheers !

Sunday, April 3, 2022

🆕 _NEWIMAGE Keyword (for the SCREEN Statement)

 References:


I've implemented _NEWIMAGE such that it is somewhat compatible with the function in QB64.

Although I may implement _NEWIMAGE differently in the future, I decided to go with a no fuss no muss, quick and easy, approach.

In BASIC Anywhere Machine:
  • _NEWIMAGE is not a stand-alone function.  It is simply a keyword recognized by the SCREEN statement, but a keyword made to look like a function
    • Syntax:  SCREEN _NEWIMAGE(width, height, mode)
    • "Parameters":
      • width: the screen width, in pixels, of the console window
      • height: the screen height, in pixels, of the console window
      • mode: the base screen mode to use, width and height parameters overriding the default width and height of the mode
  • The original alternative syntax for the screen statement:
    • SCREEN mode
The SCREEN documentation in the programming reference discusses the attributes for each available screen mode.  For your convenience, refer to this (small HTML file) export of the "SCREEN Modes" documentation.


🖥 Pongy game

This program is a port (and slight mod) of the QB64pe program by SierraKen.  (SierraKen's program shared with the QB64pe community in th...