Jump to content
IGNORED

Hello and TI BASIC action games


tibasic

Recommended Posts

Hello,

A few years ago I set myself a little hobby project of writing some action games in TI BASIC similar to the early arcade games like Space Invaders, Lunar Lander, Buck Rogers, Pacman, Defender. This has resulted in a handful of games I'm quite happy with and I'd like to share the results.

The game I have attached to this post is a TI BASIC version of Space Invaders and a screen capture from the first level. Some concessions had to be made to TI BASIC, obviously. The main ones are:

1. The player's missile is not animated and only reveals itself as an explosion. The player shoots by placing their cannon under the target and firing.

2. The invader shoots a laser. When an invader is about to fire it will change colour so the player has some time to move out of the way. On the third level this time is reduced.

Hope it plays ok.

 

tibasic

STAR_INV.zip

post-34194-0-93957200-1459342167_thumb.png

  • Like 9
Link to comment
Share on other sites

This is one of the best TI BASIC games I have seen on the TI. You have managed to leverage the inherent limitations as well as strength of TI BASIC to create a very playable and fun game. Foregoing the animation of the fire effect from the player is a stroke of genius as it speeds up the game significantly and surprisingly does not detract from the gameplay at all. Furthermore, the fact that not every shot hits adds a certain level of trepidation and uncertainty which makes the game that much more fun. Finally your graphics are top notch.

Very well done indeed! I would like to post this on the tigameshelf.net site if that's OK with you.

  • Like 6
Link to comment
Share on other sites

A quick observation on the code (I'm just being pedantic, so it's fine to tell me to STFU!) :-)

 

Where you have IF ... ELSE type logic, you're sending the code to the very next on the true condition. You can make the code shorter (and presumably a little faster) by reversing the logic.

 

Example:

 

1470 IF START=23 THEN 1480 ELSE 1620
1480 IF INVPOS=XPOS THEN 1490 ELSE 1620
Could be re-written as:

1470 IF START<>23 THEN 1620
1480 IF INVPOS<>XPOS THEN 1620
And this:

1670 IF S=0 THEN 1730 ELSE 1680
1680 CALL HCHAR(23,XPOS,32)
1690 IF K=ASC("S")THEN 1700 ELSE 1710
1700 XPOS=XPOS-1
1710 IF K=ASC("D")THEN 1720 ELSE 1730
1720 XPOS=XPOS+1
1730 IF XPOS<(LFT+1)THEN 1740 ELSE 1750
1740 XPOS=LFT+1
1750 IF XPOS>(LFT+COLS)THEN 1760 ELSE 1770
1760 XPOS=LFT+COLS
1770 CALL HCHAR(23,XPOS,136)
1780 IF K=ASC(".")THEN 1790 ELSE 2090
Could be re-written as:

 

1670 IF S=0 THEN 1730
1680 CALL HCHAR(23,XPOS,32)
1690 IF K<>ASC("S")THEN 1710
1700 XPOS=XPOS-1
1710 IF K<>ASC("D")THEN 1730
1720 XPOS=XPOS+1
1730 IF XPOS>(LFT+1)THEN 1750
1740 XPOS=LFT+1
1750 IF XPOS<(LFT+COLS)THEN 1770
1760 XPOS=LFT+COLS
1770 CALL HCHAR(23,XPOS,136)
1780 IF K<>ASC(".")THEN 2090
So, we're avoiding the true condition from jumping to the next line, since, if the condition were false, it would naturally fall through to the next line anyway.

 

It's a lovely little game and I enjoyed playing it!

Edited by Willsy
Link to comment
Share on other sites

 

1470 IF START=23 THEN 1480 ELSE 1620
1480 IF INVPOS=XPOS THEN 1490 ELSE 1620

Could be re-written as:

 

1470 IF START<>23 THEN 1620
1480 IF INVPOS<>XPOS THEN 1620

 

;) Could be re-written as:

 

1470 IF (START<>23)+(INVPOS<>XPOS) THEN 1620

Edit:

Just fell over this. Compute! magazine, April 1984, Issue 47, Vol. 6, No. 4, page 165.

 

logical.operators.png

Edited by sometimes99er
  • Like 2
Link to comment
Share on other sites

Feedback is always good! :)

The code has been updated with Willsy's observations ... it might be a bit faster now.

I have also added information about the scoring after reading post #8 from GratedTopping. I had overlooked that. Points for each invader are now displayed at the beginning of each level. The number of points for the saucer are now displayed when it is destroyed. There is also a note on the title screen that the score is updated after each level or end of the game. I have attached the updated game.

The Buck Rogers-type game will be posted soon.

  • Like 1
Link to comment
Share on other sites

ok here's the buck rogers type game. It's the first game I was happy with in terms of game play although the speed is a bit slow but possibly ok. It was a bit of an experiment and a way to learn about TI Basic. The game not really a pure copy of Buck Rogers but only shares some similar elements to it.

 

This buck rogers-type game is called Space Vexors because it was quite vexing to develop! Not easy getting everything I wanted into a TI BASIC program and the attackers are quite difficult to catch sometimes making the testing of the game a bit laborious.

 

Some data has to be loaded from a data file which I've included so the program doesn't run out of memory. Both files are included in the zip file and need to put in the same disc folder.

 

The keys are ESDX and the ship is flown like an airplane, i.e. E is to push the joystick forward and nose down and X is to pull the joystick backwards and pull the nose up. S and D are for banking left and right. I've attempted to provide a 3D feel to the game.

 

The levels increase in difficulty. Each level has 3 sublevels and this increases to 4 sublevels in level 4. Each sublevel has a different kind of attacker, i.e. one type fires downwards while another type fires downwards and sideways. The general overview of the levels are as follows:

Level 1 - the opponents don't fire back

Level 2 - they fire back and bring their mothership too

Level 3 - they occasionally turn invisible

Level 4 - an extra sublevel of attacking mini-saucers is included

Level 5 - extra life

Level 6 and onward - the attackers fire more frequently

 

The other games I have I think I will post in new topics to keep things simple and also I am currently updating some of them so they wont all be ready at the same time.

 

I have also attached a couple of screen captures so you can see what it's like.

SPACE_VEX.zip

post-34194-0-33515300-1460043053_thumb.jpg

post-34194-0-77967200-1460043058_thumb.jpg

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