Jump to content
PacManPlus

You guys can thank UniWarS for this one... (Galaxian?)

Recommended Posts

6 hours ago, PacManPlus said:

What I ended up doing overnight was completely rewriting the 'dostars' routine.  It's about as bare essentials as you can get, no loops, doesn't use X or Y.  It takes up quite a bit more code space, but as long as it is more efficient, that's what I need.  I also found out during this that the INC I was using, uses 3 times the cycles (6 total) as an ADC (2 total) which I now use.  All this time I thought it was the other way around.

Sounds good. Out of curiosity, is the new way an unrolled version of the old one? If so, some of my suggestions (especially #3 and #5) could still save a couple hundred bytes (8 per zone) and nearly as many cycles.

 

 

  • Like 1

Share this post


Link to post
Share on other sites
10 hours ago, Pat Brady said:

 

7 Ensure the branch to DOSLOOP does not cross a page boundary. Crossing pages costs a cycle per zone.

Just to expand on this suggestion, doing indexed addressing across page boundries also adds a cycle, so try to position frequently accessed tables so they don't cross pages.

  • Like 1

Share this post


Link to post
Share on other sites

Hey Guys!

 

18 minutes ago, Pat Brady said:

Sounds good. Out of curiosity, is the new way an unrolled version of the old one? If so, some of my suggestions (especially #3 and #5) could still save a couple hundred bytes (8 per zone) and nearly as many cycles.

 

 

 

13 minutes ago, tep392 said:

Just to expand on this suggestion, doing indexed addressing across page boundries also adds a cycle, so try to position frequently accessed tables so they don't cross pages.

 

It was a complete rewrite of 'DOSTARS'.  I was able to remove X and Y, and the 'STARS' array I held in RAM.  To answer your earlier question, there are 27 zones of 8 scanlines each:

 

'LOADSTARS' gets called once just after all of the initialization at the beginning, and 'DOSTARS' gets called at the end of every frame, the last thing before the interrupt at the bottom of the screen:

;	LOADSTARS - INITIALIZES THE STARS ON THE SCREEN
LOADSTARS
	LDA #$80+$1F								;MAKE EVERY OTHER ZONE A DIFFERENT COLOR FOR THE STARS
	STA DLIST01+$01
	STA DLIST03+$01
	STA DLIST05+$01
	STA DLIST07+$01
	STA DLIST09+$01
	STA DLIST11+$01
	STA DLIST13+$01
	STA DLIST15+$01
	STA DLIST17+$01
	STA DLIST19+$01
	STA DLIST21+$01
	STA DLIST23+$01
	STA DLIST25+$01
	
	LDA #$05									;EVERY TWO ZONES ARE DIFFERENT PALETTES FOR THE STARS
	STA DLIST02+$00
	STA DLIST03+$00
	STA DLIST06+$00
	STA DLIST07+$00
	STA DLIST10+$00
	STA DLIST11+$00
	STA DLIST14+$00
	STA DLIST15+$00
	STA DLIST18+$00
	STA DLIST19+$00
	STA DLIST22+$00
	STA DLIST23+$00
	STA DLIST26+$00

	LDX #$00									;STARTING ZONE
LOSLOOP
	LDA DLLO,X
	STA TEMP0
	LDA DLHI,X
	STA TEMP1
	LDY #$02
	LDA #>(STAMPS)+$00
	STA (TEMP0),Y
	INY
	JSR RAND
	AND #$7F									;RANGE 0-127
	CLC
	ADC #LEFTSIDE - 8							;NOW IT'S 16-144
	STA (TEMP0),Y
	INX
	CPX #LASTZONE
	BMI LOSLOOP
	RTS

;	DOSTARS - PROCESS THE BACKGROUND STARS ONCE EVERY OTHER FRAME
DOSTARS
	LDA RTLOCAL+1
	AND #$01
	BNE DOSTARS_VERTICAL
	RTS
DOSTARS_VERTICAL
	CLC
	LDA DLIST00+$02
	ADC #$01
	AND #$F7
	STA DLIST00+$02
	LDA DLIST01+$02
	ADC #$01
	AND #$F7
	STA DLIST01+$02
	LDA DLIST02+$02
	ADC #$01
	AND #$F7
	STA DLIST02+$02
	LDA DLIST03+$02
	ADC #$01
	AND #$F7
	STA DLIST03+$02
	LDA DLIST04+$02
	ADC #$01
	AND #$F7
	STA DLIST04+$02
	LDA DLIST05+$02
	ADC #$01
	AND #$F7
	STA DLIST05+$02
	LDA DLIST06+$02
	ADC #$01
	AND #$F7
	STA DLIST06+$02
	LDA DLIST07+$02
	ADC #$01
	AND #$F7
	STA DLIST07+$02
	LDA DLIST08+$02
	ADC #$01
	AND #$F7
	STA DLIST08+$02
	LDA DLIST09+$02
	ADC #$01
	AND #$F7
	STA DLIST09+$02
	LDA DLIST10+$02
	ADC #$01
	AND #$F7
	STA DLIST10+$02
	LDA DLIST11+$02
	ADC #$01
	AND #$F7
	STA DLIST11+$02
	LDA DLIST12+$02
	ADC #$01
	AND #$F7
	STA DLIST12+$02
	LDA DLIST13+$02
	ADC #$01
	AND #$F7
	STA DLIST13+$02
	LDA DLIST14+$02
	ADC #$01
	AND #$F7
	STA DLIST14+$02
	LDA DLIST15+$02
	ADC #$01
	AND #$F7
	STA DLIST15+$02
	LDA DLIST16+$02
	ADC #$01
	AND #$F7
	STA DLIST16+$02
	LDA DLIST17+$02
	ADC #$01
	AND #$F7
	STA DLIST17+$02
	LDA DLIST18+$02
	ADC #$01
	AND #$F7
	STA DLIST18+$02
	LDA DLIST19+$02
	ADC #$01
	AND #$F7
	STA DLIST19+$02
	LDA DLIST20+$02
	ADC #$01
	AND #$F7
	STA DLIST20+$02
	LDA DLIST21+$02
	ADC #$01
	AND #$F7
	STA DLIST21+$02
	LDA DLIST22+$02
	ADC #$01
	AND #$F7
	STA DLIST22+$02
	LDA DLIST23+$02
	ADC #$01
	AND #$F7
	STA DLIST23+$02
	LDA DLIST24+$02
	ADC #$01
	AND #$F7
	STA DLIST24+$02
	LDA DLIST25+$02
	ADC #$01
	AND #$F7
	STA DLIST25+$02
	LDA DLIST26+$02
	ADC #$01
	AND #$F7
	STA DLIST26+$02
DOSTARS_HORIZONTAL
	LDA DLIST00+$02
	CMP #>(STAMPS)+$00
	BEQ DOSTARS_MOVE
	RTS
DOSTARS_MOVE
	LDA DLIST25+$03
	STA DLIST26+$03
	LDA DLIST24+$03
	STA DLIST25+$03
	LDA DLIST23+$03
	STA DLIST24+$03
	LDA DLIST22+$03
	STA DLIST23+$03
	LDA DLIST21+$03
	STA DLIST22+$03
	LDA DLIST20+$03
	STA DLIST21+$03
	LDA DLIST19+$03
	STA DLIST20+$03
	LDA DLIST18+$03
	STA DLIST19+$03
	LDA DLIST17+$03
	STA DLIST18+$03
	LDA DLIST16+$03
	STA DLIST17+$03
	LDA DLIST15+$03
	STA DLIST16+$03
	LDA DLIST14+$03
	STA DLIST15+$03
	LDA DLIST13+$03
	STA DLIST14+$03
	LDA DLIST12+$03
	STA DLIST13+$03
	LDA DLIST11+$03
	STA DLIST12+$03
	LDA DLIST10+$03
	STA DLIST11+$03
	LDA DLIST09+$03
	STA DLIST10+$03
	LDA DLIST08+$03
	STA DLIST09+$03
	LDA DLIST07+$03
	STA DLIST08+$03
	LDA DLIST06+$03
	STA DLIST07+$03
	LDA DLIST05+$03
	STA DLIST06+$03
	LDA DLIST04+$03
	STA DLIST05+$03
	LDA DLIST03+$03
	STA DLIST04+$03
	LDA DLIST02+$03
	STA DLIST03+$03
	LDA DLIST01+$03
	STA DLIST02+$03
	LDA DLIST00+$03
	STA DLIST01+$03
	JSR RAND
	AND #$7F									;RANGE 0-127
	CLC
	ADC #LEFTSIDE - 8							;NOW IT'S 16-144
	STA DLIST00+$03
	RTS

 

Edited by PacManPlus
  • Like 1

Share this post


Link to post
Share on other sites

Ok... up next...

 

I have the level number up top.  Also, I *think* I have the difficulty close to the arcade (normal).  I was never very good at the arcade game, so it's difficult for me to tell.  (Where's @negative1 when you need him?) :) 

