Vectrex32

General Category => Game Swap => Topic started by: VectorWorlds on February 09, 2020, 11:48:49 AM

Title: Star Trex
Post by: VectorWorlds on February 09, 2020, 11:48:49 AM
Hello,

Here's my first game on the Vectrex32 and my submission for the V Competition. I learnt a lot making this game and if I was to tackle it again I work on a more robust memory management.

In the end I bumped up against some of the constraints of the Vectrex32.  Some of these are likely caused by me not knowing enough yet on how to squeeze everything out of the system.  I did program hi-score tables, but I ran out of memory everytime I tried to implement them so I have left them out.  I also had trouble squeezing in more sounds but I will try and some more in future updates after I have refactored some more of the code.

I have also had to restrict the amount of ships on screen at any given time to keep within the 2K limit.  To still allow the game to be progressively harder I allow the Klingon ships to respawn in later levels.

Overall the game seemed to be stable enough now to release and I was able to play it through several times without any issues.


Instructions

Stick Left = Turn Left
Stick Right = Turn Right
Button 1 / Stick Up = Thrust
Button 2 = Boost
Button 3 = Phasers
Button 4 = Photons

Shoot the klingons, dock at the base for to replenish health etc.  Use the map at the top of right of the screen to see where the enemy are.

Gameplay Video



Download Link

https://1drv.ms/u/s!ArslbYSzzvjwiKcwUEktgs4aO3NPxQ?e=FmMVJv (https://1drv.ms/u/s!ArslbYSzzvjwiKcwUEktgs4aO3NPxQ?e=FmMVJv)


Hope you enjoy playing it.


Cheers,


Andrew
Title: Re: Star Trex
Post by: Vectrex32 on February 09, 2020, 02:17:06 PM
Looks exciting! I'll give it a try over the next couple of days.

- Bob
Title: Re: Star Trex
Post by: jaymzjulian on February 09, 2020, 05:22:33 PM
This is pretty cool - loaded it up this morning and enjoyed it a lot.  Thanks for posting it :).
Title: Re: Star Trex
Post by: Vectrex32 on February 10, 2020, 09:36:59 AM
This is great work, but I think it needs some more sound effects to match the original game. It needs a visual explosion effect when the Klingons are destroyed. At the beginning of the game, the original shows you the Enterprise, starbase, and Klingons as it places them on the screen. And in each new sector, it shows the Enterprise flying in on the upper right. I suggest using this video as a reference: https://www.youtube.com/watch?v=5bh35Dqum4Y

The one bug I noticed is that when the Klingons shoot at you, the map sometimes shows the shots actually passing through the Enterprise before they hit the ship a short distance off the bow. Is that because they're hitting the front deflectors? If the shot is from behind, it should hit the rear deflectors.

Very impressive work so far!

- Bob
Title: Re: Star Trex
Post by: VectorWorlds on February 14, 2020, 07:56:55 PM
Hello All,

I've just uploaded a newer version.  I had restructure a some code the get a little more memory to play with.  I've have tidied up some loose ends and added some more effects like the map intro etc.

https://1drv.ms/u/s!ArslbYSzzvjwiKcjVrx6_XL3WSz4AQ?e=EUxhfO (https://1drv.ms/u/s!ArslbYSzzvjwiKcjVrx6_XL3WSz4AQ?e=EUxhfO)

I wasn't able to add the Klingon explosions yet, but I have some more ideas to somehow squeeze this in.

In the meantime thanks Bob for all the tips.  The game feels a little more polish now.

Cheers,


Andrew
Title: Re: Star Trex
Post by: jgkspsx on January 17, 2021, 08:48:32 PM
I'm sorry to say that mine freezes up as soon as I launch the game. It's possible that my Vectrex is not supplying enough power to the cartridge. Is it working for anybody else on version 1.27?
Title: Re: Star Trex
Post by: Vectrex32 on January 17, 2021, 09:07:40 PM
Quote from: jgkspsx on January 17, 2021, 08:48:32 PM
I'm sorry to say that mine freezes up as soon as I launch the game. It's possible that my Vectrex is not supplying enough power to the cartridge. Is it working for anybody else on version 1.27?

I also saw your post on the Vecalabeth thread. Both Star Trex and Vecalabeth are beta software, so I would suspect bugs in their code first, especially if you've been able to play the games included with V32 with no problem.

