Jump to content
IGNORED

Crystal Garden - TI BASIC game released


InfernalKeith

Recommended Posts

CRYSTAL GARDEN
by Keith Bergman

a TI BASIC game for the unexpanded TI 99/4A computer (emulator in Overdrive Mode recommended)

 

NEW MANUAL ADDED 8-15-2017

 

 

Overview:
You are the keeper of the Crystal Garden, a timeless and mystical place of energy and light. The balance of the crystals has been maintained by you and your ancestors since time immemorial. But now, intruders have entered the Garden, seeking to dim the light and leach away the energy. Only by opening three portals, one of which is hidden from your view, and absorbing more of the Garden's energy than your foes, can you banish them and restore the Crystal Garden to its balance and splendor.
How to play:
Crystal Garden takes place on a screen full of multicolored gems, interspersed with some white and black spaces. You are at the top left corner of the Garden when the game begins, and one of your foes (we'll call him the Visible Foe) is on the bottom right corner. You are represented by a black stick figure on a white background, while the Visible Foe is your mirror image.
Your goal is to reach the top right corner of the Garden (the first portal), then the bottom right corner (the second portal). Once you've done this, you must find the third portal, which could be anywhere in the Garden - even under a black square. Once you've opened the first two, an indicator number will appear below your score - the number of columns away you are from the third portal. While this number will not give you an exact fix on its location, you'll also be shown the color of the space you're looking for. This will help you narrow down your search.
Keep in mind that the portal square will probably change color during the match, due to shifts in the Garden or attacks by the Rogue Foe. Sometimes noting the changed color of the portal square will help you identify its exact location (as your indicator square will also change color).
In each turn, you move one square in any of the four cardinal directions, or stay put. You can not move onto a black square. You score points for each move you make, depending on the color of the square you land on -- the lighter the color, the more points that gem rewards you. Squares you have traveled on become white squares, which you may revisit, and which will also provide points when you walk on them.
After you move (or elect to stay still), you may use your powers as the keeper of the Garden to shift one horizontal row of gems one space to the right. This will allow you to clear black squares from your path, block your Foe, or just give you a path of lighter gems and more points while on your journey. You cannot shift the row the Visible Foe occupies, but you can shift your own row -- a way to move further to the right (or wrap around the screen to reappear on the left side of the Garden). If you are both in the row, you cannot shift it.
The portals are fixed points - shifting rows and columns do NOT change their location, only the color of the gem or space above them.
You move with the classic ESDX keys, or press SPACE to stay put. When the indicator arrow appears on your left, use E and X to scroll to the row you wish to shift, then press ENTER.
After you move, the Visible Foe takes a turn as well. The Visible Foe leaves a path of black squares in his path, and absorbs energy from gems in reverse proportion to you. The Foe is unable to walk on white squares.
After you and the Visible Foe have each taken a turn, the Garden itself takes a turn, shifting several rows (or columns -- the Garden, unlike you, can also shift vertically). Due to the poison of conflict within its boundaries, when the Garden shifts a row or column, the gem at the end of the shifted section disappears, and a black square forms at the beginning. Thus, more black squares are introduced as the match progresses, further threatening the survival of the Garden.
(The Garden will only shift rows to the right and columns down.)
Similar to your objective, the Visible Foe must reach the left top and left bottom corner of the Garden before he can pursue the hidden third portal.
Every time the Visible Foe scores another 250 points, the Rogue Foe is unleashed. This monster can only enter the Garden from the edges, and can only traverse black squares. It will rampage across as much of the Garden as it can, until it reaches gems it cannot touch, and then it explodes, turning adjacent squares black as it dies.
NOTE: if the Rogue Foe finds you during its rampage, it vanquishes you instantly and the game is over. It is important to avoid large sections of black spaces, especially ones connected to an edge of the playfield.
After the Rogue Foe's rampage, the Garden is in a state of turmoil, and a random number of gems across the Garden will spontaneously "explode" into black squares. After a few moments of this, the turmoil will pass, and the next turn will begin.
For either you or the Visible Foe to open the third portal, you must have the higher score. Thus, if you've unlocked your first two portals, and land on the square of the third portal, but your score is lower than the Visible Foe's, the portal will not open and the game will still be active. You must increase your score, then return to the third portal, before you can win the game.
If the Visible Foe unlocks the third portal and has a higher score than you, the Foe wins, the Garden is lost, and your game is over. If you achieve this feat with a higher score than the Visible Foe, your score stands and you are the winner of the match.
The Rogue Foe cannot open any of the portals during his brief attacks.
STRATEGY NOTES:
Remember, you must always be conscious of your point total. The longer the match goes on, the more of the Garden will be black squares, and the faster the Visible Foe's score will go up. You must play a mixture of offense -- moving toward your portals -- and defense -- using your limited row-shifting abilities to change the terrain to lower the Visible Foe's score, thwart his movements, and cut off paths the Rogue Foe could use to catch you.
Neither of your Foes are particularly intelligent. They react on primal instincts. The Visible Foe can be tricked.
By the time you reach the second portal, the Garden will look very different than when you started. The path to the third portal may seem impossible, but remember, the Garden shifts with every turn. Try to create pathways toward open spaces -- move toward the bright colors and avoid, as much as you can, dark edges where the Rogue Foe can surprise you.
Remember that you can "wrap" from one side of the Garden to the other when you shift rows. If the third portal is far to the left side, this might be easier than trying to pick your way across the Garden one row at a time.
Using your row-shifting ability is an essential part of the game, whether hemming in the Visible Foe or clearing your own path through a darkening Garden. But shift rows when the time is right. Too soon, and the Garden's own shifting changes may undo your work. Too late, and you may not have enough turns to make the changes you need.

CRYSTAL.zip

Edited by InfernalKeith
Link to comment
Share on other sites

crystalgarden.jpg

 

 

Making some refinements as I figure out how the game is actually going to work. Added score displays on either side of the screen, and changed the appearance of the "crystals" (I think they look more like jewels or gems, but "Crystal Garden" is a better title).

 

You can move onto any crystal or white square, the Foe can move onto any crystal or black square, and as each of you moves, you change the playfield behind you. The Garden is able to shift rows and columns of crystals, but it cannot shift the row/column where a player (you or the Foe) stands (so no one gets bumped off the screen before the game even starts).

 

Working on the move routines and the players' turns to shift rows of crystals, then I'll probably call it a night. Once I add in the third-portal stuff, a lot of the main work will be done.

Link to comment
Share on other sites

That's what I get for coding at 4am... I wasn't updating the strings for each horizontal line properly, even though the screen was showing the proper moves for the player, and I can barely decipher my own code from last night. Gotta do some debugging, then move on the the player AI portion of the proceedings. Not sure how bad off I am on memory yet...

Link to comment
Share on other sites

In Akron for the weekend, and for some reason, I can't get online with my own computer, so I had a lot of "offline" time last night after we got the kids to bed. So I was actually able to get a big chunk of the game loop done. The computer player does nothing yet, but the Garden and the human player take their turns, and it looks like everything works. You can move, shift rows of crystals, and it tracks how many of your portals you've found.

 

After you find the second one, a new element is added to the display, under your score. It shows how many columns away from the hidden third portal you are. A crystal also appears either above or below that number, to tell you what color the crystal over the secret portal is. The portal is a fixed location, so different colored crystals (or even an inaccessible black square) may shift over it before you can get to it.

 

Today I'm tackling the computer player, and then the game should pretty much be done, other than testing and writing up the docs. I'm really liking how it's turning out. I think it's gonna be a lot more interesting to play than its screen shots let on... hopefully you agree. :)

