mardoch's Forum Posts

  • I didn't find it out yet but remember something about twitter card.

    It's quite simple you just have to had some code on your index.html page. When you call your tweet with your referred game's page (with browser object), it will automatically display an image or video with desc and title.

    Infos there:

    https://developer.twitter.com/en/docs/twitter-for-websites/cards/overview/abouts-cards

    And here is what the code should look like inside your page:

    <meta name="twitter:card" content="summary"/>
    <meta name="twitter:site" content="@yourname"/>
    <meta name="twitter:creator" content="@yourname"/>
    <meta property="twitter:description" content="Your text"/>
    <meta property="twitter:image" content="https://www.your-website.com/your-image.jpg"/>
    

    And finally the page to test your image:

    cards-dev.twitter.com/validator

    Hope it will help you guys, especially if you are as lost as I am XD

  • Ok so I'm starting to get mad with this, can't find a solution/explanation to make it work but (and I'm quite stupid because I lose the file) I already did this perfectly last year.

    How can I share an image or a gif or even a video on twitter and instagram?

    My code is like:

    -> Browser: Go to "https://twitter.com/intent/tweet? &text=This is a my text. http://game-url-here.com &img to URL(http://www.game-url-here.com/my-image.jpg/)" (target self)

    Please help me! I trying to resolve this for hours!! How is it possible to not have a proper working action include in construct?

  • Hello everyone,

    I was wandering if there is a way to make a smooth zoom with the 3D camera.

    I tried something with lerp but doesn't seems to work…

    + System: Zoom = 1

    -> Caméra3D: Move Camera position distance lerp(Self.ForwardZ,Self.ForwardZ,0.3) along Z axis

    + System: Zoom = 0

    -> Caméra3D: Move Camera position distance lerp(Self.ForwardZ,Self.ForwardZ+500,0.3) along Z axis

  • You do not have permission to view this post

  • Here is the solution:

    + System: Pick BG1 where BG1.BBoxBottom ≥ ViewportBottom("LayerBG")

    + BG1: Variable1 = 0

    + BG1: Pick instance with UID BG1.UID

    -> BG1: Set Variable1 to 1

    -> System: Create object BG1 on layer "LayerBG" at (360, BG1.Y-1280), create hierarchy: False

  • For now this is my code:

    + System: Trigger once

    + System: Pick BG1 where BG1.BBoxBottom ≥ LayerParallaxY("LayerBG")-640

    -> System: Create object BG1 on layer "LayerBG" at (360, BG1.Y-1280), create hierarchy: False

    It works for the first background but it stop at the second one…

  • Hello everyone,

    I'm trying to make a simple doodle jump like game and I have a problem about my background.

    I have several different images for it and I want to create a new object with a random image each time my view reach the top of the actual background. So it will scroll to a non identique background each time.

    I join my c3p file here so maybe someone know who to do this…https://drive.google.com/file/d/1nIWwMrhVr7YyDEltI03Nnr_r__By9rqR/view?usp=sharing

    Thanks!

  • Ok I see, it can be useful, thanks.

    But still I don't know to pin the last bone (SnakeBones.IID.5) to the base. That's my main problem actually.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • Yes in fact I usually do it with sprites animation but I choose this way to make it unpredictable and make its movements randomized. The head is the only hit point.

    I'm curious about your container idea, how do you link the head and base?

  • Hello there!

    I'm actually working on an enemy who's kind like the ones in Castlevania SotN:

    https://www.spriters-resource.com/resources/sheet_icons/53/55902.png

    My main problem is to link my enemy to the base object on the ground. Actually all the body parts are pined to each other to make a snake body effect.

    Also the movements are created with the head but it's not very smooth…

    So can check the c3p file I have done for now:

    dropbox.com/s/vakmvlaolh4caol/EnemyTest.c3p

    If anyone has a solution it will be great!

    (Sorry for the enemy design, it's a placeholder actually but I will make a nice one soon)

  • Hello there!

    Maybe some one already did that but can't find an answer on the forum.

    I'm trying to post an image URL on twitter, I suppose it's possible to make it with img to URL but it doesn't work yet.

    Any idea?

  • I get the final answer.

    First change the php code:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval($_GET['page']); // $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    Then get the Ajax request like:

    DOMAIN_SCORES & "getscores.php?page="& CurrentPage

    Of course the CurrentPage should be a variable.

    Now you can load a lot of data without preload everything from your table!

  • I can load all my data but as I only put 29 Text object (3X3 for rank, user and score)

    This is what I got:

    I know that the rest of my data is already loaded with but how am I supposed to display it on the same Text object? like switching to the next 29 elements?

    Any idea someone?

  • Yes, I did put it on 50 just to test it. I have around 40 elements for now.

    But I realize that I was wrong about using array. My first idea was to load the entire datas from mysql in the array and then manage to show them part by part (on load display the firs 29 elements then show the next 29 ones and so on)

    But that's a problem if I load like 1000 elements. It will take hours to get all the elements into my array.

    So the idea is to prepare pages on the requested php. So I make this:

    $count = 9; $page = 0; if(isset($_GET['page'])) { $page = $count * intval(strip_tags(mysqli_real_escape_string($con, $_GET['page']))); }

    With this code I can load the first 9 row from mysql table as page 0.

    Now the idea is to use Ajax to change $page in the php so it can load the 9 next entries.

    And this is where I don't know how to do it.

    If I create a new request, it should looks like

    Ajax: send $page=+1 to URL MY_DOMAIN & "getdatas.php?page="page"

    Probably a confusion here…

  • Whoa, savvito123 your are fantastic my friend! Can't wait to test this! I did some progress on my version but I really can complete it now! Gonna post the result asap!

    Thank you so much!!