The 'Easy' mode should be quite a bit easier, and 'Hard' mode is absolutely brutal.

 

Let me know.

 

So, if this is ok, I have left:

- Finish Sounds

- Game Demo

 

Galaxian.A78 Galaxian.BIN

Edited by PacManPlus
  • Like 11
  • Thanks 2

Share this post


Link to post
Share on other sites

Just played all three difficulty settings with 5 ships on each.  Gameplay is excellent!  Two small things stood out to me, however:

  • 'Hard' mode should have its name changed to 'HAHAHA YOU'RE GONNA DIE' :-D
  • Would it be possible to put a space between the score and the spare lives counter?  It looks a little bunched up right now.

Really like the level indicator at the top; it works well.  Ditto the gradual change in tempo of the swarm sound.

 

Overall, this specific build was one that I really liked.  Can't really explain why; it just felt right.

  • Like 1
  • Thanks 1

Share this post


Link to post
Share on other sites
2 hours ago, PacManPlus said:

Ok... up next...

 

I have the level number up top.  Also, I *think* I have the difficulty close to the arcade (normal).  I was never very good at the arcade game, so it's difficult for me to tell.  (Where's @negative1 when you need him?) :) 

The 'Easy' mode should be quite a bit easier, and 'Hard' mode is absolutely brutal.

 

