I'm seeking plugin developer to teach me.

Looking to build a team or have a job to offer?

Post » Thu Dec 26, 2013 5:33 pm

Hi @PixelRebirth if you could help me, I'm glad.

The file depencency is already included, screenshof of preview with chrome dev tools



If you notice there an error, I'm pretty sure C2 engine conflicts with that. Compared to example file without C2 engine, it didn't show any error.

B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Fri Dec 27, 2013 10:26 am

Hey Joannesalfa,

would you mind sharing your plugin with me so I can have a closer look?
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Fri Dec 27, 2013 5:01 pm

@PixelRebirth

Pm'd
B
99
S
35
G
29
Posts: 3,139
Reputation: 28,421

Post » Thu Jan 02, 2014 1:27 pm

Please share it with me as well. Let's get this plugin out there.
B
73
S
12
G
7
Posts: 388
Reputation: 9,180

Post » Thu Jan 02, 2014 3:07 pm

I tried to do it myself trying to copy the way the Yepi plugin was made.
But I have a problem because the FGL API has a big function that contains other functions like:

     window.fgl = new function(){
    var self = this;

    ......
    
    /**
     * Initialises the API. Pass in the element which contains your game, and your game ID
     * obtained from FGL.com
     */
    self.create = function(gameElement, gameId) {
        .......
            }
        }
        self.gameId = gameId;
        self.container = gameElement;
    };
}

I need to access the create function from runtime.js
If the function create was not inside the window.fgl function I would call it directly with "create".

But now?

I also tried to remove the whole window.fgl function but now only the first create function is called, and obviously I need all the functions.

I think I need some help.
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
34
S
8
G
4
Posts: 156
Reputation: 3,779

Post » Thu Jan 02, 2014 3:49 pm

I started looking into the plugin today. I don't think you can include the create function in the plugin itself, because according to the documentation that stuff is supposed to happen before the actual game is being started.

This requires manipulation of the index.html file. I did something similar when I adjusted a game for the softgames API, which also required to initialize before the actual game is started.

Will get further into this now and tell you guys more in the next few days. I think it should work out fine.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Thu Jan 02, 2014 4:01 pm

I hope you can figure it out how to do it.

EDIT: I think I made it:
ht*ps://w*w.scirra.com/tutorials/790/implement-fgl-html-5-api-in-construct-2paala2014-01-02 21:14:40
[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
34
S
8
G
4
Posts: 156
Reputation: 3,779

Post » Thu Jan 02, 2014 11:12 pm

[QUOTE=paala] I hope you can figure it out how to do it.

EDIT: I think I made it:
ht*ps://w*w.scirra.com/tutorials/790/implement-fgl-html-5-api-in-construct-2[/QUOTE]

That looks good!

I'm just not sure you took care of the fgl.OnReady function. The game should only be started via the callback there. FGL might reject the game if that part doesn't work like described in the documentation.

So just add that to what you already have in the index.html and you should be good.
B
23
S
6
G
10
Posts: 1,041
Reputation: 7,553

Post » Thu Jan 02, 2014 11:45 pm

I'm glad you guys are working hard at this, it will definitely help the community, keep at it!


Just out of curiosity have you guys had any luck getting your games accepted into fgl using @paala example?

retrodude2014-01-02 23:46:54
B
18
S
4
G
3
Posts: 436
Reputation: 4,801

Post » Fri Jan 03, 2014 6:42 am

@PixelRebirth I don't know how to make the game start.
In the example provided, in index.html:

fgl.onReady(function(){
            new FGLNinja(element).boot();
}

Now in construct 2 I didn't found an equivalent of boot function to start the whole game.


[size=200]1. Best Construct 2 course :HERE.10$!

2. 155 games source codes for sale on scrira store 12,86$each. PM me if interested to speed up the uploading process.
[/size
B
34
S
8
G
4
Posts: 156
Reputation: 3,779

PreviousNext

Return to Job Offers and Team Requests

Who is online

Users browsing this forum: No registered users and 4 guests