Link to comment
Share on other sites

Great to hear about the progress! =) Looking forward to playing.

 

 

The computer player now has enough AI to move on the board, but not yet enough to decide which row to shift during his turn. Ran into a few unforeseen bugs and issues I hadn't thought about. One interesting one -- you get more points when you move onto a crystal depending on its color (they go from dark to light by character set). So if Z is the ASCII code of the character you landed on, you get Z-60 points for that crystal -- a mere 12 points if it's the darkest color possible (ASCII 72), 92 points if you move onto a solid white square (ASCII 152).

 

All well and good, but I wanted the exact opposite effect for the Foe (computer controlled character). I had to do some 3am math to make the scoring a mirror image for the computer player, and came up with:

 

Z=-((Z-64)/8)+11
SCORE=SCORE+(12+(8*(Z-1)))

 

Maybe nothing spectacular for you geniuses, but I was pretty proud of myself. :)

 

There's a lot of duplicated code in this thing -- the play loops are just different enough for the human and computer player that it was easier to copy and paste the code for moving and updating the board, than it was to rework it all to be usable for both players. Loading it into XB and using the SIZE command tells me I've used about 7K of program space, but I dunno how much room the data is taking up -- not getting any MEMORY FULL errors yet.

 

Once the Foe knows how to shift rows, and I add the portal detection for his character, the game's pretty much operational. I am already seeing some tweaks I may have to do, to keep the gameplay balanced and make it more interesting, but for now just getting it to work from start to finish will suffice...

