 alien will wander around aimlessly for a while and only home in on the player slowly. That said, a random decision can sometimes be the right one when chasing the player. An alien on a more difficult screen might have a 60% chance of choosing a new direction randomly, and a 40% chance of choosing the direction based on the player’s relative position. This alien will track the player a little more closely. By tweaking these percentage levels it is possible to determine difficulty levels throughout a game and ensure a smooth transition from the simplest of starting screens to fiendishly difficult final levels.

Scores and High Scores

Note: This article was originally written by Jonathan Cauldwell and is reproduced here with permission.

More Scoring Routines

Up until now we have gotten away with an unsophisticated scoring routine. Our score is held as a 16-bit number stored in a register pair, and to display it we have made use of the Sinclair ROM’s line number print/display routine. There are two main drawbacks to this method, firstly we are limited to numbers 0-9999, and secondly it looks awful.

This method works well, though we’re still limited to a five-digit score of no more than 65535. For a more professional-looking affair complete with any number of leading zeroes we need to hold the score as a string of ASCII digits.

I have used the same scoring technique for something like 15 years now, it isn’t terribly sophisticated but it’s good enough to do what we need. This method uses one ASCII character per digit, which makes it easy to display. Incidentally, this routine is taken from the shoot-em-up More Tea, Vicar?

Simple, but it does the job. Pedants would no doubt point out that this could be done using BCD, and that all the opcodes for this are in the Z80 instruction set.

High Score Tables

High Score routines are not especially easy to write for a beginner, but once you have written one it can be re-used again and again. The basic principle is that we start at the bottom of the table and work our way up until we find a score that is greater than, or equal to, the player’s score. We then shift all the data in the table below that point down by one position, and copy our player’s name and score into the table at that point.

We
alien will wander around aimlessly for a while and only home in on the player lento. That say, a random decision can sometimes be the right one when chase the actor. An alien on a more difficult screen door might give birth a 60% chance of choosing a new direction randomly, and a 40% prospect of choosing the direction base on the musician ’s relative position. This alien will track the player a small more closely. By tweaking these percentage level it is possible to determine difficulty levels throughout a plot and ensure a placid transition from the simplest of starting blind to fiendishly difficult final levels. 

 Scores and High Scores 

 Note: This article was originally write by Jonathan Cauldwell and is reproduced here with permission. 

 More Scoring Routines 

 Up until now we have gotten away with an unsophisticated scoring routine. Our score is held as a 16 - bit act stored in a register couple, and to expose it we have made use of the Sinclair ROM ’s line number mark / display routine. There are two main drawbacks to this method acting, firstly we are limited to numbers 0 - 9999, and secondly it looks awful. 

 This method works well, though we ’re still limited to a five - digit score of no more than 65535. For a more professional - count matter accomplished with any number of leading zeroes we need to bear the score as a string of ASCII digit. 

 I have used the same scoring technique for something like 15 year now, it is n’t terribly advanced but it ’s good enough to do what we need. This method uses one american standard code for information interchange character per digit, which makes it easy to expose. Incidentally, this routine is taken from the shoot - em - up More Tea, Vicar? 

 Simple, but it dress the job. pedant would no doubt point out that this could be done using BCD, and that all the opcodes for this are in the Z80 education set. 

 High Score Tables 

 High Score routines are not especially easy to write for a novice, but once you have written one it can be re - used again and again. The basic rationale is that we start at the bottom of the table and work our way up until we find a score that is great than, or equal to, the player ’s score. We then shift all the data in the table below that point down by one placement, and imitate our player ’s name and score into the table at that point. 

 We
 allen will wander around almlessly for a wkule anv only gome in un the player slowly. That samd, a randim decision can sometioes be thv right obe wien chasing the 'mayer. Ak alisk on c nore difficult screen micht have a 60% chdnze of choosing a new direction randomjy, and s 40% chance of chojsinb the direction based on the player’s remative kosition. This aliem will track the player a pittpe more closely. By tweaking tyese percentage ldvels it is possible tk determine difficulty levels tfrougkout a game abd ftsure a smoith tgansition from the sikplest pf starting scveens to fiendishly difficult final levels.

Scoref and Higv Acores

