SlidellMan Posted October 15, 2020 Author Share Posted October 15, 2020 A work in progress version of a 160B player select graphic. I decided to go with that because it would be easier to work with instead of trying to layer sprites for the player select. 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted October 17, 2020 Author Share Posted October 17, 2020 Here's my latest sprite for one of the player characters. 2 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted October 22, 2020 Author Share Posted October 22, 2020 Thought I would get back on the programming track. If anyone wants to edit that sprite I made, here's the source files. Vertical Shooter 10-21-2020.zip New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt 7800_heofonfir_lucelia_player_select_160B.spe heofonfir_160b_player_palette.palette Quote Link to comment Share on other sites More sharing options...
Jinks Posted October 22, 2020 Share Posted October 22, 2020 (edited) On 10/17/2020 at 12:51 PM, SlidellMan said: Here's my latest sprite for one of the player characters. Looks like Princess Booty needs to dye her roots! ? Something for the older generation. Keeping it real! Edited October 22, 2020 by Jinks 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted October 23, 2020 Author Share Posted October 23, 2020 (edited) I'm currently writing in a Twin laser power-up for the shooting demo. power_up_obtained if power_upFlag=1 then if joy0fire && joyposup=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposdown=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposleft=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposright=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if !joy0fire then twinlaserX=playerX+2:twinlaserY=playerY-8 No build, just the source files this time. Vertical Shooter 10-23-2020.zip Update: Here's the latest ROMs and list file. New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt Edited October 23, 2020 by SlidellMan New Rom! 2 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 12, 2020 Author Share Posted December 12, 2020 It has been over one month since I last touched this, but I'm still confounded on how to get the return to title screen to work upon the Game Over screen. Here's the subroutine: gameover_loop if lives<1 then gameover_flag=1:clearscreen plotchars 'Game Over!' 0 40 16 if joy0fire then fire_debounce=1 if !joy0fire then fire_debounce=0 goto gameover_loop if fire_debounce=1 then clearscreen:goto plot What also needs to be done: -Get the laser power-up working -Get the explosions to work properly -Get the firing sound effect to work properly -Get the Lives and score to display properly Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted December 12, 2020 Share Posted December 12, 2020 The logical flow of the code that you posted has some problems. The clear screen would only happen if lives was less than 1, you might want to clear the screen anyway, not just if the "if" condition is met, especially if this is a subroutine for gameover. You would also need a drawscreen in the gameover loop otherwise your message won't get plotted. You also have an if test after the "goto gameover_loop" so that if test will never be tested because of the goto just before it. I'd suggest testing for lives = 0 or lives <1 in your main loop and then if it's found to be true (ie the player has run out of lives) then jump to the game over loop. You only need to go to that piece of code if it is "game over" and not every frame, otherwise you are just adding processing overhead to the game. This is Pseudo code to demonstrate: Main_loop clear the screen plot stuff draw the screen test stuff if lives = 0 then goto game_over goto Main_loop game_over clear the screen plotchars "game over!" 0 40 16 do debounce checks if fire button pressed and debounce is ok then goto title_page else goto game_over Writing pseudo code can be a good way to figure out the logic of what you want to do before you actually try to code it. I do this a lot and it helps spot holes in your logic and also helps with the logical flow and structure of the code. I used to be pencil and paper for a few hours before I start to code, but now I use a spreadsheet 1 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 12, 2020 Author Share Posted December 12, 2020 (edited) @MuddyfunsterThanks, and points taken. As a token of my gratitude, here's the latest source. Oh, and I tested the latest build in Bup System, and it works. Vertical Shooter 12-11-2020.zip New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt Edited December 13, 2020 by SlidellMan Forgot to include the regular binary. 2 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 13, 2020 Author Share Posted December 13, 2020 Here's what I have for today. New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt Vertical Shooter 12-13-2020.zip 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 18, 2020 Author Share Posted December 18, 2020 (edited) Here's some new progress on an older source file: I also would like to mention that it took a few minutes to realize that syntax error. shooting_test.78b.a78 shooting_test.78b.bin shooting_test.78b.list.txt shooting Test 12-18-2020.zip Quick update: I just added a continue screen routine to my other demo. However, here's the catch: --- Unresolved Symbol List BREAKPROTECTOFF 0000 ???? (R ) 0.playerX 0000 ???? (R ) 0.titlescreen_loop 0000 ???? (R ) stack allowance: 30 nested subroutines. the canary is situated at: $1c1 873 bytes of ROM space left in the main area. 790 bytes of ROM space left in DMA hole 0. $1880 to $1fff used as zone memory, allowing 15 display objects per zone. 2310 bytes left in the 7800basic reserved area. Vertical Shooter 12-18-2020.zip Edited December 18, 2020 by SlidellMan Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 19, 2020 Author Share Posted December 19, 2020 I decided to write down some notes in regards to what I have learned over the months. 1. Be sure to set up what you need. 2. Be sure to dim your variables, properly plot them, and never dim labels. 3. '&&' comes in between 'if' and 'then'; ':' always comes after 'then'. 4. All subroutines must be placed after 'goto mainloop'. Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 22, 2020 Author Share Posted December 22, 2020 For now, I have decided to comment out the continue screen routine. This will remain that way until I find out how to rectify that. As usual, I have included the source code, list file, and the ROMs. gameover gameover_flag=0 gameover_loop if lives=0 then gameover_flag=1:clearscreen plotchars 'Game Over!' 0 40 16 if joy0fire then fire_debounce=1 if !joy0fire then fire_debounce=0 if fire_debounce=1 then clearscreen:goto plot goto gameover_loop ; goto continue_loop /* continue continue_flag=1 continue_loop plotchars 'Continue?' 0 40 3 plotchars 'Yes' 0 24 4 plotchars 'No' 0 72 4 if joy0fire0 then fire_debounce=1 if !joy0fire0 then fire_debounce=0 if joy0left && fire_debounce=1 then clearscreen:goto playerX=80 : playerY=144:playerFlag=0:explosion_aniframe=0:goto main if joy0right && fire_debounce=1 then clearscreen:goto titlescreen_loop goto continue_loop */ So far, the game over screen still works. Vertical Shooter 12-21-2020.zip New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt 1 Quote Link to comment Share on other sites More sharing options...
+Muddyfunster Posted December 22, 2020 Share Posted December 22, 2020 On 12/19/2020 at 11:24 PM, SlidellMan said: I decided to write down some notes in regards to what I have learned over the months. 1. Be sure to set up what you need. 2. Be sure to dim your variables, properly plot them, and never dim labels. 3. '&&' comes in between 'if' and 'then'; ':' always comes after 'then'. 4. All subroutines must be placed after 'goto mainloop'. 3. && is used to represent "AND", it's a boolean operator that you can use if you want to test an extra condition. It's not mandatory in an IF...THEN statement. Using it creates a compound statement. For example. if dog = 6 && cat = 8 then goto mouse this logic tests to see if dog = 6 and cat = 8, if so it jumps to the code routine labeled "mouse". If one (or both) of the conditions is not met, it does not jump. That's the point of && (and) here, to test for multiple conditions. I could just test without it : if dog = 6 then goto mouse and not use "&&", but then I am not testing the second condition. Also, ":" doesn't come after "then". Not sure what you mean here. Usually the code that comes after "then" is the code that gets executed depending on the IF test condition, as in the example above. You can have commands after a "then" command to do more stuff and that's when to use ":" to separate them. eg. if dog = 6 && cat = 8 then duck = 0 : goto mouse so you are just using ":" to separate the commands. The "goto mouse" code only gets executed if the conditions in the compound statement occur. This might help 2 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 24, 2020 Author Share Posted December 24, 2020 Muddy, Thanks. New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt Vertical Shooter 12-24-2020.zip 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 26, 2020 Author Share Posted December 26, 2020 (edited) I just changed if joy0fire then clearscreen:savescreen:lives=$04:score0=0:goto main:playsfx sfx_bling to if joy0fire then clearscreen:savescreen:lives=$04:score0=0:playsfx sfx_bling:goto main in my current working file. I can't believe that I overlooked that all this time I was working on it. If there is anything else I have overlooked, I would like to know. Vertical Shooter 12-26-2020.zip New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt Edited December 26, 2020 by SlidellMan Source files and ROM downloads. 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 28, 2020 Author Share Posted December 28, 2020 After dealing with compilation problems and listening to MKSmith, I have an improved version. Vertical Shooter 12-27-2020.zip New_VerticalShooter_Test_sprani.78b.a78 New_VerticalShooter_Test_sprani.78b.bin New_VerticalShooter_Test_sprani.78b.list.txt 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 31, 2020 Author Share Posted December 31, 2020 I decided to play my latest build in JS7800, and can confirm that it works. Now, to test it in BupSystem, and I plan on getting the continue screen subroutine working. Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted December 31, 2020 Author Share Posted December 31, 2020 After playing my demo in BupSystem, I can also confirm that it also works in that emulator. New_VerticalShooter_Test_continue.78b.a78 New_VerticalShooter_Test_continue.78b.bin New_VerticalShooter_Test_continue.78b.list.txt Vertical Shooter 12-30-2020.zip 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 5, 2021 Author Share Posted January 5, 2021 (edited) I just wanted to thank those who provided criticism and advice on my project, as well as those who downloaded the ROMs and tried them on actual hardware and emulators. Especially to @Muddyfunster, @SmittyB, @RevEng, @mksmith, and @Mord. It means a lot. gameover gameover_flag=0 fire_debounce = 1 gameover_loop if lives=0 then gameover_flag=1:clearscreen plotchars 'game over!' 0 40 16 if joy0fire && !fire_debounce then clearscreen:goto continue if !joy0fire then fire_debounce=0 goto gameover_loop continue continue_flag=0 continue_loop plotchars 'continue?' 0 40 3 plotchars 'yes' 0 24 4 plotchars 'no' 0 72 4 if joy0fire0 then fire_debounce=1 if !joy0fire0 then fire_debounce=0 if joy0left && fire_debounce=1 then clearscreen:playsfx sfx_plainlaser:goto playerX=80 : playerY=144:playerFlag=0:explosion_aniframe=0:goto main if joy0right && fire_debounce=1 then clearscreen:playsfx sfx_plainlaser:goto plot goto continue_loop Anyways, here's my attempt at a continue subroutine with an edit of the current Game Over one. Update: Here's the latest source code and ROM files. They are in the enclosed .zip. Vertical Shooter 1-05-2021.zip Edited January 5, 2021 by SlidellMan New Rom! 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 11, 2021 Author Share Posted January 11, 2021 Here's the latest update: continue continue_flag=0 fire_debounce = 1 continue_loop plotchars 'continue?' 0 40 3 plotchars 'yes' 0 24 4 plotchars 'no' 0 72 4 ; if joy0fire0 then fire_debounce=1 if !joy0fire0 then fire_debounce=0 if joy0left && joy0fire && !fire_debounce then clearscreen:playsfx sfx_plainlaser:goto playerX=80 : playerY=144:playerFlag=0:explosion_aniframe=0:goto main if joy0right && joy0fire && !fire_debounce then clearscreen:playsfx sfx_plainlaser:goto plot goto continue_loop Vertical Shooter 1-11-2021.zip Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 16, 2021 Author Share Posted January 16, 2021 I finally decided to try to get my twin laser power up to work so I changed: if joy0fire && joyposup=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposdown=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposleft=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if joy0fire && joyposright=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser to if twinlaser_flag=1 && joy0fire && joyposup=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if twinlaser_flag=1 && joy0fire && joyposdown=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if twinlaser_flag=1 && joy0fire && joyposleft=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser if twinlaser_flag=1 && joy0fire && joyposright=1 then twinlaserY=twinlaserY-10 : playsfx sfx_plainlaser However, upon testing, no real change. Before I go, congratulations to those 7800 Homebrew nominees. New_VerticalShooter_Test_continue.78b Vertical Shooter 1-16-2021.zip New_VerticalShooter_Test_continue.78b.a78 New_VerticalShooter_Test_continue.78b.bin New_VerticalShooter_Test_continue.78b.list.txt 2 Quote Link to comment Share on other sites More sharing options...
Clint Thompson Posted January 18, 2021 Share Posted January 18, 2021 Tried this in JS7800 but wanting to verify that this is right or if the emulator is glitching out? In other news, I played it using the new VCS joystick It looks like collision works in that I crash or die if I make contact with the blue ship? but can't seem to shoot it? 1 Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 19, 2021 Author Share Posted January 19, 2021 To be honest, every time I tested it, the blue ship seemed to be unaffected. I was so focused on trying to get the twin laser and continue screen working that I neglected to fix that. I'll try to remedy that issue. Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 19, 2021 Author Share Posted January 19, 2021 I decided to try out one of MKSmith's examples. Oh, and I tried to fix the bug in the enemy collision detection. How? By adding enemy01_X = 208 : enemy01_Y = 200 to my current routine. MKSmith Example 01.78b.a78 MKSmith Example 01.78b.bin MKSmith Example 01.78b.list.txt MKSmith_Example_01.78b.a78 MKSmith_Example_01.78b.bin MKSmith_Example_01.78b.list.txt MKSmith Example 01.78b MKSmith_Example_01.78b New_VerticalShooter_Test_continue.78b.a78 New_VerticalShooter_Test_continue.78b.bin New_VerticalShooter_Test_continue.78b.list.txt Vertical Shooter 1-19-2021.zip Quote Link to comment Share on other sites More sharing options...
SlidellMan Posted January 20, 2021 Author Share Posted January 20, 2021 I added explosion_aniframe=1 to the check_collisions subroutine. Thus, a minor cosmetic update. Vertical Shooter 1-20-2021.zip New_VerticalShooter_Test_continue.78b.a78 New_VerticalShooter_Test_continue.78b.bin New_VerticalShooter_Test_continue.78b.list.txt Quote Link to comment Share on other sites More sharing options...
Recommended Posts
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.