Why not Pascal / C instead BASIC?

Page 4/5
1 | 2 | 3 | | 5

By hit9918

Prophet (2867)

hit9918's picture

16-08-2017, 23:17

the trees got jaggies
there is a paletted yjk mode. sky color can be used in any pixel, the tree would be round, with zero jaggies.

By PingPong

Prophet (3448)

PingPong's picture

17-08-2017, 01:41

Msxbasic is not comparable to. C or pascal

No structured programing
Subroutines not fuctions
Line numbers
All variables are GLOBAL that combined with the only two first letter are significant plus no declaration is a kind of bomb allowing the generaton of the most subtle bugs
No modularization of code
Stupid type postfix for variables a% different from a!
Until you defint all vars are real
Goto is the only way to do loops
Interpreted slow

To stay with basic we need a more modern implementation and a compiler

By Grauw

Ascended (8452)

Grauw's picture

17-08-2017, 09:01

1. Goto only way to do loops? For / next exists...
2. Basic-kun compiler is fast, all Kai games were made with it.
3. NestorPreTer could be called a more modern implementation, it removes a number of the above limitations.

Just some amendments... not saying Basic is the be-all-end-all (or Pascal).

By DarkSchneider

Paladin (869)

DarkSchneider's picture

17-08-2017, 11:25

BASIC was a great way for introducing amateurs/kids. But at long term it has become a cancer for MSX development. I haven't seen more wasted efforts and resources giving EVERYTHING to BASIC (libs, players, etc.) and nothing to other languages, very much better long.

By PingPong

Prophet (3448)

PingPong's picture

17-08-2017, 12:41

Grauw wrote:

1. Goto only way to do loops? For / next exists...

2. Basic-kun compiler is fast, all Kai games were made with it.
3. NestorPreTer could be called a more modern implementation, it removes a number of the above limitations.

Just some amendments... not saying Basic is the be-all-end-all (or Pascal).

1. At least gwbasic allowed while wend. Msxbasic no.
2. And have its limitations. Memory , some instructions does not work,strange float math
and cannot be used for a stand alone exec
3. at the root we have always the same thing and limits

We need a more modern version

By PingPong

Prophet (3448)

PingPong's picture

17-08-2017, 13:08

Time ago someone posted about a new basic compiler, developed for zx spectrum but ported to msx also. I do not remember much about but it was a good project. Basic aficionados should consider this . It is not too much complex providing basic routines or wrap the bios for usual operations like vdp psg slot management etc

By Outbush

Supporter (3)

Outbush's picture

08-10-2018, 15:54

Personally I thought there were some interesting MSX BASIC entries to the "Homeputerium's cross-platform BASIC-10Liners competition" in 2017 & 2018. One of those games in 2017 got equal 2nd place in the PUR-80 category. But I don't know a lot about the MSX BASIC and the game which got 2nd place was using MSX BASIC 2.0, I'm guessing it's simply an updated backward compatible(?) with MSX BASIC 1.0, though usually new version number means a total rehash and totally incompatible with v1.0? Or is v2.0 another option available to MSX machines?

Personally, I've used Pascal as well as C and continue to code in BASIC as well, I also use Assembly, though I feel I'm still at a higher end of what could be described as beginner because I rely on the machine a lot to carry out those tasks.

The best approach when it comes to languages I think is to stick with the one your most comfortable with. A few years ago I coded a game in Pascal, which was fun, though a number of problems I had with it were first initially coded in BASIC because the Interpreted nature of the program meant I could quickly adjust the code as my game would be growing in size in Pascal, I would need to Compile to Binary File, run the Binary File just to see if it worked, which in my BASIC I could test for errors and fix those problems, the code could then be easily coded for Pascal. The final game is around 20k in size, I had to add a Sprite Driver and simple Tune Generator to it as well, though I was happy with the result despite spending a couple of months. After that I been writing some BASIC games and was as equally satisfied to write a small batch of fun games for the BASIC 10-Liners Compo. In my case confining to 10-Lines presents a case and going from writing Structured Pascal to Structured BASIC programs, most of my entries had to cram code on lines, which based on the decisions of a variable value and the use of an IF statement, I was doing that to sort out what different routines would fit where and ending up with code as close to 255 characters as possible. I thought in 2017 they had a good approach in allowing people to submit a one command for each line, to help people understand what the code was doing, though they didn't make this a requirement in 2018

By Manuel

Ascended (15750)

Manuel's picture

08-10-2018, 21:44

MSX-BASIC v 2.0 is fully backwards compatible with 1.0.
MSX2 machines come with MSX-BASIC 2.0 or 2.1. See the Wiki.

By Outbush

Supporter (3)

Outbush's picture

10-10-2018, 02:56

Thanks, I've been playing around with WebMSX using the MSX Europe setting. I came up with this little programme, but it doesn't look like I'm able to ESCape from it:

10 COLOR 15,1,7: SCREEN 2,0
20 B$=""
30 FOR I=0 TO 7: READ A: B$=B$+CHR$(A): NEXT
40 SPRITE$(0)=B$
50 DATA 24,60,126,255,36,36,66,129
60 X=0:Y=0
70 XD=4:YD=1
80 PUT SPRITE 0,(X,Y),15,0
90  OX=X:OY=Y
100  X=X+XD:Y=Y+YD
110  PUT SPRITE 0,(OX,OY),1,0
120  PUT SPRITE 0,(X,Y),15,0
130  IF X>100 THEN XD=-4
140  IF X<0 THEN XD=4
150  IF Y>100 THEN YD=-1
160  IF Y<0 THEN YD=1
170 GOTO 90

I noticed the MSX also has Hisoft Pascal from 1984, though it doesn't seem to be available anywhere?!?
I've posted some Pascal programs that I converted from a Book for Hisoft Pascal on World of Spectrum and wondered how they would translate for the MSX.

By Manuel

Ascended (15750)

Manuel's picture

10-10-2018, 07:41

You can stop the program by pressing the CTRL+STOP key combination.

For Pascal I recommend Borland turbo Pascal, version 3.3f by Frits Hilderink.

Page 4/5
1 | 2 | 3 | | 5