Working on an RPG. Test phase, could use ideas

User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Working on an RPG. Test phase, could use ideas

Post by XavSnap »

Déjà vu...

viewtopic.php?p=45304#p45304

Sorry, can't understand your understanding....
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

Re: Working on an RPG. Test phase, could use ideas

Post by Crayon21 »

I still don't know how to move characters, it's been troubling me for a while, As i want to make stuff like space invaders. For now, the idea is to make the the characters, plop them in and move them around. once I can do that, I will concentrate on the story, then the design.

Any help for moving characters using customized keys would be appreciated. Xav gave me an example but I have no clue as to where the specific code segment is, he never specified. I have read on the Inkey$ command but there is no instruction in the zx81 manual (what I am aiming for eventually) to move an object on screen, nor the code to do so. I will check the speccy manual and will let you know if i need additional help.

I've seen some of the games for the 81 and it boggles my mind as how to even start. At best, I can plot back and forth but not much else.
By the time CGC2022 rolls around, I hope to at least have some form of idea of what to do.

thanks
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: Working on an RPG. Test phase, could use ideas

Post by dr beep »

Crayon21 wrote: Wed Jan 12, 2022 1:31 am I still don't know how to move characters, it's been troubling me for a while

thanks
To move a charcater you need to place a character somewhere where it starts and then erase the character and show it on the new place.
You can control the place by altering the variables where you do the PRINT AT of the character.

I am keeping it a bit cryptic so you need to try yourself or you won’t get the idea behind the method.

Find games in BASIC that do this and read the listing. many magazines have listing with examples.
Lardo Boffin
Posts: 2160
Joined: Sat Nov 26, 2016 2:42 am

Re: Working on an RPG. Test phase, could use ideas

Post by Lardo Boffin »

Edit - dr beep beat me to it!

Conceptually speaking moving a character on the screen is quite simple. In a very simple game loop for space invaders:

1 Draw characters on screen at current position
2 Check for player key press
3 If keypress valid set new player position (or shoot missile etc.)
4 Do game logic (move missiles and bombs, collision detection, increase score or decrease lives etc.)
5 If lives = 0 stop and show score
6 Un-plot characters (draw the background over the character)
7 Goto 1

Imagine you are trying to explain to a person who does not understand computers how your game works - write it all down as a list like above or even a flow chart.

Assuming you can plot a character on the screen at a specific location you know virtually everything you need to get going. I’m not very familiar with ZX81 BASIC but something like:

PRINT AT X,Y,”M” (draw missile at x,y)
LET X=X+1 (change missile position as part of game logic stage)
PRINT AT X-1,Y,” “ (draw background over old position, hence X-1)
PRINT AT X,Y,”M” (draw missile at new position)

Or course the above would run really slowly in BASIC (assuming I guessed the syntax correctly) but it would run.
ZX80
ZX81 iss 1 (bugged ROM, kludge fix, normal, rebuilt)
TS 1000 iss 3, ZXPand AY and +, ZX8-CCB, ZX-KDLX & ChromaSCART
Tatung 81 + Wespi
TS 1500 & 2000
Spectrum 16k (iss 1 s/n 862)
Spectrum 48ks plus a DIVMMC future and SPECTRA
User avatar
XavSnap
Posts: 1940
Joined: Sat May 10, 2008 4:23 pm
Location: 'Zx81 France' Fb group.

Re: Working on an RPG. Test phase, could use ideas

Post by XavSnap »

Moving a character on the screen...

Déjà vu

viewtopic.php?f=5&t=4454

Tutoral from the CGC Crayon's program.
Last edited by XavSnap on Thu Jan 13, 2022 6:18 pm, edited 1 time in total.
Xavier ...on the Facebook groupe : "Zx81 France"(fr)
Crayon21
Posts: 348
Joined: Sun Nov 04, 2018 2:33 am

Re: Working on an RPG. Test phase, could use ideas

Post by Crayon21 »

Thanks for the help guys
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:
Post Reply