Jump to content

Photo

"Tiles" COMPUTE! Magazine program conversion


52 replies to this topic

#1 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu Jan 20, 2011 10:18 PM

This line contains initial write-up information, COMPUTE! Magazine scans, and original program from 1988.

"Tiles" is a program which appeared in COMPUTE! Magazine, Volume 10, Number 2, Issue 93, February 1988, Pages 30-46. The program was originally written by Rick Harrison, with versions for the Commodore 64, Apple ][, Atari 8-bit, IBM PCjr, Amiga, and Atari ST. The Texas Instruments conversion is based upon the game description in the article. The graphics are based upon the Atari ST version, with the screen layout matched as closely to the original versions as possible.

After COMPUTE! dropped the TI-99/4A, I obtained permission from ABC Publications and COMPUTE! Magazine to produce and distribute my TI-99 conversions of programs which appeared in the magazine. "Tiles" is one of these conversions.

As a budding programmer, I wrote this conversion back in 1988, and last year I was able to decode the original RadioShack T-10 cassette which holds the "final" version of the program.

It is atrocious. I mean, it works, but, Dear God, the code is horrendous.

So, starting in October 2010, I have been reprogramming the game. I have re-used a ton of the original elements, re-worked the screen layout, added a few things, and completely scrapped the main game loop.

I am not ready to present any work just yet, and I shudder at the prospect of showing the original code before I have the final product ready for comparison. I would, however, like some thoughts on a chunk of code over which I am currently agonizing.

The routine is to return a value of J based upon the directional keys within a split keyboard scan, fire button (or associated key,) joystick position, as well as a few other keys:

Spoiler


The problem is the sharing of certain keys by the two different key-scan modes which will be used. For instance, while FCTN keys are not returned, the non-FCTN part of the key is detected. I try to account for that in my code. Fortunately, there are no value overlaps between what I want from each key scan. For instance, AID is 1 in unit 3 but 1 in units 1 and 2 is unused, E/X/S/D from units 1 and 2 are 0, 2, 3, and 5 (not respectively) which do not overlap with REDO and BACK, etc.

I attempt to overcome key scan disparities while retaining performance and catch the key before the user releases it by jumping from one CALL KEY to the next as quickly as possible.

Below is the code, followed by pseudo-code narrative. I also left line 1450 in place in a REM just to show some of the numerical technique I have attempted to use. Unfortunately, this formula also returned phantom values for A and W in unit 1 and H and U in unit 2. It also had other shortcomings which I resolved by using a simple POS() comparison.

Spoiler


I would appreciate any thoughts on what I have here.

(Quick note, I never used the original listings to write my conversions. I just read the program descriptions and starting banging out code of my own. I felt that reading others' work would somehow "corrupt" my creative process. hehehe)



#2 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu Jan 20, 2011 10:24 PM

Made a change already:

1350 J=0

I want to be able to logically test J (IF J THEN...), and the "stall value" prevents this.

Edited by OLD CS1, Fri Jan 21, 2011 12:32 AM.


#3 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Fri Jan 21, 2011 7:58 AM

Another change,

1470 IF SGN(X)*SGN(Y)THEN 1440

Since there is no longer a -1 stall value, I can directly RETURN from the subroutine. Original listing will be updated, as well.

#4 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,491 posts
  • Location:Castaic, California

Posted Fri Jan 21, 2011 8:59 AM

Since BASIC is such a slow dog, I would recommend you make thing less complicated by making 3 input routines. First, ask the player up front if they want to use a joystick. That way you only have to make that check once, outside of the game loop. Or, instead of asking them, have a screen that says "press fire to begin" or something similar, and test for both keyboard and joystick at that time, and which ever *way* they hit fire (keyboard or joystick), only test that method in the game. You could set a variable and use ON GOSUB to use the keyboard or joystick routine in the gameloop:

KOJ=0 (keyboard or joystick)
KOJ=(detect keyboard = 1, joystick = 2)

gameloop:

ON KOJ GOSUB 2000,2100


2000 REM keyboard

2100 REM joystick

As for AID / REDO / BACK, why would you constantly test those during game play? Make a third keyboard routine to test for just those inputs outside of the gameloop, once the game is over.

#5 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Fri Jan 21, 2011 10:34 AM

The game allows for using keyboard and joystick interchangeably. AID is used to display help messages, and REDO/BACK are not necessarily used within the game, primarily at the end, but I also wanted a clean quit option other than QUIT or BREAK. It also does not cost much in the POS() check, though if I did not check for any FCTN keys I could use more mathematical formulas.

Considering console BASIC speed, the multi-detection approach may be too ambitious, sadly. Extended BASIC, however, seems to handle this quite well, and I will work an Extended BASIC version when I have completed the program.

Too bad there is no standard mouse for the TI. Would make my life a little easier ;)

I will see how things go as I work on the game loop itself. I may break out different routines for different input options. The routine already has a simple mode select, using the negation of P (current player) will skip the fire button detection (unit 1/2 scan) and only look at the joystick and BASIC key scan (unit 3.)

#6 GratedTopping OFFLINE  

GratedTopping

    Chopper Commander

  • 164 posts

Posted Sun Jan 23, 2011 12:02 PM

Hope you keep your original code. 'Horrendous' as it might be, I want to see it. I'd like to have it right now, actually. (-:

What other conversions of programs from "Compute!" or elsewhere have you done?

#7 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,491 posts
  • Location:Castaic, California

Posted Sun Jan 23, 2011 1:30 PM

Old code is the documentation of your programming skills. The only time you should be embarrassed of old code is, if it looks like code you are currently writing. ;) Also, you learn a lot from old code and mistakes, as well as seeing how someone else solved the same problem. Typing in those monthly programs from Compute! and other magazines is how I learned most of my BASIC programming skills. It was a lot of fun too. I remember going with my mom when she would go grocery shopping, and I'd hang out in the magazine isle and devour the computer magazines, and I could always get her to buy me one or two. I wish there was some way to capture the "magic" of those times. I think that is what draws me to old books and magazines today.

