How do i get a movement on screen using the ZX81

Anything Sinclair ZX Basic related; history, development, tips - differences between BASIC on the ZX80 and ZX81
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

How do i get a movement on screen using the ZX81

Post by Crayon21 »

so far, all i know is rudimentary basic. However, i want to make more than text adventures. I want to make action games and such but I have no clue how to get the character set to move independent of the screen (Space invaders for example).

This is what i want to achieve:https://www.youtube.com/watch?v=wjb7aBm ... llordsutch

tips?

typo, meant zx81
Last edited by Crayon21 on Sun Dec 12, 2021 8:58 pm, edited 1 time in total.
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
Paul
Posts: 1511
Joined: Thu May 27, 2010 8:15 am
Location: Germanys west end

Re: How do i get a movement on screen using the ZX80

Post by Paul »

First you need to program in Assembler,
Then you have to program a video output routine that matches the screen requirements exactly.
After you managed this you will have a loop that waists a definite number of clock cycles.
Now you can begin programming your game.
Every subroutine of your game needs to use exactly the same (matching) number of clock cycles (in other words they have to be shorter and waist the rest of the clock cycles). If one subroutine gets to long you need to split it into two .
Well they you will be nearly there (this is all only theory)
So knowing this we need to give those programmers extra respect that managed to write flicker free games for the ZX80
In theory, there is no difference between theory and practice. But, in practice, there is.
dr beep
Posts: 2060
Joined: Thu Jun 16, 2011 8:35 am
Location: Boxmeer

Re: How do i get a movement on screen using the ZX80

Post by dr beep »

You are referring to a ZX81 game and want the same on a ZX80? In (pseudo)hires?

Too much for a startergame.
User avatar
mrtinb
Posts: 1906
Joined: Fri Nov 06, 2015 5:44 pm
Location: Denmark
Contact:

Re: How do i get a movement on screen using the ZX80

Post by mrtinb »

It looks like the game in the video is based on the dk’tronics hardware, which uses UDG (user defined graphics chars). So it is still text mode, but the chars are changed. Other hardware than dk’tronics that support this is UDG4ZXpand or Chroma 81.

However with a WRX enabled RAM expansion you can make UDG like software with dr.beep’s USCII viewtopic.php?f=6&t=3124 .

You can also program WRX or PSG (pseudo graphics with unmodified RAM pack), like mentioned above, but using USCII might be a simpler approach.
Martin
https://zx.rtin.be
ZX81, Lambda 8300, Commodore 64, Mac G4 Cube
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: How do i get a movement on screen using the ZX80

Post by Crayon21 »

mrtinb wrote: Sun Aug 08, 2021 9:54 pm It looks like the game in the video is based on the dk’tronics hardware, which uses UDG (user defined graphics chars). So it is still text mode, but the chars are changed. Other hardware than dk’tronics that support this is UDG4ZXpand or Chroma 81.

However with a WRX enabled RAM expansion you can make UDG like software with dr.beep’s USCII viewtopic.php?f=6&t=3124 .

You can also program WRX or PSG (pseudo graphics with unmodified RAM pack), like mentioned above, but using USCII might be a simpler approach.
where can i find the manual for dk'tronics?
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: How do i get a movement on screen using the ZX80

Post by XavSnap »

Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: How do i get a movement on screen using the ZX80

Post by Crayon21 »

:D
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
BarryN
Posts: 151
Joined: Thu Nov 09, 2017 11:34 pm

Re: How do i get a movement on screen using the ZX80

Post by BarryN »

You can do it in BASIC using text.

Code: Select all

10 FOR Y=1 TO 10
20 FOR X=1 TO 10
20 PRINT AT Y,X;" HELLO "
30 NEXT X
40 FOR X=10 TO 1 STEP -1
50 PRINT AT Y,X;" HELLO "
60 NEXT X
70 PRINT AT Y,1;"       "
80 NEXT Y
The word hello will go back and forth and advance down the screen.
Crayon21
Posts: 346
Joined: Sun Nov 04, 2018 2:33 am

Re: How do i get a movement on screen using the ZX80

Post by Crayon21 »

can it be done with graphics?
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
BarryN
Posts: 151
Joined: Thu Nov 09, 2017 11:34 pm

Re: How do i get a movement on screen using the ZX80

Post by BarryN »

Crayon21 wrote: Wed Aug 11, 2021 12:11 am can it be done with graphics?
Sure, just print the graphics characters. Don't expect hi-res though from BASIC.
Post Reply