ticalc.org
Basics Archives Community Services Programming
Hardware Help About Search Your Account
   Home :: Archives :: News :: Tetris: The First BBC Basic Game

Tetris: The First BBC Basic Game
Posted by Astrid on 16 August 2009, 19:38 GMT

Tetris screenshotA couple of months ago, Alex Marcolina released Tetris, the first game for Benjamin Ryves's BBC Basic interpreter to be uploaded to ticalc.org. (You'll need a copy of the interpreter to run the game.)

This traditional version of Tetris includes the standard features: score, lines counter, next piece display, and multiple levels. It is the first non-trivial program released for BBC Basic and showcases the impressive speed available to programmers thanks to Benjamin's hard work. We look forward to seeing what will be done next with BBC Basic!

  Reply to this article


The comments below are written by ticalc.org visitors. Their views are not necessarily those of ticalc.org, and ticalc.org takes no responsibility for their content.


Re: Tetris: The First BBC Basic Game
Lewk Account Info
(Web Page)

Very nice looking. I think I should probably look into doing something with this too.

Reply to this comment    16 August 2009, 20:54 GMT

Re: Tetris: The First BBC Basic Game
Kevin Ouellet Account Info
(Web Page)

I should try that BBC Basic thing at one point. It looks like it can make quite nice arcade games. RPGs might be an issue, though (at least, if they have like over 500 maps).

Reply to this comment    17 August 2009, 03:10 GMT

Re: Re: Tetris: The First BBC Basic Game
benryves  Account Info
(Web Page)

I'd have thought that RPGs would benefit from some of the features of BBC BASIC too, such as the smaller footprint of arrays (or even one byte per element if you didn't mind doing a bit of manual memory manipulation) or the file manipulation routines (you can read directly from the archive). Of course, you do lose the integration with the TI-OS and have to put up with the slightly awkward memory allocation issue (storing files in RAM is not something that is especially practical when the environment doesn't expect to have to share its memory with the device's storage). Maybe I should get to work on a tape drive interface. :-)

Reply to this comment    17 August 2009, 09:55 GMT


Re: Re: Re: Tetris: The First BBC Basic Game
Kevin Ouellet Account Info
(Web Page)

Well if it can read stuff from archive (and multiple files) I guess a RPG might be doable, then. The lack of this feature is what MLC (that old Casio/HP/TI multiplatform interpreter project that never got completed) suffered the most of. To remain compatible on regular 83+, games couldn't be more than 8.1 KB before compression and didn't have sub-programs. Try to fit Final Fantasy Tales Of Magic 2 in 8.1 KB

Reply to this comment    17 August 2009, 17:28 GMT


Re: Re: Tetris: The First BBC Basic Game
NecroF-_-ckk  Account Info

I emediatly saw you posted this without watching the name :p. Looks good, nice speed =o
I want to see a 'basic' FPS to come out with this

Reply to this comment    19 August 2009, 15:35 GMT

Re: Tetris: The First BBC Basic Game
benryves  Account Info
(Web Page)

To be fair, most of the speed comes from the BBC BASIC interpreter, which was written by Richard Russell. All I have done is written the interface that sits between BBC BASIC and the calculator hardware (so drawing routines, file I/O, text input and output &c).

In any case, this is an extremely impressive Tetris clone, so very well done to Alex!

Reply to this comment    17 August 2009, 09:49 GMT

Re: Re: Tetris: The First BBC Basic Game
Someone Someone  Account Info

My tetris game is better than yours, damn right. There better then yours, I can teach you but I have to charge!


:)

Reply to this comment    19 August 2009, 00:22 GMT

Re: Re: Re: Tetris: The First BBC Basic Game
builderboy2005 Account Info

Meh, do it in BBC Basic, then I'll be impressed! XD I think the whole point was to demonstrate the power of BBC Basic over regular basic, not assembly :P

Reply to this comment    19 August 2009, 06:55 GMT


s/milkshake/slide rule/
Astrid Smith Account Info
(Web Page)

My slide rule brings all the boys to the yard
And they're like:
It's longer than yours
D*** straight - twelve inch log-log rule
I can teach you,
But I'd have to charge

Reply to this comment    22 August 2009, 20:56 GMT


Re: Re: Tetris: The First BBC Basic Game
graphmastur Account Info

Will you make it easier to create bbc programs next version?

(on-calc)

Reply to this comment    19 August 2009, 02:45 GMT


Re: Re: Re: Tetris: The First BBC Basic Game
Patrick Prendergast  Account Info

What you get is exactly what you see in a normal BBC BASIC environment (plus the addition of some calc specific stuff). The on calc editor is pretty nice.

Reply to this comment    19 August 2009, 10:08 GMT


Re: Re: Re: Re: Tetris: The First BBC Basic Game
benryves  Account Info
(Web Page)

To be fair, some versions of BBC BASIC, such as the Z88 version, provide a line editor (similar to the TI-OS program editor). My problem is that I haven't found a way to hook into BBC BASIC's tokeniser/detokeniser. Of course, this could be rewritten, but would require a lot of work and take up a lot of ROM space - and it's tight enough in three app pages as it is.

If someone else wished to write an editor the program file format and tokens are documented in the appendices of the manual.

Reply to this comment    19 August 2009, 12:57 GMT

Re: Re: Re: Re: Re: Tetris: The First BBC Basic Game
Someone Someone  Account Info

Because BBC files are interpreted, does that mean files can exceed the 8k memory limit?

Reply to this comment    19 August 2009, 23:44 GMT


Re: Re: Re: Re: Re: Re: Tetris: The First BBC Basic Game
benryves  Account Info
(Web Page)

There is no 8.8K "limit" in the conventional sense, no. However, as the heap comes after the program in memory, you have to ensure that any inline assembly you use doesn't end up past &C000. For this reason, HIMEM is limited to &C000 by default, but you can move this with the *HIMEM command. As the TI-OS stores files in RAM, you have to ensure you've left enough room after HIMEM to store your SAVEd program.

Reply to this comment    20 August 2009, 10:00 GMT


Re: Tetris: The First BBC Basic Game
J.G. Harston  Account Info
(Web Page)

"I haven't found a way to hook into BBC BASIC's tokeniser/detokeniser"
See Tokeniser at mdfs.net/blib and also beebwiki.jonripley.com/Tokeniser

(I tried to post the code here, but I get "error more than 40 characters in a word")

JGH

Reply to this comment    11 July 2010, 11:34 GMT


Re: Tetris: The First BBC Basic Game
J.G. Harston  Account Info
(Web Page)

DEFFNTokenise_Z80(A$):LOCAL A%,P%
Tokenise_Z80%=Tokenise_Z80%
IF Tokenise_Z80%=0:DIM A% 4: !A%=&D9E1E5DD: A%?4=&C9: Tokenise_Z80%=USRA%
A%=EVAL("0:"+A$)
=$(Tokenise_Z80%-254)

Reply to this comment    11 July 2010, 11:36 GMT

Re: Tetris: The First BBC Basic Game
Evelien Symoens Account Info

Tetris.

Reply to this comment    19 September 2009, 10:14 GMT

  Copyright © 1996-2012, the ticalc.org project. All rights reserved. | Contact Us | Disclaimer