#8 adamantyr OFFLINE  

adamantyr

    Stargunner

  • 1,306 posts

Posted Sun Jan 23, 2011 3:59 PM

Old code is the documentation of your programming skills. The only time you should be embarrassed of old code is, if it looks like code you are currently writing. ;) Also, you learn a lot from old code and mistakes, as well as seeing how someone else solved the same problem. Typing in those monthly programs from Compute! and other magazines is how I learned most of my BASIC programming skills. It was a lot of fun too. I remember going with my mom when she would go grocery shopping, and I'd hang out in the magazine isle and devour the computer magazines, and I could always get her to buy me one or two. I wish there was some way to capture the "magic" of those times. I think that is what draws me to old books and magazines today.


Agreed! Old computer magazines rock... there's just nothing like it now. And most of my co-workers never even started programming until college. :(

Adamantyr

#9 GratedTopping OFFLINE  

GratedTopping

    Chopper Commander

  • 164 posts

Posted Sun Jan 23, 2011 6:02 PM

Oh yes, I loved typing in programs on my TI from magazines and I remember...

- photocopying pages from issues of "Compute!" at the school library (and being
disappointed when I found a TI-specific program from very early issues torn out)

- checking out programs for errors and being excited about finding and fixing
them before a "real" fix would be revealed in a future issue

- purchasing the "Compute!'s TI Collection, VOLUME II" at a "Waldenbooks" in 1986 when
I was a young lad of 12

- I always appreciated how the TI's commands were easier to understand; the C64 peek's
and poke's looked so annoying

#10 unhuman OFFLINE  

unhuman

    Stargunner

  • 1,203 posts
  • Location:Vienna, VA

Posted Sun Jan 23, 2011 7:19 PM

Yep - I didn't have any friend who could write a game on one of their systems... I could do all sorts of cool stuff....

Of course the games they pirated were arguably better (well known) than what was available to me. Of course TI-99 Q*Bert was better than any other version.

Ever type in a listing from 99'er magazine? They had these vertical lines and blurry font that made mistakes commonplace. Debugging miskeys / errors was far easier in real code than finding the oddball in the pokes.

-H

Oh yes, I loved typing in programs on my TI from magazines and I remember...

- photocopying pages from issues of "Compute!" at the school library (and being
disappointed when I found a TI-specific program from very early issues torn out)

- checking out programs for errors and being excited about finding and fixing
them before a "real" fix would be revealed in a future issue

