Re: A small example game in pure basic

ah.
Well all that aside, I'm actually creating audio game includes for pure basic, and have created a menu class. to create a menu, it's like this.
;here is where we declare all menus. You can add your items wherever, but remember in this case think of menus as global variables, as they are in bgt.
create_menu("main menu", "up_down", "true", "sounds\menuMusic.ogg")
;the first parameter is the title. You will use this to add items, and configure item select events.
;the up_down means we'll have an up down menu. left_right in this set of quotations would make a side scrolling menu.
;true means wrapping in the menu is true. if you don't want a wrapping menu, put false in there.
;the fourth parameter is for music. if you don't want the menu to have music, leave this blank (type "")
create_menu("tts options", "left_right", "false", "" ;)
;now let's add items on the main menu.

add_item("main menu", "start game")
add_item("main menu", "tts options")
add_item("main menu", "exit game")
;now here comes the do_menu procedure. you only need to create this once, but it holds the code for all your menus on select actions, like this.

procedure do_menu(TheMenu.s)
if theMenu = "main menu"
;don't worry. when we call load_menu on "main menu" in a second, TheMenu.s will contain main menu, until we load a different menu.
if result = 1
;result is the variable you must use. it's just like menu_result in bgt, it does the same things.
if result = 1
GameLoop()
elseIf result = 2
load_menu("TTs options")
elseIf result = 3
end
;that closes the program
endif
elseIf TheMenu = "tts options"
;there are going to be no options in this menu, I was just demonstrating the ability to have multiple menus
endif
endProcedure
;now let's load our main menu.
load_Menu("main menu")


Should I continue this project and release to public?
y or n.

_______________________________________________
Audiogames-reflector mailing list
Audiogames-reflector@sabahattin-gucukoglu.com
https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector
  • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : ambro86 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : blindncool via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : audiogames . net fan via Audiogames-reflector
    • ... AudioGames . net Forum — Developers room : severestormsteve1 via Audiogames-reflector

Reply via email to