Portalized (GUI update)

A place to show off your latest screenshots and for people to comment on them. Only start a new thread here if you have some nice images to show off!
Post Reply
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Portalized (light transfer, working towards summer release)

Post by nullsquared »

Praetor wrote:The real question I wanted to know was what happened once one was detected? A game over screen, or maybe a simulated tear in space-time (which is the ultimate portal I suppose)?
Well, since the game knows the history of all the objects, if a paradox is detected, time can reverse until the player is back to when he entered the time portal, and he can be told to avoid the paradox.
User avatar
Praetor
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 3335
Joined: Tue Jun 21, 2005 8:26 pm
Location: Rochester, New York, US
x 3
Contact:

Re: Portalized (light transfer, working towards summer release)

Post by Praetor »

Oh that's a good idea. Reminds of Sands of Time, back up try again.
Game Development, Engine Development, Porting
http://www.darkwindmedia.com
User avatar
mkultra333
Gold Sponsor
Gold Sponsor
Posts: 1894
Joined: Sun Mar 08, 2009 5:25 am
x 114

Re: Portalized (light transfer, working towards summer release)

Post by mkultra333 »

After you lay down the second time history, you could have the option of going back and changing the first one, overwriting it and having to avoid paradoxes with the second history. Allow the player to add as many time histories as he wants, plus re-write already existing histories. I don't know, might work, might not.

Be an interesting two player game, where they are competing at completing some goal and take turns adding new histories, always having to avoid paradoxes.
"In theory there is no difference between practice and theory. In practice, there is." - Psychology Textbook.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Portalized (GUI update)

Post by nullsquared »

See OP for an update involving me blabbing about the GUI in Portalized :D (another GUI wheel has been reinvented)
User avatar
subquantum
Goblin
Posts: 270
Joined: Tue Oct 02, 2007 10:23 pm
Location: Rochester, NY
Contact:

Re: Portalized (GUI update)

Post by subquantum »

That's really sweet, especially how you've got it working through Lua. If I've guessed right how you're doing it, that's a really elegant system. :) Does lua handle the drawing at a low level too, or does that call to Update on the gui sheet change some state in C++? It looks like you do a -lot- in scripts.
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Portalized (GUI update)

Post by nullsquared »

Actually, the widget system has a very generic "update" method that takes a parameter name and a boost::any argument. It's not exactly the safest thing around, but if you try to pass an invalid or incorrect parameter it'll just log an error. Anyways, this maps out to Lua very nicely - you simply pass a Lua table to a proxy update() function, which then iterates over the table and calls update(key, value) :mrgreen:

Come to think of it, the GUI doesn't really know anything about Lua. To bind a Lua function as a callback to a GUI event, I just use a proxy function and boost::bind, like so:

Code: Select all

void proxyWidgetCallback(const gui::event &e, luabind::object luaCall)
{
    luaCall(e.caller, e.misc);
}

void proxyUpdate(...)
{
    for (...)
    {
        if (type(value) == LUA_TFUNCTION)
            widget.callback(key, boost::bind(&proxyWidgetCallback, _1, value));
    }
}
And that lets you do stuff like:

Code: Select all

someButton:update({
    onClick = function(this, misc)
        log("clicked on button " .. this:name())
    end
})
User avatar
jacmoe
OGRE Retired Moderator
OGRE Retired Moderator
Posts: 20570
Joined: Thu Jan 22, 2004 10:13 am
Location: Denmark
x 179
Contact:

Re: Portalized (GUI update)

Post by jacmoe »

Wow, Nullsquared - you're blowing me away! :D
When I see you in action, I come to think of a young Carmack. :)
/* Less noise. More signal. */
Ogitor Scenebuilder - powered by Ogre, presented by Qt, fueled by Passion.
OgreAddons - the Ogre code suppository.
User avatar
KungFooMasta
OGRE Contributor
OGRE Contributor
Posts: 2087
Joined: Thu Mar 03, 2005 7:11 am
Location: WA, USA
x 16
Contact:

Re: Portalized (GUI update)

Post by KungFooMasta »

Don't worry about offending people. Writing your own solution allows you to easily make additions and changes whenever you need it, instead of digging around and making another solution work for specific scenarios you want to support.

IMO, what your GUI is really missing are transition effects. For example you should give some visual feedback when you hover over widgets, something simple like the button enter/down/leave events should show different graphics to feel more interactive.
Creator of QuickGUI!
User avatar
nullsquared
Old One
Posts: 3245
Joined: Tue Apr 24, 2007 8:23 pm
Location: NY, NY, USA
x 11

Re: Portalized (GUI update)

Post by nullsquared »

KungFooMasta wrote: IMO, what your GUI is really missing are transition effects. For example you should give some visual feedback when you hover over widgets, something simple like the button enter/down/leave events should show different graphics to feel more interactive.
Like I said, it's barely done yet ;)
Post Reply