- purchasing the "Compute!'s TI Collection, VOLUME II" at a "Waldenbooks" in 1986 when
I was a young lad of 12

- I always appreciated how the TI's commands were easier to understand; the C64 peek's
and poke's looked so annoying


Edited by unhuman, Sun Jan 23, 2011 7:20 PM.


#11 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Jan 23, 2011 10:32 PM

Hope you keep your original code. 'Horrendous' as it might be, I want to see it. I'd like to have it right now, actually. (-:

What other conversions of programs from "Compute!" or elsewhere have you done?


Oh, I will keep it. In fact, I have already exposed my shame in a different venue. heheheh

Only COMPUTE! stuff. Off the top of my head: "Leaping Larry," "Hickory, Dickory, Dock," "Laser Strike," "Block Battle" (my best, IMO,) and "Laser Chess" (never finished.) There were two others that I started, but I cannot remember the names, one was about a balloon and lasers, and the other was a honeycomb puzzle of sorts.

Old code is the documentation of your programming skills. The only time you should be embarrassed of old code is, if it looks like code you are currently writing. ;) Also, you learn a lot from old code and mistakes, as well as seeing how someone else solved the same problem. Typing in those monthly programs from Compute! and other magazines is how I learned most of my BASIC programming skills. It was a lot of fun too. I remember going with my mom when she would go grocery shopping, and I'd hang out in the magazine isle and devour the computer magazines, and I could always get her to buy me one or two. I wish there was some way to capture the "magic" of those times. I think that is what draws me to old books and magazines today.


I did a lot the same in my youth. My parents got me a subscription to COMPUTE! for my birthday one year, and it wound up being the most anticipated and used reading item I ever received. I had that magazine in my school bag for the entire month, often discussing some of the newer technologies coming our way. I had really great discussions with one of my teachers who was a Mac user and really into technology. Yeah, I fear that a lot of the magic from those days is lost, and I often lament not keeping some of my stuff in better condition so that my kids could one day really understand it.

I used to babysit a friend's daughter a few years back, and she used to sit and play on the TI pretty much the whole time she was over. Was kinda neat to watch her. I was even more tickled when she took right away to my Amigas. A smart kid with good taste. I cannot speak for the magic today, as I am not a part of this new "geek" generation, which often is more "gamer" than "geek," so I do not know what magazines or what-not are out. I do know, however, that very few of them have over used a computer with a ROM-based OS which did not requite booting; a computer which is ready to follow your every command within seconds of being powered on; a computer with less power than a modern graphing calculator :)

While digging through storage, I was able to develop a simple time-line of my programming skill development. Pretty neat, actually. As embarrassing as my old programs may be, I do enjoy cleaning them up. Especially the machine language I wrote from back then. Over the next few years of free time (note, I did not say, in my free time over the next few years ;)) I plan to convert a number of my BASIC programs into ML by hand. Some may call that crazy when there is a compiler available, but where is the fun in that?

Yep - I didn't have any friend who could write a game on one of their systems... I could do all sorts of cool stuff....

Of course the games they pirated were arguably better (well known) than what was available to me. Of course TI-99 Q*Bert was better than any other version.

Ever type in a listing from 99'er magazine? They had these vertical lines and blurry font that made mistakes commonplace. Debugging miskeys / errors was far easier in real code than finding the oddball in the pokes.


We had 99er at the junior high school library. I remember typing in a few programs: a nano-processor (4-bit CPU emulator,) some sort of body simulator where you controlled heart rate and respiration to keep the body in line, a robot archeology program, and Robochase (I think that is the name,) which became quite popular and scores were contested between user groups.

During this era of my life, I was a latch-key kid and used to invite my friends from the neighborhood to come over and test play my games while my parents were at work. That was around the same time I made my switch from the TI to the Commodore 64.

I used to go to "swap parties" when I had my Commodore 64, which had far better games than my TI and kept me happy enough, even with the games I bought legitimately, to not pester my parents for an NES. I did not generally "get" the piracy angle as a lot of the games I downloaded or obtained through swap were not available in the US, and I did buy a lot when I would come across them. And, I have to agree that "Q*Bert" on the TI is one of the best arcade conversions, particularly for the TI. "Frogger" is another good one.

