FRESH PONG__LUA HELP

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
Angrycrow
Prole
Posts: 29
Joined: Fri Mar 06, 2009 8:16 pm
Location: Los Angeles

FRESH PONG__LUA HELP

Post by Angrycrow »

I'm working on a fresh version of pong. I've been working with love/lua for a couple of months but every once in a while I hit a pretty strong snag.

Anyway. Fresh pong.

I need help managing transitions. The pong game is simple. But I have a 'titleScreen' effect and a fadeTo(nextState) effect. It's supposed to fade to black and change the state variable.

Right now my problem is making the transitions reliable.

I update effects the same way that I change the game state.

Code: Select all

--in main 
function update(dt)
    state:update(dt) -- different menu / game states
    effect:update(dt) -- transitions and effects/text objects
end

--When I want to change the state / effect I do something like:

effect = fadeTo(Menu()) ---<<< is this correct? 

-- Is passing in  Menu() different from just setting :

state = Menu()
I've been trying to fix the transition bug for about a week now. I'm pretty stumped.
This is the current project file:

http://dl.getdropbox.com/u/1710407/ACP_006_101009.love

please help!

- thank you.
I like nonsense, it wakes up the brain cells. Fantasy is a necessary ingredient in living, It's a way of looking at life through the wrong end of a telescope. Which is what I do, And that enables you to laugh at life's realities.
- Dr. Seuss
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 4 guests