I'd suggest connecting your PC to the V32, bringing up a terminal window, playing the game until it crashes, and seeing if any error message comes out on the terminal.

- Bob
Title: Re: Star Trex
Post by: jgkspsx on January 17, 2021, 10:36:30 PM
Hahah, I probably should have thought to do that. It looks like the Sgn helper function it defines on line 3666 collides with a platform function. I commented it out and it runs! However, it seems like the enemies self-destruct pretty quickly and I am then quickly left without any energy to move or photon torpedoes to shoot, and then I have to power down my system. Is that expected?
Title: Re: Star Trex
Post by: Vectrex32 on January 18, 2021, 08:08:53 AM
I certainly wouldn't expect the Klingons to be self-destructing. Sure, it's always a good day to die, but that's just plain dishonorable.

I would expect you to run out of energy and torpedoes: I've always found ST to be a very difficult game.

And then, powering down your system I suppose just means that game re-starting hasn't been implemented in the program. I said this is beta software, but that's probably too generous. It's not really even at alpha stage yet. It was just posted as a basis for other people to continue development on.
Title: Re: Star Trex
Post by: jgkspsx on January 18, 2021, 01:46:02 PM
The video shows the level being completed, though, with a "Sector Cleared" message. I may poke around a bit more later. I didn't see any errors being logged.
Title: Re: Star Trex
Post by: AlexF on January 20, 2021, 07:36:55 AM
Hi, sorry if I'm being dim, but I can't get Star Trex to work on the Vectrex32, When I download the file from the links above it adds an additional .txt to the file name. If I remove it so the file is just called startrex.bas, it shows up on the Vectrex32 menu but doesn't load (I just get a black screen)...
Title: Re: Star Trex
Post by: Vectrex32 on January 20, 2021, 08:24:30 AM
Welcome to the forum, Alex!

Connect the V32 to your PC and bring up a terminal window. I'll bet that when you get a blank screen, there's an error message printing out.

- Bob
Title: Re: Star Trex
Post by: jgkspsx on January 20, 2021, 08:35:26 AM
It sounds like you have to make the change I described above. Comment out the Sgn helper function, or rename it and references to it so it doesn't collide with the system library.
Title: Re: Star Trex
Post by: AlexF on January 20, 2021, 10:43:37 AM
Hi, I downloaded the Terminal programme recommended in the Vectrex 32 manual, and opened it while trying to run Star Trex, but it hasn't displayed any extra info - see attached.

I have very little technical knowledge when it comes to programming etc., e.g. I have no idea what you mean when you say "Comment out the Sgn helper function". Can you advise in non technical terms, please?

Title: Re: Star Trex
Post by: AlexF on January 20, 2021, 11:08:15 AM
I tried launching a TEK window within the terminal programme, and that gave me more info, if of help locating the problem with launching Star Trex... See attached.
Title: Re: Star Trex
Post by: Vectrex32 on January 20, 2021, 02:01:30 PM
Open Star Trex.bas in a good text editor (like Notepad++ from https://notepad-plus-plus.org/downloads/) and see what's at the error line, 3851.

Odds are, its the first line of the Sgn() function. Delete the entire function (all the way to the ENDFUNCTION line) and save the file. Then, from the command line, type RELOAD and then RUN.

- Bob
Title: Re: Star Trex
Post by: jgkspsx on January 20, 2021, 02:33:17 PM
Is the library Sgn function 100% identical to the one defined in this program? I was wondering if switching to the library version is what caused the difference in behavior on my machine vs. the video.
Title: Re: Star Trex
Post by: Vectrex32 on January 20, 2021, 02:40:42 PM
Yes, they are the same.

- Bob
Title: Re: Star Trex
Post by: AlexF on January 20, 2021, 04:31:30 PM
Dear Bob, that's fixed the problem, thank you! Hope someone picks up what's been done on this game and continues with it, it's terrific so far...  :D
Title: Re: Star Trex
Post by: VectorWorlds on May 30, 2021, 07:21:18 AM
I found a more complete version knocking around on my hard-drive so thought I would upload here.

https://1drv.ms/u/s!ArslbYSzzvjwiLxMtgMK1fPmzP4HrQ?e=IWyxcN

Cheers,


Andrew