Jump to content
IGNORED

Space Wars - game in development


sometimes99er

Recommended Posts

 

Drifting into outer space ...

Quote

The instruction set is nearly a complete ripoff of the PDP-11.

The IBM-PC team in Boca Raton seriously consider the TMS9900 for the original PC, but decided on the 8088 based on a variety of reasons including production costs.

http://en.wikipedia....ruments_TMS9900
http://en.wikipedia...._Data_Processor
http://en.wikipedia.org/wiki/PDP-1
http://en.wikipedia..../wiki/Spacewar!
http://atariage.com/...wareLabelID=469
http://videogamecrit...z.htm#Space_War
I think the spaceship graphics were reused in the later Asteroids (2600).
http://atariage.com/...areLabelID=1007
Space War was one of the earlier 2600 games with product number CX2604.
http://www.atariage.....html?LabelID=3
It was not one of the original 9 games for sale. The second last number in the product number seemed to indicate a category, 0 for action, 1 for car, 2 for sports etc., but that didnt last long.
http://en.wikipedia....tari_2600_games
Space War was released in 1978. I had one, but never played it much.

I'm going to rip the spaceship graphics and use them in a new game.
 

 

Edited by sometimes99er
Link to comment
Share on other sites

I changed the code a bit to see what would make the smallest footprint with the XB Compiler.

 

Line 110 has STEP 4 added. DATA lines changed from 1 to 4 characters at a time. Otherwise the same.

 


I would maybe expect the above to produce more compact code. Avoiding all of those commas.

 

The STEP 4 does not add anything since it was already compiled into a STEP 1 (sort of).

 

The DATA lines changed like this:

 

spacewar2.gif

 

So first off I'd say that's a wrong move. And yes, the final loaded code does save 66 bytes with the first version. Overall, with attached library, that's about a 1% gain.

 

:)

Edited by sometimes99er
Link to comment
Share on other sites

So the 2600 Space War cart was 2K. Main attraction, apart from the big empty space, also forgetting the original with the pitiful star in the center with its pull, and all the stars in the backdrop, then I’m of course thinking about the player, specifically the spaceship. Wonderfully animated with an amazing 16 frames. This is way back in 1978.

 

Here’s another silly demo, if you appreciate the spaceship and the animation, - turning around, and pointing in 16 different directions, up, slightly to the right, up and right, slightly up, right, slightly down, right and down etc.

 


spacewar3.gif

 

:party:

Edited by sometimes99er
Link to comment
Share on other sites

Okay, we want thrust. Move the joystick forward and off you go.

 

The thruster is simply on or off. If it’s on, the power is like one unit. We can control motion using vertical and horizontal values (TY and TX). Since the spaceship can point in any of 16 directions, we have to carefully distribute that one unit in vertical and horizontal values. I use a spreadsheet to help me here.

 

spacewar4.gif

 

First I list the animation frames of the spaceship. Then I note in which direction each frame points. Roughly. Then I note how I would like thrust to affect motion. Just the units I know to have a few references. Based on the frame number I calculate cosine and sine. Also I multiply the result with 256, so that the values will later be fine as integers in a XB compiled version.

 

spacewar5.gif

 

I’ll use an array (DIM) to hold the values. The array initially has values of 0. And I note there’s actually only 4 distinct values. I set these values in line 120. And I set the rest of the array in line 130, recycling the values from line 120.

 


I only set the cosine array since the sine values are the same only shifted forward 4 positions. I’ll add 4 in line 210, and only allow the lower 4 bits of a value to pass through (sort of) using AND 15, always resulting in a value in the 0-15 range.

 

I wonder if anyone knows of other ways to do thrusting.

 

:)

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

330 DATA 041CFC1C0400000000403E1C0C00000040303C18100000002030383C3

[/code]

 

I would maybe expect the above to produce more compact code. Avoiding all of those commas.

 

The DATA lines changed like this:

 

spacewar2.gif

 

 

:)

From this you can see how the compiler handles DATA lines. There is the label which takes no memory, then the data is kept as a string. Length byte first, then the data. The column on the left shows multiple DATA strings in one line. Length byte, string characters, length byte, string characters, etc. Each comma you eliminate saves one byte, but the zeros you have to include to be able to get rid of the comma cost way more than the few bytes you saved.

  • Like 1
Link to comment
Share on other sites

Will you be adding a central star with gravitational pull? This will complicate matters a little bit.

Also, will this be a single or two player game? There is already out there a 2 player spacewar game for the TI (I have it somewhere in my files), but it would be great if a single player version is created.

  • Like 1
Link to comment
Share on other sites

There is already out there a 2 player spacewar game for the TI (I have it somewhere in my files), but it would be great if a single player version is created.

 

Took a look at some screenshots in the Gamebase starting with the word Space, and then ran each for a minute or two. You never know, you could get inspired.

 

One had a nice intro effect with the title exploding and debris flying around while stars were drawn as a backdrop. Otherwise I think they were all XB, with maybe one exception with ships apparently being characters and not sprites.

 

spacewar6.gif

 

Next I’ll be looking into how to make the spaceship shoot. It works like this. Aim the nose of your starship in the direction you want to fire.

 

I plan to use single pixels to represent the shots fired. Let’s call them missiles. That’s the best name I can think of for now. Looked at the instructions for some early 2600 games.

 

spacewar7.gif

 

Don’t think I’ll provide guided missiles.

 

:)

Edited by sometimes99er
Link to comment
Share on other sites

While calculating the exit (muzzle) or starting point of missiles, things just didn’t align. I tried and adjust a few things, but it continued to be off. With point being perfect most of the frames, but then also overlapping spaceship and off out into space. The animation itself and the old game didn’t really make me doubt that the spaceship etc. wasn't all good. I went and checked the 2600 version. Missiles travel in the right direction, but the starting point is a bit off. And Asteroids’ not that much better. Hmm ... I guess it’s like with XB games, you quickly get used to things being off and adjust mentally somehow.

 

spacewar8.gif

Edited by sometimes99er
Link to comment
Share on other sites

Not that I thought anyone would notice, but I actually slightly redesigned the spaceship graphics, going from the original 7:5 (horizontal vs. vertical) to a more straight 5:5. I think the original graphics were perhaps trying to compensate for aspect ratios and/or horizontal television artifacts.

 

Went a bit further into it. I guess quite a few of the following numbers can be debatable. I'm assuming this and that, e.g. borders and offsets not taken into account. Doing this also for future reference when comparing the two systems.

 

spacewar10.gif

 

Ratio is how wide things are relative to the height. Also assumes that most devices of today try and have square-like pixels (screen elements). 4) Space War halves the vertical resolution. 7) The original spaceship graphics appear square-like. 10) The TI pixels appear pretty square-like. 14) My spaceship will appear about half the size of the original. Let’s just say that’s down to the "high resolution" of the TI, or me actually, for now, wanting a smaller spaceship.

 

:)

Link to comment
Share on other sites

The 2600's pixels are closer to 2:1.

 

Yep, agreed. And Space War, has "pixels" with double height, using two scanlines, making it closer to 1:1, like a few other early titles, Combat, Air-Sea ... The spaceship is still designed within a 7 pixels wide and 5 pixels high space.

 

:)

Edited by sometimes99er
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...