Anyway, I will put some more work into the game after I do this lit review for class, which I expect to complete tomorrow. Had a server take a dump due to burst capacitors on the motherboard last week, and I have been cleaning up ever since (just finished early this morning, thankfully.) I appreciate the interest, and I am kinda excited about putting them online.

Edited by OLD CS1, Sun Jan 23, 2011 10:40 PM.


#12 matthew180 OFFLINE  

matthew180

    River Patroller

  • 2,491 posts
  • Location:Castaic, California

Posted Mon Jan 24, 2011 8:46 AM

Had a server take a dump due to burst capacitors on the motherboard last week, and I have been cleaning up ever since (just finished early this morning, thankfully.)


You can fix those. My server started being unstable after 3 years (I hate to reboot a machine with 725 days of uptime! I run FreeBSD by the way) and when I looked at the motherboard, it had the classic failed capacitors ("poofed caps" as some non-technical people call them). I thought that problem had come and gone back in 2003, but not so. It seems it is still with us even today!

http://en.wikipedia....apacitor_plague

The first time a friend showed me a motherboard with the problem (circa 2004), I said I could fix it. I ordered the caps from Mouser (all of about a $1.50) and started in on trying to remove the bad caps from the motherboard. I failed. For the life of me I could not get the things out. A 6-layer board, coupled with my lack of cleaning the area very well, and holes that were not much larger than the leads on the capacitor... It was a mess. But I still say desoldering is 10 times harder than soldering.

To date I have fixed (due to bad capacitors): 3 LCD monitors, 1 motherboard, and 1 router. All in the last year. It still amazes me to open a device and see the failed capacitors. It *really* shocked me when I saw them on my motherboard because I paid a lot of money for it, and it was a brand I like and have used for years (Gigabyte). Most motherboards are using surface mount caps now, but I guess my model was on the tail end of using through-hole electrolytics.

If you are comfortable with a soldering iron, the way to repair a multilayer board is:

1. Clean, clean, clean the area! Use 99.956% pure alcohol (not the isopropyl stuff you get at Rite-Aid or Wallgreens, you will probably have to order some (Mouser and Digikey sell it)) and Q-tips. Then, before you desolder, use no-clean flux on the leads.

2. Use a hot-air bath.

3. Use ChipQuik, or a knock-off.

ChipQuik is like solder, but when mixed with solder it reduces the melting point significantly, so you can do low-temp desolering, which means you won't damage the board and the parts are easy to remove. For a hot-air bath, I made a rig for my heat gun and I test the temperature with an oven thermometer (not the most accurate, but it is well within the tolerance needed for this kind of work.)

You can get a lot of info (and equipment if you have the cash) here: http://zeph.com

Sorry for going off topic. It just seems I'm doing more circuit work and repair lately, rather than coding.

#13 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Jan 24, 2011 2:09 PM

You can fix those. My server started being unstable after 3 years (I hate to reboot a machine with 725 days of uptime! I run FreeBSD by the way) and when I looked at the motherboard, it had the classic failed capacitors ("poofed caps" as some non-technical people call them). I thought that problem had come and gone back in 2003, but not so. It seems it is still with us even today!


Yeah, I have done a few of my own, including some Dell monitors. But I do not do repairs for customers as I cannot guarantee service. Besides, in most cases it is time to upgrade, anyway. Definitely in this case: a six year-old AMD X2 running Small Business Server 2003. Had to go. The back-up hardware was even worse, an eight year-old Pentium 4. Now I have them on a quad-core Xeon, just wish I had time to virtualize them instead of running the OS on the metal.

I have a ten year-old AMD Athlon on a DFI motherboard running my primary Solaris installation. I am scared to death of that one, but it passes visual inspection, never flakes out, and the hard drives all pass diagnostics. It has a replacement in the works right now, though.

Meh, for off-topic. My thread, I brought it up :)

#14 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sat Feb 12, 2011 1:18 PM

Dammit! Who else hates when a block of test code works fine by itself, but then for some unexplained reason fails when integrated into the full program?

#15 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,491 posts
  • Location:Hustisford, WI

Posted Sun Feb 13, 2011 4:33 AM

I pretty much define my life by that.....

#16 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Sun Feb 20, 2011 9:31 PM

