Pokki and site problem

Discussion and feedback on Construct 2

Post » Sat Feb 18, 2012 1:47 am

Has anyone got minimize to work? I can get their little "button" on there (not the actual image since that doesn't show up), but when it mimimizes the game is still playing on the background. I believe that as soon as we get this working, it should be ready to submit.

EDIT : nevermind, figured out the minimized button thing. was looking at the wrong CSS file the whole time (duh). Still can't figure how to stop the game from running while its minimized though.Cryptwalker2012-02-18 03:53:53
B
37
S
9
G
5
Posts: 147
Reputation: 5,615

Post » Mon Feb 20, 2012 10:03 am

[QUOTE=Cryptwalker] Has anyone got minimize to work? I can get their little "button" on there (not the actual image since that doesn't show up), but when it mimimizes the game is still playing on the background. I believe that as soon as we get this working, it should be ready to submit.

EDIT : nevermind, figured out the minimized button thing. was looking at the wrong CSS file the whole time (duh). Still can't figure how to stop the game from running while its minimized though.[/QUOTE]

[quote=fathahnoor]Is there any info on how to add Pokki minimize button?[/quote]


Updated the tutorial with a minimized button tutorial and an example file.

I am also stuck on how to freeze my program when it is minimized. Try the Pokki Atom Example and try add some code from the app.js and popup.js into c2runtime.js but have no luck here.

If any one finds out how, let me now so I can added it to the tutorial.
B
23
S
5
G
4
Posts: 38
Reputation: 4,641

Post » Mon Feb 20, 2012 10:17 am

I pass "popup_hidden", "popup_shown" event into event sheet by custom plugin.
In event sheet, using "popup_hidden" as condition to set "pause", and "popup_shown" for "resume".

However, it's not really stop running, just "pause" it.rexrainbow2012-02-20 10:22:51
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Mon Feb 20, 2012 5:07 pm

That maybe what we need for it though, just to pause it during minified. Would you mind sharing that SDK rexrainbow?
B
37
S
9
G
5
Posts: 147
Reputation: 5,615

Post » Mon Feb 20, 2012 11:02 pm

I would be intrested having it too :)
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Feb 21, 2012 12:32 am

A lazy wrapper from C2 to Pokki

Here is a lazy wrapper to put C2 exported files into Pokki.
Usage: just copy all c2 exported files into folder.

Before copy:


After copy:



To change window size, edit width and height in popup.html in folder.
[code]<canvas id="c2canvas" width="640" height="480" oncontextmenu="return false;" onselectstart="return false;"> [/code]

BTW, the default folder is a "hello world" made by C2, you can add it to Pokki for testing.


Pokki plugin is a small plugin, simply pass 'popup_hidden', 'popup_shown' event from Pokki to C2 event sheet.
You might need to have "lazy wrapper" environment to use pokki plugin since it need "Pokki" object in javascript runtime.rexrainbow2012-02-21 00:58:52
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

Post » Tue Feb 21, 2012 12:40 am

This is great rexrainbow. Thank you.
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Feb 21, 2012 1:03 am

Thanks rex, works great during the popup hidden but doesn't seem to activate when popup_shown? Does it work this way for anyone else?
B
37
S
9
G
5
Posts: 147
Reputation: 5,615

Post » Tue Feb 21, 2012 1:27 am

The hidden function is working perfectly for me. So now I need to fix the minimize button.
nemo2012-02-21 02:30:09
B
40
S
5
G
5
Posts: 405
Reputation: 5,657

Post » Tue Feb 21, 2012 4:20 am

@Cryptwalker

For making "pause", "popup_shown" is designed to trigger after "popup_hidden". Since you should do "pause" at "popup_hidden", then "resume" at "popup_shown" after "pause".
B
97
S
22
G
178
Posts: 4,120
Reputation: 104,047

PreviousNext

Return to Construct 2 General

Who is online

Users browsing this forum: bilgekaan, Gianmichele, WhosWho and 5 guests