Topic: abolished the engine menu

in the latest build (749), the engine menu has been dropped. Menus have to be scripted now, and it's now possible to load quests via scripting: http://opensnc.sourceforge.net/wiki/ind … nce#Quests

A temporary scripted title screen is in place. There are no effects yet, it's crude, and it will simply load the options screen.

It will be improved in time.

http://upload.surgeswarehouse.com/upload/s138.png

Crude script (refer to objects/menus/title_screen.obj):

//
// Open Surge
// Title screen
//
// Script by Alexandre
// Last update: 2013-02-12
//

object ".title_screen"
{
    requires 0.2.0
    detach_from_camera
    always_active

    state "main"
    {
        hide

        // TODO: move these to the main menu
        add_lives -lives()
        add_lives initial_lives()
        add_to_score -score()
        reset_globals

        // creating components
        create_child ".title_screen.message"
        create_child ".title_screen.version"

        // done!
        change_state "idle"
    }

    state "idle"
    {
        on_timeout 1.0 "watch"
    }

    state "watch"
    {
        on_button_pressed "fire1" "done"
        on_button_pressed "fire3" "done"
    }

    state "done"
    {
        push_quest "quests/options.qst"
        //push_quest "quests/default.qst"
    }
}

...

Re: abolished the engine menu

CoOl cool

Re: abolished the engine menu

This will make more menus able to be made. Nice.

Re: abolished the engine menu

so, it's updated. Surge appears with a cool animation, which was drawn by Race some time ago.

needs build 750.

it's kinda hypnotic/fun watching this and hearing jobro's theme song roll

http://upload.surgeswarehouse.com/upload/s140.png

http://upload.surgeswarehouse.com/upload/surge_entrance.png

Re: abolished the engine menu

Alexandre, has no way to use "add_to_score-score ()" to reset the scores. sad

Re: abolished the engine menu

MatheusRRR wrote:

Alexandre, has no way to use "add_to_score-score ()" to reset the scores. sad

what?

Re: abolished the engine menu

Alexandre wrote:

it's kinda hypnotic/fun watching this and hearing jobro's theme song

You certainly peaked my curiosity there. cool

Re: abolished the engine menu

Alexandre wrote:
MatheusRRR wrote:

Alexandre, has no way to use "add_to_score-score ()" to reset the scores. sad

what?

when we use this command to reset the scores, it does not reset or strip points (add_to_score -5 example). sad

Last edited by MatheusRRR (2013-02-14 13:16:56)

Re: abolished the engine menu

MatheusRRR wrote:

when we use this command to reset the scores, it does not reset or strip points

ohh. it's true. there was a (old) logic in the engine that prevented adding negative values to the score. it will be fixed on the next build.

thank you for reporting smile

Re: abolished the engine menu

Definitely a nice approach when it comes to menus.

Re: abolished the engine menu

Ya know I've looked at the title screen a few times, and something never seemed right to me.

Why is Surge on the bottom of the screen? It seems sorta of center to me

Re: abolished the engine menu

You're more used to having it the old fasioned way how  the Sonic title screen looks?

Re: abolished the engine menu

Well It's just it seems off-center.

Re: abolished the engine menu

An easy way to center the logo is to take the width of the logo, and divide it by two. Then take the width of the window, and divide it by two. Then subtract the two values.