Let me know.

 

So, if this is ok, I have left:

- Finish Sounds

- Game Demo

 

Galaxian.A78 32.13 kB · 10 downloads Galaxian.BIN 32 kB · 2 downloads

I’ll try to test this latest ROM tomorrow. 

  • Like 2

Share this post


Link to post
Share on other sites

Bob-just gave this a spin.  I tried first on 'normal' and died pretty quickly.  Next I tried 'easy' and survived a couple waves.  Really nice work, can't wait to test the final version!

  • Thanks 1

Share this post


Link to post
Share on other sites

Just gave this a try on Normal and Hard.  I think both diffs settings are right on.  I made it to the third wave (Normal) but have a bug report.  At the end of Wave 2, I had a Flagship and one other (non-red) enemy on the screen.  I killed the Flagship and the wave ended, without giving me a chance to kill the last enemy. I wasn't able to recreate this, but will try to test again sometime today. 

 

Btw, this game is coming along nicely.  Feels like the arcade, down to being able to juke/nudge the enemies left/right by a quick left/right movement of the joystick.

HS Wave 3 Normal.jpg

  • Like 2

Share this post


Link to post
Share on other sites

Just gave this a spin on the A7800DS emulator and it plays great!

The colors look a bit off - maybe it's on my end.  In the arcade, the flagship is bright yellow center and blue outline and the guards that go with it are red and blue.

 

Arcade:
image.png.14d26266bb9d44057191b3ea73c29d43.png
 

A7800DS:

image.png.b67e7bdb7b8f2a2a8130d6c8f72c81de.png


(sorry, phone screenshot)

 

The play was outstanding - this is really awesome, Bob!

 

  • Like 1

Share this post


Link to post
Share on other sites

@sramirez2008 -  Thanks, Steve, I'll also see if I can recreate it.

@llabnip - Yep, we worked on that one.  320B mode only has two palettes with 3 colors each.  Also,  one of the colors in each palette can only be used in certain situations.  So, I had to come up with a compromise with all enemies, players, shots, and text colors:

Palette 1 - Blue (special case color - can only be used next to red or yellow), Red, and Yellow

Palette 2 - Red (special case color - can only be used next to aqua or purple), Aqua, and Purple.

 

The special case explanation is a very quick one; it's really used in pairs, next to color 2 or color 3.  i.e. it can't be used next to itself or background.

Edited by PacManPlus
  • Like 3

Share this post


Link to post
Share on other sites
2 hours ago, sramirez2008 said:

Just gave this a try on Normal and Hard.  I think both diffs settings are right on.  I made it to the third wave (Normal) but have a bug report.  At the end of Wave 2, I had a Flagship and one other (non-red) enemy on the screen.  I killed the Flagship and the wave ended, without giving me a chance to kill the last enemy. I wasn't able to recreate this, but will try to test again sometime today. 

 

@sramirez2008 - What was their status?  Both in the swarm, both in the air, or which one was in the air and the other in the swarm?  Also, do you remember if the flagship originally had escorts and you shot them, or attacked without escorts?

Thanks!

Share this post


Link to post
Share on other sites
1 hour ago, PacManPlus said:

 

@sramirez2008 - What was their status?  Both in the swarm, both in the air, or which one was in the air and the other in the swarm?  Also, do you remember if the flagship originally had escorts and you shot them, or attacked without escorts?

Thanks!

They were both at the top of the screen, then the flagship swarmed down (alone) while the the ship remained at the top of the screen (hadn’t started to swarm yet).

 

I shot the flagship and the game moved onto the next wave, with the last enemy sitting at the top of the screen. 

Share this post


Link to post
Share on other sites

Well I haven’t been able to recreate the bug. Been playing for the last hour and have to stop now and get back to work. I made it to wave 7 (could’ve been 8, but I remember 7 for sure) with 5 lives. Best I could get with 3 lives was ~12k.

