WIP: 4k Monopoly

Any discussions related to the creation of new hardware or software for the ZX80 or ZX81
Post Reply
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

WIP: 4k Monopoly

Post by Crayon21 »

currently need help getting the objects to move according to the input
(I.E if you roll 3, the character needs to move 3 spaces)
ideas?
Attachments
4k monopoly.p
(1.39 KiB) Downloaded 117 times
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: WIP: 4k Monopoly

Post by dr beep »

Make a table with cooridinates per field, go to next field and print at the coordinates at that field.
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

Re: WIP: 4k Monopoly

Post by Crayon21 »

um...how exactly? Can't i just get a grid reference of the zx81's screen locations?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: WIP: 4k Monopoly

Post by dr beep »

DIM P( nrfiledsonboard, 2)

P(1,1) holds Y-pos for PRINT AT
P(1,2) holds X-pos for PRINT AT

Where those positions are… that is up to you.
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

Re: WIP: 4k Monopoly

Post by Crayon21 »

then i assume i print at?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
User avatar
Dim_75
Posts: 80
Joined: Fri Sep 01, 2017 11:04 pm
Location: Paris, FR

Re: WIP: 4k Monopoly

Post by Dim_75 »

First try to practice the FOR-NEXT loop. Having a FOR without a NEXT is useless.
See chapter 12 of the manual for some help : http://otremolet.free.fr/otnet/otzx/zx8 ... hap12.html
I really think you have to understand how to make a loop with FOR-NEXT if you want to go further

Also, the input command in your program do not have any test for the input.
You can input a random character, the program will will not print "you rolled" but will continue anyway.
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

Re: WIP: 4k Monopoly

Post by Crayon21 »

is the contest over?
In Heck, there are two options for perpetual torment:

Eat the Puckerberry and suffer for eternity:
drink nothing but a cocktail of The Last Dab and Mexican Cake blended and served with
habanero slices
:twisted:
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: WIP: 4k Monopoly

Post by XavSnap »

Hi,

dr beep, the P$ array will be better to preserve some memory room...
DIM P( nrfiledsonboard, 2)

P(1,1) holds Y-pos for PRINT AT
P(1,2) holds X-pos for PRINT AT

Code: Select all

10 FOR X=1 TO 5 STEP 2
20 LET P$="£$:?()"
30 PRINT AT CODE(P$(X)),CODE(P$(X+1));"*"
50 NEXT X
Where Y1 is 12,X1 is 13, Y1 is 14,X1 is 15...
Don't need the DIM command.
#location(y,x) = (X-1)*2+1
#location 3 =(3-1)*2+1= offset 5 in the P$ array.


The better way to preserve the Vars mirroring, is to create a REM with characters, en PEEK the value…

Code: Select all

1 REM £$:?()
5 LET TABLE=16514
10 FOR X=3 TO 1 STEP -1
20 LET DEP=(X-1)*2
30 PRINT AT PEEK(TABLE+DEP),PEEK(TABLE+DEP+1);"*"
50 NEXT X

:ugeek:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: WIP: 4k Monopoly

Post by XavSnap »

2monopoly.p
(14.95 KiB) Downloaded 92 times
4k, juste for the variables memory room…
:lol:
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Post Reply