Okay, I am happy to make my first 2011 release of "Tiles." This post will always contain the latest release and will be linked from my first post.

Introduction
Spoiler


Basic instructions

Quick instructions: Tiles is a memory game. You will be presented with an increasing number of tiles to find in a pattern up to 30 tiles. Use the keyboard or joystick to play. Standard key scan 1 and 2 for player one and two, respectively: ESDXQ and IJKMY for up, left, right, down, "fire". Joystick 1 left answers "1" or "Y" and right answers "2" or "N" for appropriate questions. Space bar and fire are interchangeable.

You will be shown the tiles then asked to hide them. You lose points the longer you wait to hide them: 60 points if your score is 5000 or over, 40 points for 2000 and over, and 20 points for under 2000. After hiding you have to find them. You score 100 points for each find, and are penalized 100 points for each miss. The game ends if you run out of points.

When playing two players, the first player to 30 tiles is the game winner. The player with the most points is the point winner. The high score for each player is remembered during the gaming session. (I have coded in a points-tie condition, but not a tiles-tie condition, yet.)

To quit the game, press CLEAR or QUIT. After a game is over you will be asked if you want to play again.

Speech is available if you are using the Terminal Emulator II catridge and a speech synthesizer -- neither of which I actually owned at the time, so I just kinda winged it. You cannot select speech if you run the program in TI Extended BASIC as Tiles uses the TE-II "SPEECH" device. Selecting speech with no synthesizer attached will break the program.


Instruction addendum
Press any key to end the attract mode and being the game. Number of player selection, play again inquiry, and surrender inquiry have time-outs which will return to the previous action. There is no speech. Since the score display does not update while waiting for you to hide your displayed tiles, I have added a second tone to the timer tick which indicates that your score has dropped below 400 points. You may press AID during certain parts of the game to remind you of keystrokes. In particular, AID during "find" will show you what you need to press, and BACK will give the current player the option to surrender the game. A player is not penalized for surrendering a game, and the player with the highest score is proclaimed the winner.

When waiting to hide the first tile, you do not lose points. However, incorrect selection in any "level" is rewarded with an error tone and a loss of 100 points. If you fail to find all of the tiles and run out of points, the pattern will be shown to you and your game will end. If you are playing a two-player game, the other player will continue until completion of a 30-tile pattern or points bankruptcy.

Moving on, things to do and left to be fixed
Spoiler


Now on to the meat. I have attached scans of the original COMPUTE! article. As well, I have put two archives which contain my original embarrassing release and the 2011 release. In each is also a wav of the program: 1988 is the original sample from the C10 cassette on which the program has been stored for all these years (in MP3 VBR format due to the final size of the upload versus my 2MB-per-file limit,) and the 2011 output of CS1er which compresses very well as it is purely digital. (Note that, due to the MP3 encoding, I am not certain how Tape994a will decode the file once extracted to a wav, and I have not tried.) I did all of my work in Classic99 and have not yet loaded the produced wav into real hardware, but will as my goal is to run on actual metal. Note that the 1988 listing includes special characters which may not paste into Classic99.

21-Feb-2011, 12:34am: In lieu of writing up a picture tutorial of how to set up a VPN in Windows 7 and a server emergency evacuation guide, I played the wav into my console from my laptop. I am happy to advise that the game seems to actually play better on the console than in emulation. I was even able to do some rudimentary conversion to XB and re-discovered the 28-column limitation with DISPLAY (ugh.) I also noticed that what appear to be garbage collections happen at the same points in both TI BASIC and TI Extended BASIC... interesting. And, finally, I see that the program has shrunk from its original 9.75k to 7.75k, reducing the tape load time from 2:20 to 1:44.

Attached File  tiles_compute_page1.png   694.41KB   16 downloadsAttached File  tiles_compute_page2.png   762.15KB   16 downloads
Attached File  Tiles1988.zip   1.36MB   51 downloads
Go here for latest Tiles2011

As games go, this is a pretty simple one and I hope people enjoy it. I have a couple more which I will be working on rewriting, including one which will definitely be able to take advantage of SXB. I would love to get more involved projects going -- it seems this has gone on for months with very little real work put in place -- but I simply lack the time these days. That should change around the summer time.

