Jump to content
IGNORED

"Laser Strike" COMPUTE! Magazine program conversion


OLD CS1

Recommended Posts

@oddemann Thank you.

 

I let the program run for several hours playing itself.  It did not show any strange behaviors nor had it crashed at the times I checked on it.  That is a good thing.  But I did run into an interesting occurrence.

 

The computer logic is, as I stated, rather simple.  It appears that it can find itself in a dead-lock situation.  In particular, this game was the perfect storm.  In GRID 2, the computer player apparently found the two-part explorer, four-part bomber, and five-part mother ship very early in the game.  That left the three-part fighter to find.  The spacing of the random shots leads me to the early-discovery conclusion.  Note at this point there is only one area large enough to contain the three-part fighter, and where the computer should make its shot.

 

However, the computer did not take a shot for over three hours!  I finally terminated the program and started it running, again.

 

DSC04667.thumb.JPG.1d43b367e4b6cb9486276efb5fc91a03.JPG   DSC04668.thumb.JPG.532505463478865e287892593f5565e3.JPG

 

It seems that this situation would be rare enough not to impact a real game of human v. computer.  I spent time reviewing the logic in the original game which not only appears similar to mine (since I largely based my logic on the original's observable behavior,) but also does not appear to contain logic to break out of such dead-lock.  My concern is, as the shot-taking logic is transparent, I cannot be certain that an appropriate spot was not chosen and rejected.

 

I have begun considering a way to prevent this from happening, which could also increase the speed at which the computer takes its shots.  I will have to set up a simulation of this game to test the selection logic for failure.  While I want to pursue this further, I am still not convinced this issue will have real-world impact on games.

  • Like 1
Link to comment
Share on other sites

Dead-lock corrected.  I forgot to clear the detection variable for the solution proposal fit check when switching from horizontal check to vertical check.  The unexpected consequence is to make the logic a bit more effective... now that it checks all four directions.

 

Only other change is that a computer v. computer game ship deployments are not hidden, but are covered quickly after the explorer is placed.

LS-083020.zip

  • Like 1
Link to comment
Share on other sites

@Keneg Thank you for the feedback.  Yeah, I spent a good bit of time working on some of the routines, which I have used in other programs.  I think where this one gets sluggish is in placing the cursor.  I made the decision to show a white dot over a hit ship as you move the cursor.  This involves a calculation of the character to place in that location, and I think it is complex enough to cause additional slowness on top of what we would expect from console BASIC.

 

I thought about this over the weekend and decided I might have something I can do to help with the sluggishness, but I am not sure if breaking the formula apart will give any speed increase versus the program logic which will be required to replace it.

 

Extended BASIC actually running this game as-it-is is appreciably faster, and I will have an Extended BASIC version released to complete the magazine type-in style.  The TI BASIC program is something like 300 lines, which is larger than I would normally expect for a type-in but, in all fairness, the version on other computers are built from multi-statement lines so I think it still fits the spirit.  The Extended BASIC version I hope would have felt right at home within the same pages.

  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...