Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - MrD

Pages: [1] 2
1
Quote
Controls for MJS are really a problem... when u press ARROW and, instead of move a character, you SCROLL THE PAGE! :D or... pressing [BACKSPACE] to do some action in the game, then the browser switches BACK to previous WEB PAGE! wow! So many troubles...
That's why the gamepad is emulated with the letter keys. :)

I treat keyboards as a special thing that few Yabasic users would have - it's all about the fake pad with Mjsyabasic :)

2
Don't worry about it. :) Good luck with your programming!

I fixed the ASC problem, and the STR$ %f formatting (mostly)

All I need to do is fix LINE INPUT (which I've got to figure out)

3
Yabasic / Re: YA-GOLF MINI Super challengue
« on: February 05, 2016 »
Hi sergio! What does 'WARNING LOW PC EFFICIENCY' mean?

4
Yabasic / Re: GAME: FLAPPY YAB-REX
« on: February 05, 2016 »
I have fixed STR$ with C-style %f print, and I've fixed ASC with non a-z chars so they have the correct 128-255 values.

Which means that YAB-REX works in MJSYABASIC!

http://www.mrdictionary.net/yabasic/

It's on the left, /games/sergio_manowar/yabrex.txt ... the controls are a little awkward, but that's my fault :)

I got exploted by a cactus, and then I watched the replay! This game is awesome!

5
Yabasic / Re: GAME: FLAPPY YAB-REX
« on: February 05, 2016 »
I've made it so ASC outputs the right values for your characters and yab rex runs in MJS Yabasic with no changes now! It plays the intro with all the graphics, but crashes when the game starts because I haven't put in the 'printf' style formatters with % signs yet. (I haven't uploaded the update yet.)

6
I see! Thank you Sergio! That explains a lot. :)

Yes, because I'm just using ordinary Javascript strings, everything is encoded using unicode values, so if you type in a non a-z, A-Z character, the ASC values will be completely different! I think I'll have to re-make strings completely so that they use the exact same values as proper Yabasic. (This means you won't be able to use characters outside of Yabasic's set though.)

And the formatting stuff is familiar to me from other languages. :) I didn't know yabasic could do that!

7
Yabasic / Re: GAME: FLAPPY YAB-REX
« on: January 20, 2016 »


If I change the DIM fdata(9000) to something bigger, the running demos work in javascript yabasic! This game looks awesome!

It says you're using too big an index into fdata. (I should make the error message more informative sorry!)

I'll have to make sure that my code isn't coming up with the wrong values for dBit... can you check what the maximum index into fdata is supposed to be?

8
 ;D

9
I've fixed the strange IF behaviour, and decided against getting the undocumented token$() working. I put in a replacement, so now we can play two new /games/! tonironkko/freecell.txt and tonironkko/potris.txt are now working!

TOKEN$(string_variable, separator)
returns contents of string_variable up to separator or end of string if it isn't present
sets string_variable to what is left after what was returned with the trailing separator replaced

It's one of the few functions that deals in references to variables so I don't bother. Don't use token$()!

10
SO

The sticky IF never progresses beyond the current line!

"big x" is always printed! An IF on a line by itself conditionally executes the nothing that succeeds it!

And none of the demos I currently have rely on this behaviour!

Weird as hell.

Gotta fix that for sure.

11
Well now I'm just plain confused.

I put in the IF behaviour I just described because I was sure that certain programs needed it, but looking at two other implementation of Yabasic neither of them consider the 'big x' line to be contained within the IF.

Which basically means I need to go back and rethink how I parse conditionals entirely.

How on earth did that happen?

12
Quote
1) You can write a condition 'IF' without ENDIF. This is legal and if condition matches,the rest of  the line is executed, but you can leave it blank or just add some remark.
This is perfectly legal in ps2 and jim's emu:

   IF condition=matches:REM ! TO DO SOME STUFF...LATER!

 In the js it's an error. Usually nobody writes a condition and leaves it blank... but in a
   crappy code of 10000 lines it may happen... of course, just deleting that line or comment it
will solve problem.
I'll have to check that out!

In my code, IF tries to attach itself to the next command that comes after it. It's not an error to have 'IF condition' by itself on a line.

Code: [Select]
print "type in a value"
input x
if x > 3
    print "big x"
print "end of program"
end

But it looks like in your example yabasic should treat REM as a command even though it doesn't do anything.

My compiler removes all REMs from the source in the first pass.

I've never heard of LINE INPUT before. Yikes!

13
I think Jim's yabasic version is based some of the same source code as the PS2 version. If your code does different things on Windows and on the browser, I think my code is wrong.

I used all of the old Yabasic programs to test my code - if one of the demos didn't run, something was definitely wrong with my code and I could fix it. My Javascript version is far from perfect! So don't be discouraged! :) That's why I need more test programs.

You're right about inkey$ and peek("port1") not being nice together... I would need to write a game pad layer to have it working accurately. (HTML5 can do this!)

Have fun programming :D

14
Hi Sergio, Galileo, glad you like it!

Sergio: I'm afraid I don't know why your code isn't working in my system. It's hard for me to fix the problem as your golf game is quite a big program :) If you can make a small example program (just 150 lines maybe) that my code doesn't run correctly, then I can fix the problems one by one.

15
General chat / Request: Built-in Yabasic Programs
« on: July 09, 2015 »
Does anybody have text file copies of the programs that are built into PS2 Yabasic: the cube, fractal, blobs, worms, etc?

Thanks.

16
Yabasic / Re: Test Pattern Gen for PS2 Yasic
« on: June 10, 2015 »
Nice one. :)

(and now I know that RESTORE without a target is a valid command, grumble grumble...)

17
Latest modifications:

I've made the string literal recognition more lenient to allow accented characters through. This is part of my attempt to get YA-GOLF below working. I foolishly assumed that the JavaScript \w word character symbol in a regex would catch accented characters. Big load of nope.

As a consequence, you should now be able to write Japanese characters directly into a Yabasic program, if that floats your boat. Bear in mind that Unicode JS is SERIOUSLY FLAWEDhere, but it's the last big thing I've got to get working, so I'm putting here as a reminder to myself.

It compiles, runs and gets to the language select! :D

It goes haywire if you press F1/F2. (Actually these are the default mappings for L3 and R3 in Jim Shaw's PS2Yabasic, so the game is very emulator-targeted... (It even starts with a warning screen telling you how to configure the emulator correctly.) I was going a bit crazy looking for an INKEY that wasn't there for a while.)

18
Glad you like it, Jim. :)

If somebody has an Apple/Android tablet with a bluetooth keyboard, could you please give it a go? I'm curious if the browser still gets keystrokes even if the input box isn't selected. I've been told that for tablet browsers, the text area has to be focused for the page to receive keystrokes even when you're using a physical keyboard (which sounds daft to me).

19
Quote
btw, the rafryer/fastz.txt demo doesn't run.
Yes, it does.

20
INPUT is in, which makes demos/jinx/prismdmo.txt work!

I think that about wraps it up for Yabasic. :)

Pages: [1] 2