Screen shot of Tiles from 1988
Attached File  tiles.png   2.9KB   9 downloads

Screen shot of Tiles from 2011
Attached File  tiles_2011.png   2.92KB   9 downloads


Edited by OLD CS1, Mon Feb 28, 2011 1:38 AM.


#17 Opry99er OFFLINE  

Opry99er

    Quadrunner

  • 9,491 posts
  • Location:Hustisford, WI

Posted Sun Feb 20, 2011 10:02 PM

Neato... I'll be DLing this in the morning. Good write up, buddy. =)

#18 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Feb 21, 2011 1:46 AM

Neato... I'll be DLing this in the morning. Good write up, buddy. =)


Thanks. Looking forward to your feedback. Tomorrow I may put some more touches on it of which I made a list tonight.

One of the things I have considered is shifting the message area so row 22 and 23 are the normal message area, and 24 is the informational message line for AID or other (currently, 23 and 24 are message and 22 is informational.) I also will be splitting the color setting routine from the clear tile field routine since I no longer reset colors, allowing the rotating random colors of the attract more to persist throughout the game. The original COMPUTE! versions had random sounds in the attract mode, which I may implement. Amongst a few other minor changes.

Also, in regards to the MP3 conversion of the recorded WAV, I suspect it will not work well with neither real TI hardware nor CS1er or Tape994a. I took the WAV of Tiles2011 produced by CS1er and ran it through lame 3.98 to create a VBR MP3. Upon listening to the two, I can absolutely make out a noise intrusion in the MP3, as well as what sounds like a shift in tone. It also does not seem to "thunk" in my ear during playback like a normal recording does. I may toy with that later this week just to see, but at this point my wager is on, NO.

#19 sometimes99er OFFLINE  

sometimes99er

    River Patroller

  • 4,111 posts

Posted Mon Feb 21, 2011 2:42 AM

Very nice write up and excellent implementation. :thumbsup:

Unfortunately this is not my kind of game, so I've just taken it for a quick spin. A complete machine code version wouldn't make much difference to me, although I'd be very interested in seeing if you made use of the extra resources.

:cool:

#20 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Feb 28, 2011 1:28 AM

Another release of "Tiles." I have made some changes to the program internally, and some changes to game play.

  • After going bankrupt, a player's missed tiles will be shown "thatched" to stand out from ones found
  • Each player is given 500 points to start the game*
  • Players are penalized points for waiting to hide on the first tile (used to only penalize for patterns)*
  • The cursor no longer returns to the upper-left after finding a tile
  • Key detection occurs four times per tick during "hide," which ensures your press does not get missed

* These changes reflect original game play. I was finally able to run the original version in AmigaBasic to gain more insight. I tried the Apple ][ and Atari ST versions, but the emulators I used apparently could not handle the game.

This will probably be one of the last updates I make for a couple of weeks. I am about to head into project weeks, second and final exams so personal pursuits will be mostly suspended.

I plan two more editions in addition to the TI BASIC version. One for straight Extended BASIC, and the other will be compiled. I have already done a lot of coding to use Matt's TIdBiT converter for the Extended BASIC edition, and I have noted a LOT of coding changes in order to be compiled (too bad I cannot use sprites with the compiler) with Wilheim's compiler.

I also have a few changes I want to make to counter TI BASIC's poor performance, which will actually move my source much closer, if not nearly identical in design, to the original COMPUTE! programs. In particular, clearing a 10x6 grid of double-spaced tiles takes a long time, but clearing a known list of squares goes much more quickly.

I have done some play testing and believe I have ironed out the bugs. Let me know if I broke something. Thanks.

Attached File  Tiles2011.zip   100.02KB   19 downloads


Edited by OLD CS1, Mon Feb 28, 2011 1:45 AM.


#21 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Tue Feb 20, 2018 9:01 PM

Arise, chicken!  Chicken, arise!
 
Seven years later.
 
I got a little lost regarding where I was when I last worked on this.  But I have been able to optimize, clean up a little, squash a couple of bugs and create a new bug or two.  The game-play is still the same.  It runs in BASIC or Extended BASIC though does not yet take advantage of the latter.  There will be an Extended BASIC-specific edition once the BASIC program is nailed down.
 
REDO tends to do odd things at odd times, so do not use it.  There are a few more optimizations I will be making, but for the most part game-play looks complete.
 
Here is a listing, a file which will load in Classic99, and the tape wav since we are playing with those these days :)

