tibasic Posted January 29, 2019 Share Posted January 29, 2019 (edited) 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. SKI99.zip Edited February 4, 2019 by tibasic 12 Quote Link to comment Share on other sites More sharing options...
jrhodes Posted January 29, 2019 Share Posted January 29, 2019 Nice! Curious about that python utility script. 1 Quote Link to comment Share on other sites More sharing options...
ti99iuc Posted January 29, 2019 Share Posted January 29, 2019 (edited) nice result on TIBasic! just that during my trials i get an error. this happens when the skier go out of the screen on the left: 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 January 29, 2019 by ti99iuc 1 Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 1, 2019 Author Share Posted February 1, 2019 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 Imageimport numpy as npimport matplotlib.pyplot as pltim = Image.open('image.png', 'r')width, height = im.sizevalues = 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 pixelprint(width)print(height)print(round(get(10,10),2))n=0f=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=outputplt.contour(X, Y, Z, colors='black');plt.show() 1 Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 1, 2019 Author Share Posted February 1, 2019 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. 3 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted February 1, 2019 Share Posted February 1, 2019 Looking forward to playing this one when I get home tonight!!! 1 Quote Link to comment Share on other sites More sharing options...
speccery Posted February 2, 2019 Share Posted February 2, 2019 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... 2 Quote Link to comment Share on other sites More sharing options...
oddemann Posted February 3, 2019 Share Posted February 3, 2019 Is it a txt file or dsk? Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 4, 2019 Author Share Posted February 4, 2019 Is it a txt file or dsk? The file I believe is in TIFILES format. It was saved with the Classic99 emulator which I used to develop the game. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted February 4, 2019 Share Posted February 4, 2019 Are we at the final version yet or are you still tweaking the game? 1 Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 4, 2019 Author Share Posted February 4, 2019 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. 2 Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 4, 2019 Author Share Posted February 4, 2019 Are we at the final version yet or are you still tweaking the game? Yes it's all finished I think. Thanks for everyone's comments. I've added the finished version to the first post. It has the same name as the previous version. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted February 8, 2019 Share Posted February 8, 2019 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. 1 Quote Link to comment Share on other sites More sharing options...
sometimes99er Posted February 8, 2019 Share Posted February 8, 2019 Very nice. Good job. Quote Link to comment Share on other sites More sharing options...
+Vorticon Posted February 8, 2019 Share Posted February 8, 2019 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. Quote Link to comment Share on other sites More sharing options...
tibasic Posted February 8, 2019 Author Share Posted February 8, 2019 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. 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! 2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.