Jump to content
IGNORED

New TI Basic game: Skier 99


tibasic

Recommended Posts

I thought I'd have a go at some more simple games so I could concentrate more on the presentation. This one is a vertical scrolling skiing game. It's pretty standard however I have used a couple of utility programs to give the the game a nice look. One is a word processing program written in basic that justifies the text. This I have use for developing the instructions. It makes things easier and enables me to think more freely about the information I'd like to put in there. The second utility also written in basic plots giant 4x4 pixels on the screen a bit like the ZX81 fast enough to plot complex shapes in a matter of minutes! I have also developed a Python script that can convert images into a format that can then be imported into a basic program. Take a look at the pictures from the game. They are printed in seconds on the screen in the game as they are prepared pictures.

 

I will post the utility programs once I have some documentation on how to used them but in the meantime here is the game. I have been running up against the 'memory full' message so hope it is all ok now. There is a table of imaginary of skiers that you can compete against and try to get the fastest time. There is Skier 64 and Skier 20 etc. You will need to go through every gate. It is also a practice mode were you can time your run without being disqualified for missing a gate.

 

Thanks to TheBF for the sorting routine posted in the 'Fast Simple Combsort in BASIC' thread which I used in the program.

post-34194-0-66299500-1548774844.png

SKI99.zip

Edited by tibasic
  • Like 12
Link to comment
Share on other sites

nice result on TIBasic! :D

 

just that during my trials i get an error. this happens when the skier go out of the screen on the left:

 

post-24673-0-55523700-1548779993.jpg

 

in addition i would suggest that when the game ending and asks if the player want restart or finish, maybe it should be better to restart from the choice of the level menu rather than from the title screen again?

Edited by ti99iuc
  • Like 1
Link to comment
Share on other sites

Here's the Python script for processing a grey scale png image. It's in the spoiler tag.

 

The image for processing has to be 64x48 pixels in size. I've attached an example test image. The script will turn the image into a series of basic data statements ready for copy pasting into the plotting program (not included). The script will also display the processed image as a check. It's upside down when displayed. I can't remember why it's like that but the important thing is the data lines are in the right sequence. A text file (image.txt) is written by the script with the data. It's possible to open the text file and see the image as 1s and 0s.

Next I'll take a look at the TI Basic plotting program and get that ready.


from PIL import Image
import numpy as np
import matplotlib.pyplot as plt

im = Image.open('image.png', 'r')
width, height = im.size
values = list(im.getdata())

x = np.linspace(0, 64, 64)
y = np.linspace(0, 48, 48)
X, Y = np.meshgrid(x, y)

def get(a, b):

x = int(a)
y = int(b)

 

rgb = values[width*a + b]

pixel = rgb[1]
return pixel

print(width)
print(height)
print(round(get(10,10),2))

n=0
f=open('image.txt', 'w')
output = [[0 for i in range(width)] for j in range(height)]
for i in range(height):
f.write(str(2000+i)+" DATA \"")
for j in range(width):
n=get(i, j)
if n < 150:
output[j] = 0
else:

output[j] = 1
f.write(str(output[j]))
f.write("\"\n")
f.close()

Z=output
plt.contour(X, Y, Z, colors='black');
plt.show()

 

post-34194-0-98852600-1549015741.png

  • Like 1
Link to comment
Share on other sites

ti99iuc thanks very much for testing the game! I think I've solved the bad value at 1010 problem. Adding these line should do the trick:

 

1420 CALL HCHAR(24,2,TREE,30)
1490 CALL HCHAR(24,2,TREE,XICE-4)
1520 CALL HCHAR(24,2,TREE,XICE-4)

 

Next I'll look at skipping the title screen when restarting.

  • Like 3
Link to comment
Share on other sites

This is a fun game :)

I barely resisted firing it up in classic99 (I did fire up classic99 but did not load the game) and instead ran it on my FPGA TI-99/4A for the first time.

It is pretty hysterical when the CPU is running at 39x the normal speed ;-)

I was actually wondering why it is not running any faster than it is (which is very fast), but that is probably due to sound effects. I haven't looked and don't remember from Basic manual, but I assume the call sound (is that the name of it) commands have a timing parameter which is probably tied to vertical frame sync in its implementation, and thus can slow down the FPGA system the same way as the real iron. Any timing based on loops would just run crazy fast, but the sound effect lengths seem the same when I run at maximum speed and when I ran at "slow" speed. I also notice that my "slow" speed is not very slow at all anymore...

 

I also found a bug/limitiation in my setup: in my system I am using PC keyboard and capturing the keypresses on my PC. I have windows program I wrote which I use to load ROMs etc to the FPGA; this same program also captures keyboard presses and sends them to the FPGA through USB, using my own serial protocol. Now the game expects all button presses to be in upper case, but I don't support caps lock, so need to push shift while playing...

  • Like 2
Link to comment
Share on other sites

This is a fun game :)

I barely resisted firing it up in classic99 (I did fire up classic99 but did not load the game) and instead ran it on my FPGA TI-99/4A for the first time.

It is pretty hysterical when the CPU is running at 39x the normal speed ;-)

I was actually wondering why it is not running any faster than it is (which is very fast), but that is probably due to sound effects. I haven't looked and don't remember from Basic manual, but I assume the call sound (is that the name of it) commands have a timing parameter which is probably tied to vertical frame sync in its implementation, and thus can slow down the FPGA system the same way as the real iron. Any timing based on loops would just run crazy fast, but the sound effect lengths seem the same when I run at maximum speed and when I ran at "slow" speed. I also notice that my "slow" speed is not very slow at all anymore...

 

I also found a bug/limitiation in my setup: in my system I am using PC keyboard and capturing the keypresses on my PC. I have windows program I wrote which I use to load ROMs etc to the FPGA; this same program also captures keyboard presses and sends them to the FPGA through USB, using my own serial protocol. Now the game expects all button presses to be in upper case, but I don't support caps lock, so need to push shift while playing...

 

Glad you liked it. Thanks for pointing out the fact the game uses upper case. You're welcome to edit the code and change the lines so lower case keys can be used for left and right, i.e.

950 IF K<>115 THEN 970

970 IF K<>100 THEN 990

 

For this game I will keep the keys in upper case as all the other keys are in upper case but I've edited the instructions in the new version to point out the keys need to have the capslock on. I haven't actually used my real TI99/4a in years and gotten used to using emulators mostly Classic99. I've only just recently bought my first TV! So maybe that will change in the future.

  • Like 2
Link to comment
Share on other sites

Played tonight on my real console. :) As with most games, it looks and feels much better on real hardware. Thanks so much for putting this out! Always need more console BASIC games. :)

Thanks glad you like it!

 

Very nice. Good job. :thumbsup:

Thanks!

 

Finally got a chance to try it out and I love it! Extremely well done!

Your use of external helper programs to create the splash screens is ingenious.

Game is up on the TI Gameshef site.

Cool, thanks for putting it on the TI Gameshelf site!

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