Edited by InfernalKeith
Link to comment
Share on other sites

Just got home from my weekend away and can post a pic of the game in progress.

 

In this screenshot, the human player (black stick figure) has visited one portal, and is on his way to the second. The Foe (white stick figure on black) has made his way across the field to his first portal. The Garden has been taking its turns throughout, slowly letting black squares seep in and replace the colored crystals.

 

Once I make it to the bottom right corner, an indicator will appear beneath my score (on the left side) with clues to the location of the third portal.

 

I wouldn't be so far ahead of the computer player, except that he can't yet shift rows in the Garden. Once he can do that, he can use his turns to move himself along, or to move black squares into my path to block me.

 

So far so good, I think I've caught all my stupid coding mistakes so far. Hoping to have the rest of the AI functionality in place tomorrow night.

 

crystalgarden2.jpg

Link to comment
Share on other sites

  • 2 weeks later...

Update: I've decided to finish this game, even though it's pissing me off. I was tempted to scrap it because I think the AI's gonna be a nightmare in console BASIC, and because I have another idea for the contest that I think is much more do-able. But my trail of unfinished projects is too long already, so I'm gonna give this one a big push this weekend and try to wrap it up in some fashion, so I can move on to my other idea.

 

About to sit with the printout and some graph paper and try to puzzle out AI possibilities old-school.

Link to comment
Share on other sites

  • 6 years later...

WxaQiKI.png

 

Guess who brought back this old TI BASIC beastie from the dead?

 

I'm play-testing it now and will start a new thread for it when I upload it, hopefully Monday.

 

It's turned into a strange strategy game, I'm not sure how many will be into it, but it's been fun to finish a long-dormant project and see it take a shape I never envisioned ages ago.

 

See you soon.

 

Keith

  • Like 3
Link to comment
Share on other sites

ukdGV8C.png

 

Crystal Garden title screen

 

X1tcpPx.png

 

The game is beginning. The player and the Visible Foe are in opposite corners, the gems are colorful, and the Garden looks fairly balanced.

 

ZHejjT2.png

 

A number of turns later, you can see the player approaching the top right corner and first portal. Black squares have begun to infiltrate the Garden.

 

f03AjsR.png

 

This screen shows the indicator on left, which the player is about to use to shift a row horizontally. He has reached the first portal and is heading for the second, in the lower right corner.

 

PkjhPI0.png

 

In a different match, you see that the black squares have wreaked a lot more havoc. The player has had trouble getting to the first portal, and the longer the match goes, the more black squares there are to contend with.

 

BucZkOc.png

 

Later in this match, the player and Visible Foe have each reached the first portal, and are heading for their second. The player is in trouble here. His score is far below the Visible Foe's, and his paths to the second portal are growing harder to navigate with each passing turn. Shortly after I took this screenshot, the Rogue Foe appeared and, with so much black space to work with, quickly found the player and ended the game.

Link to comment
Share on other sites

Crystal Garden ZIP file attached to original post.

 

Like I said, I'm not sure anyone's gonna click with this game, but if you want a weird, kinda slow, immersive, long-ish BASIC game with some interesting strategy elements, give it a chance.

 

I haven't even attempted to compile it yet. I may do that next.

 

It's a hard game. There's a strategy and a way to at least have a chance to win, but it takes some play time to get familiar with it.

 

I look forward to your thoughts on it.

 

Keith

  • Like 4
Link to comment
Share on other sites

  • 2 weeks later...

I have made a few fixes to the game, and - much more importantly - compiled it using Harry Wilhelm's BASIC compiler.

 

Run this one in XB and give it a try if the slowness of the console BASIC version turned you off.

 

I may make a couple more tweaks before being finished with this project -- it's pretty difficult to win even once you get a feel for the gameplay, so I'm thinking of one modification to make the endgame a little more possible. I'm out of memory in BASIC though, and I want to move onto another project, so this one might just be done, unlovable and weird though it may be.

 

Oh, also, in the second half of your turn, the up-down controls are still a little too sensitive. I'm still getting used to adding delays to compensate for the increased speed of the compiled code.

 

Keith

 

CRYSTXB.zip

  • Like 3
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...