6B2EB824-E1C1-4F65-A74B-FD917FD04EE6.jpeg

  • Like 3

Share this post


Link to post
Share on other sites

Next WIP...

 

Updated:

  • Added 'demo game' to attract mode
  • Added 'rapid fire' option

Things left:

  • Work on two sounds: Player Shot (the sound itself), and Enemy Dive (the 'lowest' part where it just loops)
  • Possible Flagship + 1 enemy left issue.  Haven't been able to recreate it as of yet.
  • Maybe tweak 'Normal' difficulty a little more?  Still seems too hard to me.

Galaxian.A78 Galaxian.BIN

  • Like 9
  • Thanks 4

Share this post


Link to post
Share on other sites

Fantastic job Bob! Plays and sounds great - just like the Arcade 👋

  • Like 4
  • Thanks 1

Share this post


Link to post
Share on other sites

Nice! It's just too bad that my CX24's left directional pop-o-matic contact is failing, BTW, can you tweak the 'rapid' fire mode to activate only when you hold down the fire button (like in Centipede/Millipede) as opposed to making it 'hands free'??? It'll allow more player control over when they decide to utilize the rapid fire mode, having it optional during gameplay, in other words holding it down for rapid fire would be much better than the 'auto-pilot' mode.

 

Thanks and great job!!! BTW, I LOVE the opening screen graphic, especially the "Galaxian" logo, I'm just frustrated over my CX24's left directional control failing on me (it's the last fully-working one I have left), it may be time for a phone call to Best to get a pair of modded CX24's (along with a second modded CX52 for my 5200 so I can play my twin-stick games on her too), does anyone know their phone number??? After I get my 2002 Beetle GLS out of the shop (she's over in Bremerton at Haselwood VW/Hyundai 45 miles away from Port Townsend getting worked on) that'll be my first order of business.

  • Like 2

Share this post


Link to post
Share on other sites

Wow, this looks and sounds so good👍  I have not been able to recreate the 'Flagship + 1 enemy left issue'.  Guess it was a fluke.

6 hours ago, PacManPlus said:

Added 'demo game' to attract mode

This is cool.  Polishes off the game and really gives it that coin-op feel.

 

6 hours ago, PacManPlus said:

Added 'rapid fire' option

Setting this to 'ON' makes the ship auto fire (rapidly) on its own, as soon as the gameplay begins.  

  • Like 1

Share this post


Link to post
Share on other sites
1 minute ago, sramirez2008 said:

Setting this to 'ON' makes the ship auto fire (rapidly) on its own, as soon as the gameplay begins.  

Yep, I already fixed that :) 

 

I'll be working on the last few items after work today.  Should have an RC1 by tonight. :)

 

  • Like 6
  • Thanks 1

Share this post


Link to post
Share on other sites
4 minutes ago, sramirez2008 said:

Setting this to 'ON' makes the ship auto fire (rapidly) on its own, as soon as the gameplay begins.  

Nah, I wish the rapid fire mode be accessible when you hold down the fire button, much like in Centipede, so that you only get the repetitive fire while holding down the button rather than it being on 'auto-pilot' where it may fire out-of-control, but yes keep that as an option.

Edited by BIGHMW
spelling error
  • Like 1

Share this post


Link to post
Share on other sites
3 minutes ago, PacManPlus said:

Yep, I already fixed that :) 

 

I'll be working on the last few items after work today.  Should have an RC1 by tonight. :)

 

Great, I'll be on the lookout for it. So far so great Bob. :) 

  • Like 1

Share this post


Link to post
Share on other sites

To use the MAME testers vernacular for a moment: this what I'd consider to be a BTANB (Bugs That Are Not Bugs).  It's more of a human perception issue, though it is one that is both subtle but noticeable in gameplay.

 

It has to do with how lives are displayed (and thank you for the space between the score and life counter :-D ).

  • Start a two-player game with 3 lives on 'hard' difficulty; this will be the fastest way to reproduce it.
  • Let both Player 1 and Player 2 lose their first two lives.  Note how the life counter decrements.
  • When both players start on their third (and final) life, there are no lives showing on the life counter.

Not a huge deal, but it does make it appear as though the player has zero lives left when the player's final life is still in reserve.  What this leads to is thinking that the game is over (despite no 'game over' message having been shown), which in turn causes a scramble to get back into playing when the player's last ship does appear.  Like I said: it's down to human perception, not the actual gameplay.

 

I did check this behaviour against both galaxian and galaxianm in MAME, and neither one does this - they wait until the player's ship is first drawn to decrement the number of lives remaining, which avoids the issue.

 

Other than that, it's playing great.  I'll try to not lump too much to have to bang on into the crunch towards a final RC ;)

  • Like 1

Share this post


Link to post
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...