Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - ceosol

Pages: 1 2 3 ... 144
1
Ask a Question / Re: Facebook instant games?
« on: Yesterday at 06:56:39 pm »
I read something saying that you can take out the "width=device-width" from the meta content at the top. With that removed, it still rescaled perfectly fine on my iPad. It worked on FB Messenger on an android tablet, as well. I tried to get messenger on my phone but it said the Rest API is deprecated.

2
Ask a Question / Re: Facebook instant games?
« on: October 21, 2018, 10:52:16 am »
I do not have an iPhone to test on. I could probably borrow a device to check android.

3
Ask a Question / Re: Facebook instant games?
« on: October 19, 2018, 09:05:38 pm »
Here's a screenshot from my iPad with the game working on FBinstant.

I blurred out the conversation, but you can see that I was chatting with someone in messenger and the game comes up on top.

4
Ask a Question / Re: Facebook instant games?
« on: October 19, 2018, 09:02:33 pm »
Most of this is in the original html5 index.html. The main things are the script for connect.facebook and the initialization of FBinstant. You can just copy this and replace your index.html with it. Of course, change "yourgamename". This works on my iPad. I've tried to connect on my Window's phone, but I cannot find how to open instant games on it :D

Code: [Select]
<!DOCTYPE html>
<html lang="en">
    <head>
       
        <meta charset="utf-8">
           
            <title>yourgamename</title>
           
            <meta id="viewport" name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
            <meta name="apple-mobile-web-app-capable" content="yes">
               
               
                <link rel="shortcut icon" type="image/png" href="./favicon.png">
                   
                   
                    <script type="text/javascript" src="./lib/howler.min.js"></script>
                    <script type="text/javascript" src="./lib/pako.min.js"></script>
                    <script type="text/javascript" src="./lib/FileSaver.min.js"></script>
                    <script type="text/javascript" src="./Flicker.js"></script>
                    <script src="https://connect.facebook.net/en_US/fbinstant.6.0.js"></script>
                   
                    <script>
                        FBInstant.initializeAsync().then(function() {
                                                         FBInstant.setLoadingProgress(100);
                                                         setTimeout(function() {
                                                                    var canvases = document.getElementsByTagName("CANVAS");
                                                                    var canvas = canvases[0];
                                                                    canvas.style.width = "100%";
                                                                    canvas.style.height = "100%";
                                                                    console.log("Found canvas: " + canvas);
                                                                    }, 3000);
                                                         FBInstant.startGameAsync().then(function() {
                                                                                         window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false });
                                                                                         if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
                                                                                         var meta = document.getElementById ("viewport");
                                                                                         meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
                                                                                         }
                                                                                         })
                                                         })
                                                         
                        </script>
                   
                    <script>
                        window.addEventListener ("touchmove", function (event) { event.preventDefault (); }, { capture: false, passive: false });
                        if (typeof window.devicePixelRatio != 'undefined' && window.devicePixelRatio > 2) {
                            var meta = document.getElementById ("viewport");
                            meta.setAttribute ('content', 'width=device-width, initial-scale=' + (2 / window.devicePixelRatio) + ', user-scalable=no');
                        }
                    </script>
                   
                    <style>
                        html,body { margin: 0; padding: 0; width: 100%; height: 100%; overflow: hidden; }
                        #openfl-content { background: #000000; width: 100%; height: 100%; }
                        div#openfl-content { width: 100%; height: 100%; }
                       
                        </style>
                   
    </head>
    <body>
       
        <noscript>This webpage makes extensive use of JavaScript. Please enable JavaScript in your web browser to view this page.</noscript>
       
        <div id="openfl-content"></div>
       
        <script type="text/javascript">
            lime.embed ("Flicker", "openfl-content", 640, 960, { parameters: {} });
            </script>
       
    </body>
</html>

5
Ask a Question / Re: Facebook instant games?
« on: October 17, 2018, 07:22:43 pm »
Nice! What scaling mode did you use?

That's the part I'm trying to figure out hahaha :)

6
Ask a Question / Re: Facebook instant games?
« on: October 16, 2018, 07:38:01 pm »
I tested it out, the stencyl-made games do work with FB Instant Games. They just need some minor tweaking to be optimized for phones. I have Guri's FB extension enabled, but not of the blocks used. I'll start working on that side of it.

I am creating a list of some edits you have to add into the index.html file. I'll post those when I'm done :)

7
Chit-Chat / Re: Any Tutorial on making Quiz games?
« on: October 15, 2018, 01:32:38 pm »
If you wanted to clone that game, it would be a fairly big endeavor. The difficult part would be making it multiplayer. The quiz game itself is not hard. It involves making a bunch of list attributes and just keeping strict controls on when things in the lists appear on the screen. I could create a template for you in about 5-10 minutes.

To answer the original question, I do not know of any tutorials for that style of game.

8
Ask a Question / Re: Cannot test game, throws error on Flash and MacOS
« on: October 14, 2018, 05:51:34 pm »
Try moving the application out of the folder and back in.

9
Ask a Question / Re: Cannot test game, throws error on Flash and MacOS
« on: October 14, 2018, 01:07:35 am »
Right click on it to open for the first time.

10
Ask a Question / Re: Setting collisions with the image API
« on: October 13, 2018, 09:33:28 am »
Yeah, it is neat. The absolute value and negate definitely work. You could also multiple the current speed by -1 to make it go in the opposite direction.

11
Ask a Question / Re: Cannot test game, throws error on Flash and MacOS
« on: October 12, 2018, 11:13:18 am »
This eventually works itself out by playing with different stencyl versions. If you get that newgrounds.swf corruption error, try using an older and newer stencyl version. With my games, going older/newer and cleaning project allows them to run again. Make sure you create a backup copy.

12
Ask a Question / Re: Progressive Background Effects
« on: October 12, 2018, 11:08:50 am »
I did it - not with a crossfade - by having a screen transition actor. Basically, the player reached a point in the game/level, the transition actor spawned, when the transition actor filled the screen the background changed to the new background. Four different levels and four different backgrounds were all in one scene. The player never leaves the scene unless they die and go to the game over screen.

13
Ask a Question / Re: Setting collisions with the image API
« on: October 11, 2018, 02:01:36 pm »
Collisions with the image API are pretty simple. Just say:

if (get pixel x: y: of image)  = 16711680
    set velocity to 0
    set onground to true

16711680 is red. You would have have to figure out whatever color value you want to count as the colliding part. The x and y in the image is wherever your character is that you want colliding.

14
Ask a Question / Re: Post data to URL block question
« on: October 04, 2018, 08:01:12 pm »
The website, but you can use "visitURL" block with the website in there. It doesn't necessarily need POST.

15
Ask a Question / Re: Facebook instant games?
« on: October 03, 2018, 12:22:14 pm »
From what I read, Haxe-flixel and openFL are both accepted API for FB.

Pages: 1 2 3 ... 144