Jump to content
IGNORED

My first attempt at a 7800 game.


Tickled_Pink

Recommended Posts

Here's my first attempts at a 7800 game. Back in '83, I bought a game for our 16K Spectrum. I'd first seen it at a cousin's house a few months earlier. It cost £5.50 and, unfortunately, also caused the demise of said Spectrum - temper, temper! Anyway, I've always liked the game.

 

It did come out for the Dragon 32, Vic 20 and C64 but after seeing the videos online, the Speccy version just seems superior, despite the attempted graphical improvements in the C64 version. So I've decided to keep it to single colour sprites, like the Spectrum original. Any idea what it is yet?

 

The ship moves, has gravity pulling on it when you let go of the controls. When you move up, it fires the thruster, which animated (although more like flickers because of the frame speed). I've tried to mirror the movement of the Spectrum version, so that when it gets to the highest point it can while thrusting, it judders.

I don't have a screen recorder on my laptop yet so can't show more than a screenshot.

 

image.thumb.png.5cf8a5bbf25f4f38432ce81e20ce0328.png

  • Like 12
Link to comment
Share on other sites

Arcadia.

 

I realise that the thing about Spectrum games is that Americans may not have had a chance to play them. This was quite a tricky blaster and one of the initial batch of Spectrum games that ran on the 16K machines that would later be discontinued. There are several videos on YouTube. I'm trying to make it reasonably close to the Spectrum version.

 

I'm using 7800 Basic and I am surprised how easy it's been so far and how little code it's taken.

  • Like 6
Link to comment
Share on other sites

Small steps. Confusing thing I've realised about 7800 Basic. I've set it to use 320A mode but coordinates are still assuming width of 160 pixels. That's why it took me so long just to plot the borders.

 

image.thumb.png.3fe0acd9488f2d2858a99abcb84606e1.png
Hardest part of this is going to be the guns. Noticed that there is some ship animations when the guns fire. No biggie, but they actually fire independently. Although they fire in unison at the start, they can fire out of sync if one hits something first.

  • Like 3
Link to comment
Share on other sites

  • 2 weeks later...

Finally got the score system working after 3-4 days trying to work out what the issue was. Found an alternative by tweaking the code from a post I found here on AA. An adjustment had to be made to add 48 to the digits as that's where they are on the character set I'm using. I tried other character sets but strangely could never get them to work with plotvalue. So everything's done with plotchars. The high score to do and adjust some positioning and maybe one or two of the colours. Then I'll get working on the firing mechanism.

 

I've plotted out the first level enemies. Surprised that they only seem to have two animation frames. I think it's the randomisation of the timing of the frames when each enemy is spawned that tricks the brain into thinking there's more as it gets really busy early on.

Hopefully by the end of next week I'll have the firing mechanism done and maybe the first level, time allowing.

image.thumb.png.18696e0ccbf7c69d0bb40f2a12a7f343.png

Edited by Tickled_Pink
  • Like 6
Link to comment
Share on other sites

Just a small update. Didn't get much of a chance to work on it this week with work pissing me off (coding's my day job as well) and wife insisting on binge watching Star Trek Strange New Worlds with me, even though I'd already seen it. But it's a good show, so not much of a sacrifice.

 

Timer's working and the text display been finished. Added animation for the guns firing. The ship is now two sprites, not including the engine burn, so that both left and right have an additional animation frame for when the guns are fired. They have to work independently.

It seems that the 7800 can display more characters than the Spectrum so I've moved the text in a little bit from the borders just to squeeze the space a little bit.

And the ship descends from the top of the screen at the start of the level, although its positioning needs adjusting as it doesn't descend exactly down the middle. A slight issue I need to address is how I'm going to deal with sprites appearing gradually. In the original, the sprites are actually off-screen initially but can both fire and be killed whilst off-screen. I'm not that bothered about simulating that aspect of the original but having them just suddenly appear at the top of the screen seems a little janky. I'm thinking I could create additional sprite frames that remove some lines that would be hidden so that it would slowly reveal the enemies from behind the score area.

 

image.thumb.png.1cb7c241912e064bf95b3d6a1fcf3657.pngff

I'm not sure what to do with this once it's complete. The plan is to release an early preview version once the first level is done. I'll do that once I figure out how to do the sound.

  • Like 3
Link to comment
Share on other sites

55 minutes ago, saxmeister said:

Welcome to 7800 development! We can always use more good devs. This looks great, and I have often remarked that the 7800 and Speccy are a great pairing.

Yeah, I've certainly noticed that. There are a tonne of games on the Speccy that weren't released on other platforms that would be a good fit for the 7800.

 

I've already started thinking about the next project and want it to be an original title. A rough concept I've had for more than 30 years is a puzzle game I started developing with a couple of college friends on the ST back around '91. It was always only a rough idea although I did create the graphics for it and there was some functionality. Can't remember if I wrote it in STOS or 68000. Possibly the latter because these guys only had Amigas and we wanted to port it to that platform as well. Think I have the idea more or less fleshed out now with a two-player (or more?) mode turning it into a turn-based strategy game.

Link to comment
Share on other sites

  • 2 weeks later...

Managed to do a little bit on it today. One of the problems I had was the issue of the player ship either appearing behind or over the scoreboard as it started its descent at the beginning of the level. The same thing would happen with the enemies if I didn't find a way to fix it. My first attempt a couple of weeks ago failed. I created a couple of black sprites and changed the sprite draw ordering by moving the scoreboard display to the end of the draw routine. It worked but it also caused a glitch with the ship where half of it would periodically flicker.

 

So I spent some time creating 30 animation frames so that the position of the sprite would be static for the first 15 vertical positions but the ship would be gradually revealed through a sprite animation. But then I realised that would lead to a tonne of work and IF statements. So I looked up the documentation to see if I could find anything else. In the end, it was simple. Use lockzone.

 

e.g.

 

_mainloop

clearscreen

unlockzone 0

gosub drawScoreboard

lockzone 0

 

.

.

.

 

gosub drawShip

goto _mainloop

 

That way, with lockzone on at zone 0, which is the zone that includes the scoreboard, any part of the ship or enemies that overlap the score area won't be written to it.

That is a pretty neat feature.

  • Like 3
Link to comment
Share on other sites

  • 3 weeks later...

Yikes. Almost a month without an update. Last week I did some refactoring. 7800 basic code can quickly become a bit of a mess. This caused an issue with the display of the timer. Took me a while to pin it down. I think a couple of standard variables are reserved? I just moved the variables to other standard variables and timer worked again.

 

Just working on the laser firing mechanism and animation at the moment. More state management. For each laser.

Link to comment
Share on other sites

16 minutes ago, Tickled_Pink said:

I think a couple of standard variables are reserved? I just moved the variables to other standard variables and timer worked again.

What variables are you referring to? All I can think of offhand are temp1 - temp9 which are used internally for functions and such. It's best to avoid using these because the values may get overwritten. I define my own temp variables with a capital T so as not to interfere with the ones used internally.

  • Like 1
Link to comment
Share on other sites

16 minutes ago, Karl G said:

What variables are you referring to? All I can think of offhand are temp1 - temp9 which are used internally for functions and such. It's best to avoid using these because the values may get overwritten. I define my own temp variables with a capital T so as not to interfere with the ones used internally.

I'd moved my timer content display variables to 'x' and 'y', I think. The clue that they were being constantly overwritten and rewritten was the flicker and one digit being replaced by a control character. Moving them to var50 and var51 fixed it.

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