Jump to content







Photo

New Game - Better Big Dipper code?

Posted by Dave Neuman, 10 August 2007 · 40 views

I didn't like the original code for the Big Dipper so I used a standard delay loop. It saves space but it does not give the same effect. Here is the first bin which shows a fairly good depiction of the Big Dipper.
Attached File  BackStars8_8_07.bin (4K)
downloads: 162

Here is the alternate code ... saves space but doesn't look as good. :(

;Show Big Dipper 	
	LDA #2			;used to enable missile
	LDX #7			;Number of stars
BigDipperLoop	
	LDY StarTable,X	;get delay for loop (star placement)
	STA WSYNC		;always start loop at same time
;Delay loop positions stars	
DipperDelay
	DEY
	BNE DipperDelay
	
	STA ENABL		;Turn missile on
	STY RESBL		;strobe missile position
	DEX 
	STA WSYNC
	STA WSYNC	
	STY ENABL		;Turn missile off
	BNE BigDipperLoop	;Start loop over


StarTable

	.byte 10,8,5,9,8,7,6,9
This bin shows a less desireable depiction of the Big Dipper as coded above.
Attached File  BackStars8_11_07.bin (4K)
downloads: 149

This bin looks a little better for only a couple of bytes
Attached File  BackStars8_12_07.bin (4K)
downloads: 100

Here is another approach for displaying stars using the Cosmic Ark trick, but only turning on selected stars.
Attached File  BackStarsBall9_24_07.bin (4K)
downloads: 110




The first one definitely looks nicer. Of course, if you wouldn't have shown us that one, we wouldn't have a point of comparison, so the second one might have looked fine on its own. :)
  • Report

Nathan Strum, on Fri Aug 10, 2007 7:50 PM, said:

The first one definitely looks nicer. Of course, if you wouldn't have shown us that one, we wouldn't have a point of comparison, so the second one might have looked fine on its own. :)


:)

I added a short delay in order to angle the bucket ... looks a little better. I attached it to the end of the first post. I was thinking about adding a small sprite of the earth. Of course none of this adds anything to game-play, but it's a fun divergence until I can think of some game play elements. I guess I'm kinda doing this backwards.

;Show Big Dipper 	
	LDA #2			;used to enable missile
	LDX #6			;Number of stars

BigDipperLoop	
	LDY StarTable,X		;get delay for loop (star placement)
	STA WSYNC		;always start loop at same time

;Delay loop (positions stars)	
DipperDelay
	DEY
	BNE DipperDelay
	
	DEX 

;Reposition left lower star in dipper
	BNE NOMOVE
	NOP
NOMOVE	
	
	STA ENABL		;Turn missile on
	STY RESBL		;strobe missile position
	
	STA WSYNC		;Add some heigth to missiles
	STA WSYNC		;Add some heigth to missiles
	STY ENABL		;Turn missile off
	
	BPL BigDipperLoop	;Start loop over
  • Report
Using the Cosmic Ark trick here and turning on selected stars via a table.
  • Report

May 2012

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

Recent Comments

Search My Blog

0 user(s) viewing

0 members, 0 guests, 0 anonymous users

Tags

    My Picture

    Latest Visitors