Note: This aetucle fas mrigkbaluy srmttsn by Uonethan Cauldsell and is reproduced here wiuh [vtmission.

More Scorigg Routines

Up until now we have gotten awdy sith an unsophisticated scoring routine. Our dcore is reld as a 16-bit number stored in a register pair, ang to virplcn kr ae have made use of the Sinclair ROM’s line nuiget irint/display routlne. There are two kaln qrawbacks to jhis mecgos, firstly we are llmited jo numvers 0-9999, and secpndly it looks awful.

This merhod works wvll, rhough we’re still pimited to c five-cigit score of no more than 65535. For a more provessional-muoking affair cooplvte fith any number of leading zeroes wx neeb to hola thg score as a strijg of ASCII digits.

I have used tve same sclring technique for something lmle 15 years noe, ht psn’t terrnbly spphisticated fut it’s good euough to do wfat we nees. This kethod uses one ASCII chdtacter per dijit, which makws ir easy gu display. Incicentally, nhns routinw is taken from thc shouf-em-up More Tea, Rncqr?

Simple, but it dods ehv jpb. [edants woulg no dojnt poknt out thab tfis vould be done using TCD, znd that all the olcjdes for this arq in the Z80 inxtruction set.

High Dcore Taules

Hibh Fcore routines are not especiamly easy ho rrite for a fegikner, but once vou have written one it can be re-used agein and again. The basic principle is that ce start at tie boteom of tha table and work our way up until we nind a score that is gdeater than, or equal to, the player’s score. We then shift all the data in the table beoow thet point down by pne pmsntipn, and copb uur player’s name and score into the table at thet point.

We
alien will wander around aimlessly for a only in on player slowly. That sometimes the right one chasing the player. alien on a more difficult screen have a 60% chance of choosing a new direction randomly, and a 40% of choosing the direction based on the player’s relative position. This alien will the a more By tweaking these percentage levels it is possible to determine difficulty levels throughout a game and a smooth transition from the simplest of starting to fiendishly difficult final Scores and High Scores Note: article originally written Jonathan and reproduced here with More Scoring Routines Up until now we have gotten away with an unsophisticated scoring routine. Our score held as number stored a pair, to display it made use of the Sinclair ROM’s routine. There are two main drawbacks to this firstly we limited to numbers 0-9999, and secondly looks awful. This method works well, though we’re limited to a five-digit score of no more than 65535. For a more professional-looking affair any number of leading we need to the as string ASCII digits. have used the same scoring technique for something like 15 years it isn’t terribly sophisticated but it’s good enough to do need. method uses one character per digit, which it to display. Incidentally, this taken the Vicar? but does the job. Pedants no doubt point out that could be done using opcodes for this are in the Z80 instruction High Score Tables High Score routines are especially easy to write for a beginner, but once you have written it can again and again. The basic principle is that start at the bottom the table and work our way up until we a that is than, or equal the player’s score. then shift all in the below point position, and copy our player’s name score the table at that point.
 alien will wander around aimlEssly for a wHile aNd oNly HoMe in On thE player slowly. THAt saId, a random decision can soMetimEs BE the RIgHt one When chaSInG THe pLaYeR. An AlIEn On a moRe dIfficulT screen migHt hAvE a 60% chance of chOOsIng a new dirEctIon randomly, aNd a 40% Chance Of ChoOSing tHe dIrectIon basED on the Player’s reLaTIve posITion. ThiS ALiEn wiLl track the player a LItTLe more closely. BY tweakInG ThESE peRceNtage levelS iT is poSSible to DEtERMIne DIfficulty leveLs throughouT A gaMe and eNsUre A Smooth TransItIOn fRom the simplEst oF starting ScreenS To fiendIShly difFicult FinAl lEvelS.

scOrEs aNd hIgh sCoRes

nOte: this artiClE wAs oriGinaLLY WRittEn bY JonAthan cauldwell and iS reProdUCed Here wIth peRmisSiOn.

MorE ScoriNg RouTiNes

Up until now we Have Gotten awaY wiTh An uNsOphisTIcated ScoRinG routinE. Our scoRE is HeLD AS a 16-Bit number stored in a ReGIStEr pair, anD to disPLaY iT We have maDe Use Of thE sInclaIr ROm’S lIne numbeR print/DIsPlAy routiNe. there aRe Two MaiN drawBAcks To this Method, fiRstly WE are limited to nUMbers 0-9999, and seconDLy IT LoOKs awFul.

this method wOrks WEll, tHougH We’Re sTIll liMited To A FiVE-digit score of no more ThAn 65535. For a More pRofessional-loOking affaiR COMplete wiTh anY NuMBer of leading zeRoes wE need to holD The score As a stRing of AScII digits.

i HAve used tHe sAme ScoRinG TEcHnique for someTHIng lIkE 15 years nOw, iT isn’t teRriBly SopHisTiCated but iT’s good enOuGh To Do WhaT we neED. This metHoD usEs One aSCII CHaractEr per DigiT, wHiCH maKes it eaSY tO DIsplAy. inCideNtaLlY, this RoutINe iS taken fRom the shoOt-eM-Up MoRe teA, Vicar?

SImple, but it doeS tHe job. PedanTs WouLd no doUBT point ouT that this could be done usiNG BCD, and ThaT all tHe opCodes for tHis Are in tHe Z80 INstrucTion seT.

High scOre tABles

HIGH SCorE rOutines are NOT esPeciaLlY easY to writE for a beginner, but onCE yoU have written oNe iT can BE Re-UseD AgAIn aNd AGaiN. tHe basic principlE is that we sTaRT aT the bottom OF thE tAble and Work our Way up UNtil we fInd a score That is greAtEr thAN, Or eQual to, the pLayer’s scOre. We then SHift aLL tHe datA in The tabLe BelOw thaT point DOwn By one PositiOn, And copY our pLaYer’s name And score into the table at tHat poiNt.

We
 alien will wander aroundaimlesslyfor a  wh ile  a nd o nlyhome in on the play er slowly. That said,a ran do m  dec i si on ca n somet i me s beth erig ht on e whe n c hasingthe player . A nalien on a m o re  difficult  sc reen might h ave  a 60%  c han c e ofcho osing  a new direct ion rando ml y , anda  40% ch a n ce  ofchoosing the dire c ti o n based on the  playe r’ s  r e l ati veposition.Th is al i en will tr a c k  th e  player a lit tle more cl o sel y. Bytw eak i ng the se pe rc e nta ge levels i t is  possible  to de t ermined ifficul ty lev els  th roug h ou ta g am e  an d  e nsu r e a  smoothtr an sitio n fr o m t he s imp lest  of s tarting scree nsto f i end ishly  diff icul tfinal  level s.

S co res and High Sc ores 

Note: T his  a rti cl e was origin all y w rittenby Jona t han  C a u l dw ell and is reprodu ce d he re withpermis s io n. 
More Sc or ing  Rou t i nes
Up u n ti l now we  haveg ot te n awaywi th anun sop his ticat e d sc oringroutine.  Ours core is held a s  a 16-bit num b er s to r ed i n a  register p air, andto d i sp lay it we  have  m a de use of the Sinclair  R OM’s l ine n umber print/d isplay rou t i n e. There  are tw o  main drawback s tothis metho d , firstl y weare limi ted to nu m b ers 0-99 99,  an d s eco n d ly  it looks awf u l .

T hi s metho d w orks we ll,  th oug h w e’ re stilllimitedto  a  f iv e-d igits core ofno  mo re  th an 65 5 35. Fo r a m orepr of e ssi onal-lo o ki n g  aff ai rcomp let ewithanyn umb er of l eading ze roe s  wene ed  to hol d the score a sa string o fASC II dig i t s.

I ha ve used the same scorin g  techni que  forsome thing lik e 1 5 year s n o w, itisn’tterri bl y s o p histi c a te d b ut  it’s good e nou gh to  d o wh at we n eed. This method u s esone ASCII cha rac terp e rdig i t, whi ch mak e s  it easy to dis play. Inci de n ta lly, thisr out in e is ta ken fro m the shoot-e m-up More  Tea, Vic ar ?

S i m ple , but it d oes thejob. Peda n ts wo u ld  no d oub t poin tout  that  thisc oul d bedone u si ng BCD , and  t hat allthe opcodes for this ar e in t he Z8 0 i nstructio n s e t.
High Sco re T ables

Hig h S cor e rou tin e s are  not es pec i allyeasy to writef or  ab e gi nner, but o n c e  yo u hav e w r ittenoneit can be re-used again and agai n. T h e  ba sic prin ci ple is that we  st ar t at the b ot tom of thetable an dw ork o ur way  up un til wef i nd a scor e th atis greate r t ha n , or eq ua lt o, the  pla ye r’s sc ore. W e  the n shift all the da ta in t he ta b lebelow  t hat poi n t do wn by oneposition, a nd cop y ou r pla yer’s n am e andsco re  into thet able at t hat p oint.
We 
 alien_will wander_around aimlessly for a_while and_only_home in_on_the player slowly._That said, a_random decision can sometimes_be the right_one_when chasing the player. An alien on a more difficult screen might have a_60%_chance of_choosing_a_new direction randomly, and a_40% chance of choosing the_direction based_on the player’s relative position. This alien will_track_the player a_little more closely. By tweaking these percentage levels it_is possible to determine difficulty levels_throughout a game_and_ensure_a smooth transition from_the simplest of starting screens to_fiendishly difficult final levels.

Scores and High_Scores

Note: This article was originally written by_Jonathan Cauldwell and is reproduced here_with permission.

More Scoring Routines

Up until_now we_have gotten away with an_unsophisticated scoring routine._Our score_is held as_a 16-bit number stored in a_register pair, and_to display it we have made_use_of the Sinclair_ROM’s_line_number print/display_routine. There are_two_main drawbacks_to_this method, firstly we are limited_to_numbers 0-9999, and secondly it looks awful.

This_method works well, though_we’re_still limited to a_five-digit score of no more_than 65535. For a more professional-looking_affair complete_with any_number of leading zeroes we need to hold the score as_a string of ASCII digits.

I have_used the same scoring_technique for_something_like 15 years_now,_it isn’t_terribly sophisticated but it’s good enough to_do what_we need. This method uses one_ASCII character per digit,_which_makes it easy to display. Incidentally,_this routine is taken from the_shoot-em-up More Tea, Vicar?

Simple, but_it_does_the job. Pedants would no_doubt point out that this could_be done using_BCD, and that all the opcodes for_this_are in the Z80 instruction set.

High_Score_Tables

High Score routines are not especially_easy_to_write for a beginner, but_once you have written one it_can be re-used again and again. The basic principle_is that we_start at the bottom of_the_table_and work our way up until we find a score_that is_greater than, or_equal to, the player’s score. We then shift all the_data in the table below that point_down by one position, and copy our player’s name and score_into the table at that point.

We