Jump to content





Star Castle Improvements

Posted by cd-w, 10 January 2012 · 541 views

I have made a little more progress on my 2600 Star Castle demo:
  • Ship rotation is slower.
  • Ring colours now match the arcade version.
  • Player bounces off the rings.
  • Centre gun tracks the player position.
The main issue now is collision detection between the bullets and the rings. I haven't yet worked out an efficient way to detect when a ring sector is hit by a bullet, and the code is starting to get tight for cycles.

Attached Image

Let me know what you think?

Chris

Attached File  starkernel4.bin (12KB)
downloads: 73
Attached File  starkernel4.zip (21.46KB)
downloads: 62




Looks cool! I hope you are going to continue this to a final game.
  • Report
If we're looking to get as close to the arcade as possible you're still gonna need to slow down the ship rotation even more. I count about 57-60 RPM on the arcade version. It's prolly 60, i just missed a count here and there.

This 2600 version is running about 2x or 3x that rate. Too fast to watch the clock and count rpms at the same time.

But this is looking real nice so far!
  • Report
Given circles, the distance formula comes to mind for collision detection. That takes a bit of multiplication though. Are you willing to use ARM code?
  • Report
I haven't studied the code yet, but I presume that you are using collision flags between the ship and the rings? And that doesn't work for bullets because they are too small?

Since you are not using the playfield, perhaps you could use the ball to make a black shadow that follows the bullet and is larger?
  • Report
Zach - thanks for the suggestions. The real problem is determining which segment of the rings has been hit by the bullet. Each ring has 12 segments that can be individually removed.

I think I have now worked out a scheme using bounding boxes - it isn't pixel perfect but it should be close enough and fit in the available cycles.

I'm actually using the distance formula already to bounce the ship off the rings. The ship will bounce if x^2 + y^2 <= z^2, where x and y are the distance of the ship from the ring centre, and z is the radius of the outer ring. I'm planing to use this technique to determine which ring to test, then using bounding boxes around each segment.
  • Report
So multiplying all the possibles values for the distance formula is more managable than I thought, eh? I'll need to look at your code sometime.
  • Report

July 2014

S M T W T F S
  12345
6789101112
13141516171819
2021 22 23242526
2728293031  

Recent Entries

Recent Comments

Search My Blog