Jump to content
  • entries
    36
  • comments
    588
  • views
    144,249

Star Castle Developments

Thomas Jentzsch

12,847 views

Since Chris is busy with his RL, I will continue his blog entry about Star Castle Developments here.

Source code can be found here.

Note: There are still some occasional glitches which I have to sort out. And maybe even a crash. So if you find one, please let me know. Especially if you can reproduce it.

Attached is the final build from October 2015 and here the (never ending) DONE and TODO list:

; Explanation:
; - = open
; o = partially
; + = done
; ? = debatable
; x = cancelled

; Arcade Differences:
; - 3  6 lives via dip switches

; x extra lives > 100
; + game speed increases with score, segments, time  .?
;   + gamespeed (0  7) now based on score (increases every 2000 points)
; + ring rotation
;   + not in sync
;   + direction moves with ring (TODO: check mines on rings, gun gaps)
;   + speed moves with the ring
;   + speeds
;     + increases with score (not castle)
;     + reverse rotation at constant speed: 4.7s/loop, (1st castle: middle)
;     + others: 0  1250 pts: 4.7 (outside)/3.2s (inside); 2500 pts: 3.2/2.35s; then: 2.4/1.9s
;       own speed range defined
;   + offsets are transfered with the expanding rings
;   o hit sparks (TODO: graphics)
; + killing gun and getting killed costs one life
; + shield kick
;   + ignores previous speed
;   + gives new speed
;   + doesn't reposition
; o ships
;   + facing left at life start
;   + start position moves up with each new life? (10 positions, 1st one seems random, 2nd one is bottom + 1?)
;   ? X and Y speed are NOT linked together
;   o deceleration is linear and lower
;   + ship decelerates differently in left/down (100%) than in right/up (~50%) direction!!!
;   + after castle completed, ship continues at current spot in next castle
;   + ship bounces during explosion
; o mines
;   + immediate respawn
;   + spawn position depends on gun direction (dir - 90°)
;   + spawn independent from ship direction
;   o hop back and forth on the rings
;   + higher homing speed at higher scores (as fast as player's ship)
;   + homing mine movement has some randomness to prevent mine grouping
;   + homing mine lifetime varies (lifetime counted on ring too, but only 50%)
;   + slower turning speed in lower castles
;   o mines hop much faster in arcade in higher levels
;   - max. one mine per ring segment
;   + disappear when they hit a ship
;   + mines on ring do not kill ship
;   o hit sparks (TODO: graphics)
; + gun
;   + shots immediately when there is a gap
;   x projectile moves a bit faster
;   + projectile disappears when ship is hit
;   x starts new gun life at last direction
;   + starts next ship at last direction
;   + shots whenever there is space, no matter where the player's ship is
;   + is turning slower, especially initially
; + bullets
;   + max. 3 at a time
; o sounds
;   o siren frequency depending on segments (~65  260Hz):
;     + intermediate screen (highest pitch, slightly higher than 3)
;     + 36  28: 0 (lowest pitch)
;     + 27  24: 1 (slightly higher)
;     + 23  20: 2
;     + 19  16: 3 (high pitch)
;     + 15  12: 4 (reset to between 1 and 2)
;     + 11   8  5 (slightly higher, still lower than 2)
;     +  7   4  6 (slightly higher than 3)
;     +  3      7 (slightly higher = intermediate)
;   - homing mines sound
;   + no sound when hitting segment first time
;   + thrust sound very low
;   - projectile sound starts with fire sound
;   - better sound mapping
;     - channel 0:
;       + 2. ship explosion (channel 1?)
;       + 8. siren
;     - channel 1:
;       + 1. gun explosion
;       + 3. projectile
;       + 6. bullet fire
;       + 7. ship ring bounce
;       + 9. thrust
;     - both:
;       + 4. mine hits
;       + 5. sector hits (channel 0?)
;     - homing mine sound
; + scoring: 10/20/30 points per segment hit (not per segment destroyed)
; + no leading zeroes
;   + score
;   + castle
;   + ships
;   + highscore
; ? scores are centered
; + digits are slightly wider
; -   .
; Bugs/TODOs:
; + it seems that the gun is correcting direction after finding a gap but before fireing
;   this leads to shots going through intact sectors
; + increase vertical screen size (TODO: use gained time)
;   + define extra stars data
;   + adjust stars in various screens
;   + center/resize other screens
; + make ring 1 data ordered like ring 0 + 2 data
; + gun needs gaps in all three rings
; o General task management
;   + allow individual tasks with priority and order
;   o adjust parameters of tasks (check if they could be skipped)
; + regenerate if middle ring is empty (test arcade).
; + homing mines broken at higher castles (>=6)
; + explosion too slow (check again when CPU time is reduced!)
; + vector angle gives too coarse results
; + occasional glitch when mine is shot
; - bullet sometimes glitches when it hits (could be same problem as with initial mine?)
; + DIR_SEARCH
;   x gap found a bit too early (counter clockwise)
;   + no gap found when GUNDIR = 17
; + occasional reversed intermediate castle/ship graphics
; + first mine glitch (only if thrusting or fireing!?)
;   resulted from following order: 1. x-pos mine
; 2. create mine
; 3. display mine
; + thrust sound corrupted
; + thrust sound set to lowest possible frequency and made 50% louder
; + siren twice as loud
; ? bullet/ring check may have flaws
; + occasional single pixel glitch on empty ring segments
; + another occasional single pixel glitch at start of new life (reason: odd without even rotate)
; + empty high score initials   . (instead of aaa)
; + difficulty switches fixed at start of game (4 different high score tables)
;   o make different high socre tables identifialble (colors only so far)
; + stop gun shooting when ship is exploding
; o more ring colors
;   + 8 different sets
;   o define colors
; o mine graphics (maybe slower?)
; + thrust sound broken after gun explosion
; + occasional crash!!! (X used in CheckRegenerate)
; + fixed last color mode remembered
; o check PAL colors on real hardware
; o mine explosion graphics? (code done, graphics todo)
; + add "arcade" to the title graphics
; o pulse red part of the title graphics in sync with music
; + (c) 201*3* (fixed "3" font)
; x new ship must not start at blind gun spot (but arcade does too)
; + highlights in small letters M and W and score 4
; + adjusted flashing text on/off ratio
; x vary ship's thrust display frames %10 -> e.g. %101
; + white vertical line before highscore
; - more gun explosion animations
;   o gain space
;   o optimize overlapping
;   - implement new data
; -   .
; Ideas:
; + transfer colors with rings too
;   + gun changes color too, is that OK?
; - PAL50 timing option
; + smaller ship to allow better manouvering?
;   + data (ship, ship + flames)
;   + offset
;   + reflection
;   + projectile collision
; + use direction search for mine/bullet ring hits
; x using VDELP0 to move ship smoother vertically (not possible)
; ? reverse display of double hit segments (dotted = complete, full = hit once)
;   o done, but is it a good idea?
; + increase some difficulties 1000 points earlier (kick chance, gun turning)
; x better do 16 difficulties for those?
; - reduce maximum ring rotatation speed (saves CPU time)
; + rename "Wave" into "Castle"
; ! adjust scanlines
;   + AA logo
;   + title
;   - Melody load
;   - hishscores
;   + game
;   + messages
 

star_74.bin star_74.cu.bin star_101.bin star_101.cu.bin Star_Castle_Arcade_152.cu.bin Star_Castle_Arcade_152.bin Star Castle Arcade (165, Stella).bin Star Castle Arcade (165, Harmony).cu.bin

  • Thanks 1


127 Comments


Recommended Comments



Welcome back to the project! ANY help or feedback is welcome.

 

We now have more than 2k free ROM space, scattered over the banks. But I think we can utilize a lot of it. 22 bytes of RAM and extra RAM are free too (some have to be reserved for the stack). How many would you need?

 

I don't know if you downloaded the latest source code and checked my TODO list. If not, your post is a nice coincidence, because especially the siren sound is one of my last major TODOs. Here are my findings from analyzing the arcade:

  • siren frequency depending on segments:
    • intermediate screen (highest pitch)
    • 36..28: 0 (lowest pitch)
    • 27..24: 1
    • 23..20: 2
    • 19..16: 3 (high pitch)
    • 15..12: 2 (reset to middle pitch)

That siren sound is something very unique, so I would really like to reproduce it. But the 2600 doesn't offer small frequency steps, so we have to cheat here. Over the coming weekend, I want to experiment with mixing two frequencies, by switching back and forth multiple times during one frame. Depending on how many switches each frame has, in theory(!) this should define a number of intermediate frequencies, which makes copying the arcade sound possible.

 

I am going to write a small test program to find out if that works at all (fingers crossed!) and then define the details (e.g. how many switches per frame do we need, how must they be spaced etc.).

 

If you have other ideas for the siren, you are welcome!

 

All other sounds are done per frame, so there you can easily help. Maybe you already noticed that I reduced the pitch for the thrusting sound to minimum. A homing mine sound is also still missing, and e.g. the fire sound is pretty different from the arcade.

 

Finally I plan to rewrite the sound driver, so that both channels can play all sounds. Then we can define more elaborated priority system and get the two channels better utilized.

 

BTW: We can continue in PM if you prefer that, but I wouldn't mind to take this over to my blog.

Share this comment


Link to comment

Wow, 2kb and 22 bytes of RAM? you really did some optimizations!

 

If you're going to rewrite the sound driver code, I want to know if at least the structure of the sound can be the same? (using $FF to select a new AUDCx, and $00 to quit the sound) Because my new sounds will change the AUDCx twice or more, so I need set a new value wile the sound is playing.

Also there's a unused nibble in the AUDCx data, witch I want to use as sound frame delay.

 

 

The siren sound is very hard to reproduce, because it's sort of flange effect, I tried to match updating the AUDFx 6 times per frame, but Chris only found space for four updates, and the result was almost the same using pure AUDCx #06 (bass) witch is used until now. Also to save ROM memory, this multi-updated was removed, I need to check if I still have the test here...

Found it, press up to change the pitch up and down to decrease, there's a limit, after that the sound be garbage. It's just a test, obviously must to be fixed to resemble better the original.

 

About mine hovering sound, believe-me, this sounded annoying as hell, then we changed to mine explosion sound, an original one.

The problem the mine hovering sound is stopped everytime others sounds starts, witch makes most evident the atari 2600 2 channel limitations.

 

For me there's no problem to post in your blog BTW.

File starcastfx.bin attached in 1st post.

Share this comment


Link to comment

Yes, the structure will be the same. Unless you find the necessity of improving it.

 

About the mine homing sound, we should at least find some sound. And depending on the sound priorities, it may not t be disabled that often.

Share this comment


Link to comment

In the first post of this blog entry you can find a first demo of the siren sound. The distortions become strong at the higher frequencies, but I already have an idea how to avoid that (e.g. switching AUDC0 from pure div 6 to pure div 2 then).

Share this comment


Link to comment

Noticed: The difficulty switches don't take effect in-game (at least in Stella).

Are they only checked at the start of a game?

I have a hard time getting to the 2-shot rings.

I have to change to Difficulty A, and then create a new Stella console, and then turn back on Phospher if I want that on. Before, setting A or B would take immediate effect.

Share this comment


Link to comment

Yes, the structure will be the same. Unless you find the necessity of improving it.

 

About the mine homing sound, we should at least find some sound. And depending on the sound priorities, it may not t be disabled that often.

 

Perhaps a sound when the mine detach from the ring?

Share this comment


Link to comment

Noticed: The difficulty switches don't take effect in-game (at least in Stella).

Are they only checked at the start of a game?

I have a hard time getting to the 2-shot rings.

I have to change to Difficulty A, and then create a new Stella console, and then turn back on Phospher if I want that on. Before, setting A or B would take immediate effect.

The switches are now only checked at the start of game and then fixed. This allows 4 different high scores.

 

But you really should not have to create a new console. Just abort the game and start a new one.

Share this comment


Link to comment

Perhaps a sound when the mine detach from the ring?

There is no special event for that. The mines just hop of a ring, and if there is no other ring around to catch them they will continue moving.

 

So we need an ongoing sound. Two ideas:

- something like an echo lot, so while the mines are far away from the player's ship, they ping slowly. And while they come closer, they ping more often up to a constant sound

- also based on distance, they volume of the sound changes.

Share this comment


Link to comment

I think the idea of changing the volume interesting, but it needs to check the closer mine or limit the range of the sound according player distance. Mines out of range doesn't make sound then.

 

Another thing, is it possible to add hit sparks? When the bullet hit a mine or the ring?

  • Like 1

Share this comment


Link to comment

So the Echolot (acoustical altimeter) idea is out? It has the charm, that other sounds can be played in between the pings.

 

Those sparks would only be possible at the costs of additional flicker. Not sure if that's worth it.

 

BTW: Did you try out the siren ROM I posted?

Share this comment


Link to comment

I don't think we shoud discard an idea without testing it first. ;)

 

I tested your siren and sounds better than my aproach.

How many updates per frame are you using to produce that sound?

Share this comment


Link to comment

I had suggested Hit Sparks also.

It is in the arcade game and in the other 2600 Star Castle.

You just need the briefest quick spark flash if there is time in the queue to spark.

 

4 High Scores :love: !

Share this comment


Link to comment

I will give the sparks a try. :)

 

