QL Tinkering

Introduce yourself here!
qbits
ROM Dongle
Posts: 26
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Postby qbits » Wed Dec 21, 2016 4:18 pm

Thanks vanpeebles for you comment, as to a Quanta article I’ve been trying to rejoin...

Derek – the e is a typo so can be ignored (ie deleted). As to line 122:2 it works for me but I see the problem.
The y size of window 3 (ie ch=3) is 172 with a BORDER of 1 thereby y is reduced by 2 (1 Top/Bottom) so the block value should perhaps be BLOCK#ch,496,58,0,112,4

Let me know if that solves your problem. Getting back in the swing, programming was never my forte.
Qbits


User avatar
Derek_Stewart
Aurora
Posts: 771
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: QL Tinkering

Postby Derek_Stewart » Wed Dec 21, 2016 5:17 pm

Hi,

I have had look the code. Lots to GOTOs, could be a little more structured.

I see if I can improve the coding


Regards,

Derek
qbits
ROM Dongle
Posts: 26
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Postby qbits » Wed Dec 21, 2016 8:45 pm

Derek – bit confuse I haven’t to my knowledge used any GOTO’s in my code. There were a few GOTO’s in the Golf code written by R.Shergold & D.Tose uploaded by RWAP. I don’t believe I have written any in my updated version.

Try QBGolf_2016_12.zip version attached
Attachments
QBGolf_2016_12.zip
(6.83 KiB) Downloaded 27 times


User avatar
Derek_Stewart
Aurora
Posts: 771
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: QL Tinkering

Postby Derek_Stewart » Thu Dec 22, 2016 8:54 am

Hi,

I must have multiple versions of your programme.

But I downloaded the current version and in SMSQ/E v3.27 gives error:

At Line 215:5 value out of range

Is the programme not comptaible with modern QL systems?


Regards,

Derek
qbits
ROM Dongle
Posts: 26
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Postby qbits » Thu Dec 22, 2016 10:03 am

Derek appreciate your time spent and offer to help - but more confused the QBGolf_2106_12 I uploaded in both instances has line 215 as DEFine PROCedure Init_golfer, unless you are renumbering the lines can you give me the full line.

Compatibility with such as SMSQ/E is a world I haven’t yet explored so I can’t answer your question.

I have it working with the QL2k emulator (clock multiplier set at 500) running under windows 7 also under windows 10 on a Linx 10. I have tried it with the Q-emulator unregistered version on both win 7 and win 10. Very slow but the code does work.

Qbits


User avatar
Cristian
Gold Card
Posts: 359
Joined: Mon Feb 16, 2015 1:40 pm

Re: QL Tinkering

Postby Cristian » Thu Dec 22, 2016 1:19 pm

Hi Qbits,
your golf game is very nice! After a LRUN in my original QL it gives a "Bad name" error, but after a RUN it starts normally.
Yesterday I had been playing for about an hour :-)


qbits
ROM Dongle
Posts: 26
Joined: Sun Dec 11, 2016 3:32 pm

Re: QL Tinkering

Postby qbits » Thu Dec 22, 2016 4:03 pm

Thanks Cristian that’s good to know how’s the speed!
Bad name error is the devicename$ not relevant to your setup check below.

Update – OK a first for me I downloaded and have a copy of the SMSQmulator up and running with windows 7.
LRUN QBGolf_2016_12, appears to be working.

Problem(1)
Line 260 WINDOW#ch,90,60,412,gy:Green
I stop the program before this line executed and all appears OK.
I stop the program before executing PROC Green and I lose the top of my main screen?
ie. The headings are lost Wind speed/direction indicator, the hole number, length, par.

Problem(2)
The when the ball lands in a bunker for some reason running under the SMSQ it is not recognised?

Plus this is an error on my part with regards to water hazards:
Line 296 IF Gf(h,8)<= S/be IF Gf(h,7)<= & Line 298 IF Gf(h,8)=5 S/be IF Gf(h,7)=5

Not to forget Line 5 alter to your device name for LOAD & SAVE PROC’s

Well its getting busy with Christmas and all, so I guess any further work will wait until the NEW YEAR!
Thanks again Derek for getting me to try out the SMSQmulator...

Qbits


User avatar
Cristian
Gold Card
Posts: 359
Joined: Mon Feb 16, 2015 1:40 pm

Re: QL Tinkering

Postby Cristian » Thu Dec 22, 2016 8:21 pm

qbits wrote:Thanks Cristian that’s good to know how’s the speed!

The global speed (on my normal QL, without Goldacrd) is acceptable. The only critical point is the swing preparing and animation.
In any case the game is nice and playable :)


User avatar
Derek_Stewart
Aurora
Posts: 771
Joined: Mon Dec 20, 2010 11:40 am
Location: Runcorn, Cheshire, UK

Re: QL Tinkering

Postby Derek_Stewart » Fri Dec 23, 2016 8:48 am

Hi, Qbits,

Also try QPC2, also free, runs on Windows and Linux/MAC under Wine


Regards,

Derek
tcat
Gold Card
Posts: 429
Joined: Fri Jan 18, 2013 5:27 pm
Location: Prague, Czech Republic

Re: QL Tinkering

Postby tcat » Mon Dec 26, 2016 9:47 pm

Hi Qbits,

I have only now discovered your golf masterpiece. It is a great prog, not being a golfer gives me feeling of a real play.

I dared to touch your code a little, hope you may not mind.

[a] I converted CRLF line ending to be LF only
[b] I renumbered the code
[c] I changed these lines

Setting device to mdv2_

Code: Select all

150 device_filename$="mdv2_QBGolf_data":REMark user device_filename


Sets all black background, WTV removed, 165 line added
EDIT: ch#2 set to console to allow program editing

Code: Select all

165 OPEN#2,con_:OPEN#1,scr_
170 MODE 4:WINDOW#0,372,62,134,192


Resolves problem with `out of range'

Code: Select all

1260 LOCal i,x,y,r,e,a:ch=4:BLOCK#ch,124,36,0,42,4


EDIT
Golf_close PROC: WTV,PAUSE removed, STOP added

Code: Select all

1880 MODE 4:PAPER 0:INK 7:PRINT,"Bye..."
1885 STOP


I would not know what to do with water hazard yet.

Attaching _bas after the above mods.
EDIT _bas updated
QBGolf.zip
QBits Golf Simulator
(6.75 KiB) Downloaded 19 times


Resulting in this, sincerely hoping that was your intention.
QBgolf.png
QBits Golf Play Screen
QBgolf.png (8.44 KiB) Viewed 595 times


Cheers
Tom



Return to “The Welcome Area”

Who is online

Users browsing this forum: No registered users and 2 guests