Jump to content

  • Log In with Google      Sign In   
  • Create Account

FREE SOFTWARE GIVEAWAY

We have 4 x Pro Licences (valued at $59 each) for 2d modular animation software Spriter to give away in this Thursday's GDNet Direct email newsletter.


Read more in this forum topic or make sure you're signed up (from the right-hand sidebar on the homepage) and read Thursday's newsletter to get in the running!






A C64 Game - Step 64

Posted by Endurion, in C64 17 August 2012 · 793 views

Bug fixing!

Note how the sprites would flicker about before/after Get Ready?
Fixed. Also, Sam got borked again, esp. during a boss fight. Now that's also fixed.

Attached Image

First part is pretty easy, we disable the screen during build up of the level. Fortunately the VIC allows exactly this. So we add

to disable:
lda #$0b
sta VIC_CONTROL_MODE

to enable:
lda #$1b
sta VIC_CONTROL_MODE

We already saved all sprite information, but we only restored the first two sprites (the players) and rely on the usual object initialisation for the other objects. Unfortunately some levels start out with more.

So we modify the RemoveGetReady method to restore all sprites:

		  ;turn off sprite expansion bits
		  ldx #0
		  stx VIC_SPRITE_EXPAND_X
		  stx VIC_SPRITE_EXPAND_Y
		  ;restore all sprite positions and colors
-		
		  txa
		  asl
		  tay
		  lda SPRITE_POS_X,x
		  sta VIC_SPRITE_X_POS,y
		  lda SPRITE_POS_Y,x
		  sta VIC_SPRITE_Y_POS,y
		  lda SPRITE_COLOR,x
		  sta VIC_SPRITE_COLOR,x
		  ldy SPRITE_ACTIVE,x
		  cpy #0
		  bne +
		
--		
		  inx
		  cpx #8
		  bne -
		  jmp GameLoop
		
+
		  lda TYPE_START_SPRITE,y
		  sta SPRITE_POINTER_BASE,x
		  jmp --


Things can be so easy to fix!


Previous Step Next Step

Attached Files






Thanks again for your continued work on this project!!! I'm finding it so rare to find engaging and fun games unless looking towards Indie Developers.
What in the heck... How did I miss this journal all this time? Endurion, I'm apparently just catching on, but I'm trying to learn 6502 myself. Goal is to make something (first make anything, and then make something) for NES. So basically, thank you for such a journal as this! :)

December 2014 »

S M T W T F S
 123456
78910111213
14151617181920
2122232425 26 27
28293031   
PARTNERS