Regarding the flange effect or the siren. How can we get close? Slightly varying the frequency? And/or the volume?

Share this comment


Link to comment

I tested your siren and sounds better than my aproach.

How many updates per frame are you using to produce that sound?

That's 4 updates, with equal (~66 scan lines) spacing. I have to update mid-kernel twice, fortunately there is some time at the top and bottom of the rings.

 

Does it sound acceptable?

Share this comment


Link to comment

I found a blind spot, when you start a game, don't move the ship, just rotate 3 times to right and fire, the enemy cannon will never hit you.

Share this comment


Link to comment

I found a blind spot, when you start a game, don't move the ship, just rotate 3 times to right and fire, the enemy cannon will never hit you.

Infinity pause?

I just tried Build 72 on real hardware. Got to Level 8, 16,250. Fun!

What to say? It is unbelievable. It is Star Castle on Atari 2600. (Nice adding Arcade and 2013 :thumbsup: )

This is one of the finest 2600 programs of all time. Great work!

Share this comment


Link to comment

The blind spots are likely due to the cannon only being able to aim in 32 directions. I don't know if it can fire in between those angles or not.

Share this comment


Link to comment

I found a blind spot, when you start a game, don't move the ship, just rotate 3 times to right and fire, the enemy cannon will never hit you.

Those blind spots exists in the arcade version too. The targeting of the gun is not 100% perfect and, like Nathan said, it can only aim in 32 directions. But the mines won't let you rest there for long anyway. :)

 

And I will make sure that a new ship never starts at a blind spot.

Share this comment


Link to comment

With a little help from a friend (thanks Ivan!), I have improved the siren sound. You find a new ROM (siren_004.bin) at the 1st post.

 

The ROM plays the 8 fixed frequency steps (depending on the sectors remaining) of the arcade original and the transitions in between. The current frequency step is displayed as binary code (0..7) by playfield bars. Their color indicates if the frequency is moving up (green), down (red) or stationary (brown). You can change the step by moving the joystick left and right.

 

Please LMK what you think.

Share this comment


Link to comment

Like I said via PM it's perfect to me.

I think you can delete the file starcastfx.bin because it's useless now. ;)

Share this comment


Link to comment

Guest
Add a comment...

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