Attached File  TILES-022018.zip   98.56KB   11 downloads

Spoiler


#22 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Thu Feb 22, 2018 10:36 PM

Attached is RC4 of the Extended BASIC version which takes advantage of more advanced features:

  • Multi-statement lines to increase performance and reduce size
  • Exploitation of longer CHAR statements, eliminating character DATA statements
  • Exploitation of CALL COLOR()'s ability to set multiple sets at a time to speed up attract mode
  • Use of real DISPLAY-AT for increased speed showing information, scores, and drawing the tile board
  • Sprite cursor rather than pointer (pointer character is still defined in this release)

I have been testing game-play and so far all is well.  There will be a change before final release of the determination of a game winner.  As of now if one player goes bankrupt long before the other the game will still end in a tie.  Essentially, there is no way right now to actually win a game playing versus another player.  I have to look at the original COMPUTE! game again and see how a winning game was handled if at all.

 

Attached File  TILESXB-022218(RC4).zip   82.8KB   6 downloads



#23 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Tue Feb 27, 2018 1:49 PM

TFW you are ready to go "gold" and realize the one small remaining quirk requires examining and re-working the main body of the program and at least two supporting sub-routines.

 

 

2013%2F08%2F16%2Ff7%2FSteveCarell.20de9.



#24 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Wed Feb 28, 2018 8:13 AM

These are the "gold" releases of my "Tiles" conversions for the TI-99/4A, in both TI BASIC and TI Extended BASIC version and a version exclusively for TI Extended BASIC.  I will create a proper release thread in the general forum later today.

 

This disk contains two files: TILES and TILESXB.

 

Changes made since the release-candidates:

  • Changed certain utility variables which conflicted between routines and desired game-flow
  • Changed the "Display At" routines to handle multiple lines in a single call
  • Removed labels made redundant by flow changes
  • Moved subroutines around so most calling routines are later in the program than called routines
  • Changed some verbiages to reduce notification lengths to satisfy XB's "DISPLAY AT()" limitations
  • Eliminated a DEFined function for joystick decoding making joysticks surprisingly faster
  • Removed game win or tie (current or high score comparisons) to align with original game behavior
  • REDO is still detected during the game but not acted upon as showing the tiles again would require re-writing several routines and not in the original game
  • Surrendering no longer crashes after the first confirmation is dismissed or times out
  • Stored scores are updated when scores are shown fixing, among others, high scores being missed in-turn
  • TI BASIC: Changed scoring internally to 1s instead of 10s so score display is a little faster (this could have been done for Extended BASIC, also, but the gain is imperceptible)
  • TI BASIC: Various other flow changes to squeeze a little more performance

It was a challenging experience maintaining parity between two similar sources from a common base without any direct relationship between the sources, meaning I have to move code from one source to the other as changes are made and keep track of it.  This was particularly difficult when I had to make a major fix in the main game loop and some of the support subroutines.  While the exact same source could be shared between TI BASIC and TI Extended BASIC, modifications are necessary to take advantage of Extended BASIC's advanced features such as multi-statement lines and the use of logic operations (AND, OR) rather than mathematical equivalents.

 

The Extended BASIC version is written in a way which should allow compiling as-is by just changing the loops.  I am pretty certain nothing illegal in the compiler, such as multiple-variable value assignments or nested IF-THENs, is used in the program.  Even without compiling the Extended BASIC version runs well enough.

Attached Files



#25 OLD CS1 OFFLINE  

OLD CS1

    Quadrunner

  • Topic Starter
  • 5,094 posts
  • Technology Samurai
  • Location:Tallahassee, FL

Posted Mon Apr 23, 2018 10:50 PM

Okay, I just took a quick break from KiCad tutorials and ran a test compile.  There are a couple more timing loops than I considered: the introductory copyright disclaimer and the attract marquee.  But that is just off the bat, as I now think about the time-outs for number of players, surrender, and play again prompt.

 

And more, input detection is extremely overly sensitive.  This will take more work than I originally expected.  We shall see.






0 user(s) are browsing this forum

0 members, 0 guests, 0 anonymous users