Jump to content
IGNORED

My 7800 Vertical Shooter - Heofonfīr


Recommended Posts

  • 2 months later...

Hey SlidellMan, I've got a menu sample working for you that you're free to use.  I looked at your code and decided to just start over from scratch and create a well commented example that uses your graphics and will hopefully be easy for you to incorporate into your existing game.  Since you already shared those graphics previously in this thread I'm including them in this post too just in case someone else wants to download this and try it out as well.

 

This sample uses your title screen, then loads a menu selection screen with four options (Skill, Lives, Level, and Start Game), and allows you to select from three different choices for each one. Up and down changes the menu entry and left/right changes the options for that menu entry.  Pressing fire on Start Game will jump to a main loop and display the options you chose from the menu screen.

 

Let me know if you have any questions about the code.  I'm happy to help.

 

 

 

 

Menu_Sample.png

menu_sample.bas menu_sample.bas.a78 graphics.zip

  • Like 3
  • Thanks 1
Link to comment
Share on other sites

On 2/26/2023 at 8:15 PM, SlidellMan said:

@Atarius Maximus Thanks a whole lot. I just got started on implementing the needed changes.

 

All ROM/.bin files and the source code are in the .zip file.

Menu Demo 2-26-2023.zip 312.52 kB · 7 downloads

Based on your PM I took a look at your code and I've got this all sorted out for you.  The main issue is you had a return without a gosub in your titlescreen loop, I added a goto command instead for that loop. Your code for selecting a menu item when moving up was also incorrect, I fixed that.  I'm attaching an updated version of your code and I put in comments everywhere I made a change.  Everything works. :)

h1.png

h2.png

h3.png

Menu_Demo_Update.78b Menu_Demo_Update.78b.a78

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I've applied the changes that you made, @Atarius Maximus. Thank you for helping point out what I overlooked.

heofonfir_boss_battlexex.xex heofonfir_bossbattle.rmt Menu Demo 3-1-2023.zip Menu_Demo_v1.78b.a78 Menu_Demo_v1.78b.bin Menu_Demo_v1.78b.list.txt Menu_Demo_v2.78b.a78 Menu_Demo_v2.78b.bin Menu_Demo_v2.78b.list.txt

Oh, I almost forgot, I made a boss battle theme.

Edited by SlidellMan
Forgot to mention the new song.
Link to comment
Share on other sites

3 hours ago, SlidellMan said:

The menu still has an issue - the color doesn't change to indicate which menu item you're on, and you can't move back up the menu once you move down.  You'll need to add the menu_selection_color<x> variable to the plotchar statements, and re-do the menu down code.  I've got the changes needed below.

 

Change this:

 

    plotchars 'skill:' 0 28 5
    plotchars 'lives:' 0 28 6
    plotchars 'time trial:' 0 28 8
    plotchars 'players:' 0 28 9
    plotchars 'start game' 0 28 10
;    plotchars 'expert mode' 0 60 120

    ; (the debounce_down/menu_down section that's right here is fine, I removed that for this snippet)
      
    if debounce_up = 6 && menu_yposition = 8 then debounce_up = 0:menu_yposition = 9
    if debounce_up = 6 && menu_yposition = 7 then debounce_up = 0:menu_yposition = 8
    if debounce_up = 6 && menu_yposition = 6 then debounce_up = 0:menu_yposition = 7 
    if debounce_up = 6 && menu_yposition = 5 then debounce_up = 0:menu_yposition = 6
    if debounce_up = 6 && menu_yposition = 5 then debounce_up = 0:menu_yposition = 5

 

To this:

 

    plotchars 'skill:' menu_selection_color1 28 5
    plotchars 'lives:' menu_selection_color2 28 6
    plotchars 'level:' menu_selection_color3 28 7
    plotchars 'time trial:' menu_selection_color4 28 8
    plotchars 'players:' menu_selection_color5 28 9
    plotchars 'start game' menu_selection_color6 28 10
;    plotchars 'expert mode' 0 60 120

    ; Again - don't change the debounce_down section that's in-between these two sections of code.  It works fine.

    if debounce_up = 6 && menu_yposition = 10 then debounce_up = 0:menu_yposition = 9
    if debounce_up = 6 && menu_yposition = 9 then debounce_up = 0:menu_yposition = 8
    if debounce_up = 6 && menu_yposition = 8 then debounce_up = 0:menu_yposition = 7
    if debounce_up = 6 && menu_yposition = 7 then debounce_up = 0:menu_yposition = 6
    if debounce_up = 6 && menu_yposition = 6 then debounce_up = 0:menu_yposition = 5
    if debounce_up = 6 && menu_yposition = 5 then debounce_up = 0:menu_yposition = 5 

 

  • Like 1
Link to comment
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...