• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
  • entries
    104
  • comments
    101
  • views
    252464

A C64 Game - Step 89

Sign in to follow this  
Followers 0
Endurion

1223 views

Now you can kill the last part. Beware, it will fight back though!


step89.png


All kind of changes are added to the boss 7 behaviour routine, as it now gets a new state. First of all, handle getting hit;------------------------------------------------------------;boss #7;state = 0, 128 -> random movements;state = 129 -> attack with beams;------------------------------------------------------------!zone BehaviourBoss7BehaviourBoss7BOSS_MOVE_SPEED = 1 lda SPRITE_HITBACK,x beq .NoHitBack dec SPRITE_HITBACK,x ldy SPRITE_HITBACK,x lda BOSS_FLASH_TABLE,y sta VIC_SPRITE_COLOR,x cpy #0 bne .NoHitBack ;make vulnerable again lda #0 sta SPRITE_STATE,x lda #2 sta VIC_SPRITE_COLOR,x .NoHitBack lda SPRITE_STATE,x beq .RandomMovements cmp #1 beq + cmp #129 beq + jmp .RandomMovements +
In AttackWithBeams we add a special case when all body parts have been destroyed: lda BOSS_PARTS_KILLED cmp #5 bne + jmp FinalAttack +
FinalAttack is the meat of the new part. Shooting a beam and rotating it over the screen! (Subtly reusing existing beam helper routines)!zone FinalAttack.BeamStep1 ;left arm lda SPRITE_CHAR_POS_Y,x sta PARAM3 lda #0 sta PARAM1 lda SPRITE_CHAR_POS_X,x sta PARAM2 ldy #0 jsr CheckIsPlayerCollidingWithYPosH ldy #1 jsr CheckIsPlayerCollidingWithYPosH ldy #BEAM_TYPE_DARK lda BEAM_CHAR_H,y sta PARAM1 lda #1 sta PARAM2 lda #0 sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 lda SPRITE_CHAR_POS_X,x sec sbc #2 sta PARAM5 jsr DrawBeamHSegment rts .BeamStep1End ;remove beam lda #0 sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 lda #39 sta PARAM5 jsr RestoreBeamHSegment jsr RedrawItems rts.BeamStep2 lda SPRITE_CHAR_POS_Y,x sta PARAM2 lda SPRITE_CHAR_POS_X,x sta PARAM1 ldy #0 jsr CheckIsPlayerCollidingWithDiagonalLLUR ldy #1 jsr CheckIsPlayerCollidingWithDiagonalLLUR ldy #3 lda BEAM_CHAR_NESW,y sta PARAM1 lda #1 sta PARAM2 lda SPRITE_CHAR_POS_X,x sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 jsr DrawBeamDiagonalLLUR rts .BeamStep2End lda SPRITE_CHAR_POS_X,x sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 jsr RestoreBeamDiagonalLLUR jsr RedrawItems rtsFinalAttack ;mode 5, 6 = left ; 7, 8 = diagonal left down ; 9, 10 = down ; 11, 12 = diagonal right down ; 13, 14 = right lda SPRITE_MODE_POS,x cmp #5 bne + jmp .BeamStep1+ cmp #6 beq .BeamStep1End cmp #7 beq .BeamStep2 cmp #8 beq .BeamStep2End cmp #9 beq .BeamStep3 cmp #10 beq .BeamStep3End cmp #11 beq .BeamStep4 cmp #12 bne + jmp .BeamStep4End+ cmp #13 bne + jmp .BeamStep5+ cmp #14 bne + ; .BeamStep5End jmp .BeamStep1End+ cmp #15 bne + lda #0 sta SPRITE_MODE_POS,x sta SPRITE_STATE,x+ rts.BeamStep3 ;does player hit beam? ldy #0 jsr CheckIsPlayerCollidingWithBeamV ldy #1 jsr CheckIsPlayerCollidingWithBeamV ldy #BEAM_TYPE_DARK lda BEAM_CHAR_H,y sta PARAM1 lda BEAM_CHAR_V,y sta PARAM2 lda #1 sta PARAM3 lda SPRITE_CHAR_POS_X,x sta PARAM4 lda SPRITE_CHAR_POS_Y,x sta PARAM5 stx PARAM6 jsr DrawBeamV rts .BeamStep3End lda SPRITE_CHAR_POS_X,x sta PARAM4 lda SPRITE_CHAR_POS_Y,x sta PARAM5 jsr RestoreBeamHV jsr RedrawItems rts .BeamStep4 lda SPRITE_CHAR_POS_X,x sta PARAM1 lda SPRITE_CHAR_POS_Y,x sta PARAM2 ldy #0 jsr CheckIsPlayerCollidingWithDiagonalULLR ldy #1 jsr CheckIsPlayerCollidingWithDiagonalULLR ldy #3 lda BEAM_CHAR_NWSE,y sta PARAM1 lda #1 sta PARAM2 lda SPRITE_CHAR_POS_X,x sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 jsr DrawBeamDiagonalULLR rts .BeamStep4End lda SPRITE_CHAR_POS_X,x sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 jsr RestoreBeamDiagonalULLR jsr RedrawItems rts.BeamStep5 ;right arm lda SPRITE_CHAR_POS_Y,x sta PARAM3 lda SPRITE_CHAR_POS_X,x sta PARAM1 lda #39 sta PARAM2 ldy #0 jsr CheckIsPlayerCollidingWithYPosH ldy #1 jsr CheckIsPlayerCollidingWithYPosH ldy #BEAM_TYPE_DARK lda BEAM_CHAR_H,y sta PARAM1 lda #1 sta PARAM2 lda SPRITE_CHAR_POS_X,x sta PARAM3 lda SPRITE_CHAR_POS_Y,x sta PARAM4 lda #39 sta PARAM5 jsr DrawBeamHSegment rts
Have fun and look out!


Previous Step Next Step

1
Sign in to follow this  
Followers 0


2 Comments


It's a little depressing that low level-code looks better than my object oriented C++ game >_>. Awesome job though :D

0

Share this comment


Link to comment

Thanks, but I have to disagree   smile.png

 

Your variables are not all called x, y or a.

0

Share this comment


Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now