Voytek's Forum Posts

  • Thanks for giving me instructions to experiment with. Congratulations on your gaming success! Your game looks pleasantly sophisticated. Keep up the good work for more to come!

  • I would like to have in Construct 2 something that looks like this in javascript:

    var testArray = [["John","Megan","Luke"],["diamond","chess"], ["so", "then", "how"]];

    Then i would like to be able to access the indexed values.

    How do i do that? I tried creating an array and then passing another array as its value but it does not work.

    Eventually i would like the solution to be compatible with JSON and local storage.

  • Thank you for fabulous answers, I really appreciate your expertise assistance.

    A few questions have been asked. Well, I suppose that majority are to let me think more about what I do, there is also one that appears it should be answered on my part:

    [quote:2slt9lcp]Why apply those actions on Sine for EACH object for EACH tick ?

    [quote:2slt9lcp]Why apply those actions on Sine for EACH object

    I actually want to have two sprites with the same random behaviour,

    one a friend and one a folly, the only way to distinguish them

    is not by their behaviour, which changes, but by the way they look. Futhermore, sine

    is supposed to add some action to the game as well as serve as a confusing element

    for the player.

    [quote:2slt9lcp]for EACH tick

    I want my sprites to travel from top to bottom with these behaviours, I suppose the way to do it is in the capx.

    There is one comment/question that I am uncertain whether I get it right. You may clarify if it is of any importance:

    [quote:2slt9lcp]Why try to include that 1 sprite created in the layout and all the weird tricks that go with it ? Just destroy it.

  • Thanks for the reply, I have been messing around with picking by UID trying to pass that into the function as a parameter but I could not achieve a desired effect. I probably do not understand how that UID works, what is the best source of reference to learn that? I have browsed through a couple of tutorials. Have not found them useful, should you know of the most relevant one, let me know!

  • Hi,

    I want to have one sprite that I generate at random location, and then I want that sprite to have a random sine behavior assigned, either a horizontal or a vertical in a random order, and I want that behavior to be consistent throughout the sprite’s journey down the screen.

    What I have achieved is not a consistent behaviour. It changes throughout the sprite’s journey.

    Please correct my capx!

    dropbox.com/s/dgyd9feysmve9jv/randomSine.capx?dl=0

  • Got a private message but I have little points to reply to private messages. There has been no other information on a way to reach the user so in an effort to reply, I decided to make it public, so that the message gets to the interested party in this manner.

    The message:

    from: scirra.com/users/nlon

    "Hello

    i saw your post: viewtopic.php?f=147&t=183049&p=1074506&hilit=embed+game+wordpress#p1074506

    i am interested in the same plugin, but i dont know if it works well with Construct 2 games or not

    can you tell me what happened with your project?"

    The reply:

    I have sent numerous messages to the author’s plugin and I have not received a decisive answer, all the replies were spare. It appeared to me they did not know anything about Construct 2 games and I was the one to introduce them to Construct 2. In my opinion the plugin has not been created with a view to being used with Construct 2 games. They can be embedded but I am not sure how the full screen feature should work for instance, the way it seems to work (or not), does not make sense to me.

    Maybe they have done something with the plugin after I have sent them messages, up until now I have not researched what might have happened in the aftermath. Please note I did my testing on a free and pretty old version of the plugin I found on github. It appeared to me that they have intentionally withdrew all free versions of the plugin hoping to sell more copies except the one I managed to stumble upon github.

    As far I remember the author charges meticulously for every little thing like: the plugin itself and then they also charge for setting it up to your liking. Maybe it could be done if you decide to pay for it.

    However insane it may seem, I have set out to create my own website to host the games the way I would like it to be. Unfortunately, I have been stuck with the concept of an expandable iframe to “copy” youtube videos functionality when you hit full screen on the video. I have no idea how to programme it, while keeping everything responsive, or where to seek such information.

    There is an “automated way” to embed videos in html/css by typing specific html, and as a result, the expandable box is somehow generated automatically by a browser, there seems to be no way to control the expandable functionality to adapt it to C2 games, it gets created behind the scenes by default by the browser. It just works with video and does not lend itself to anything else.

    This is my conclusion, but I might be missing something. Note that I am pretty much an amateurish and self-thought web designer as well as programmer. However, I have done my best to research the idea thoroughly. I am pretty much stuck here. If you ever have any ideas to push me forward, let me know.

  • Thank you for giving me a direction!

  • Could someone show how to submit scores to a URL?

  • Dear Senior Construct 2 Programmers,

    For the last week I have been trying to set up a wordpress based site with a few simple C2 games.

    I have found out that most wordpress themes seem to cooperate with MyArcadePlugin, which has really cool features. The plugin allows to upload games wrapped around iframes or add it through server URL. The whole infrastructure is out there to be used and managed.

    There are even features like “display scores from published ganes”, “leaderboards”, some other stuff related to gathering game data, contests creators etc.

    The only problem is that a C2 game has to be able to submit scores for example via GamerSafeData Bridge, which appears to be only for flash games and seems utterly incompatible with C2. However there are two other ways of submitting scores via PHPBB or IBPArcade Scores, which are also supported by MyArcade Plugin. I don’t know much about any of these. However PHPBB seems to be all in PHP and for all I know PHP can be compatible with C2, which sounds quite promising.

    The reason I am writing this is to ask for the feedback on your experience. Has anyone tried these paths to submit scores via either PHPBB or IBPArcade to MyArcade Plugin and finally to wordpress theme ? What are your thoughts? Is it doable? have you got any suggestions, reflections on the subject matter? Any directions to point? Could you share working examples with C2 games implemented with the above mentioned technologies on condition that you may have any?

    DO enlighten me please : )

    Any contribution greately appreciated!

  • any suggestions, anything to give me a little push?

  • Dear Full Stack C2 Developer,

    here is the developer guide:

    myarcadeplugin.com/documentation/developer-guide/

    Could you please provide a functional example of how to make C2 Games use features of MyArcadePlugin's game data management to have leaderboards, high scores etc. displayed on a website with data from C2 project?

    I bet it is not that much of a hussle for someone who knows a bit of PhP. I personally know only strong basics of front end stuff.

    Step by step guides / suggestions are greately appreciated. I could do it by myself if i had an outlined and clear cut path to follow/accomplish. I am willing to learn everything that is relevant to accomplish this goal.

    My intention behind all this is to have my own, independent wordpress site with a few simple games integrated with all the amazing features of MyArcadePlugin.

    Please help me go on my dream!

  • Thanks for your suggestion.

    My intention was to give it a file reference path so that the computer knows that game file are on the same machine. I thought it should work. Maybe i am writing the file reference path in the wrong way. I guess it should be fine.

    BTW: i am on xampp and there are no issues with permissions.

    I finally got it working both ways i.e. with "embed code" and "url". As far as the latter is concerned it did work only in the way suggested by you. Therefore, thank you again.

    Apart from the above issue, I also face another one

    The embed code or the plain url do not seem to cooperate with a full screen feature available on wordpress theme. What i mean is the type of feature that youtube video has. It expands full screen and shrinks back to smaller box. My games can be either or. Either box type and they don't extend full screen, they just stay the same or they are already in a full screen (840 x 480px) mode and in both cases the only thing that happens is that the background disappears on full screen pressed.

    Should the embed / url codes be adjusted in some way to take advantage of the full screen feature?

  • Hello,

    I have managed to find myarcade plugin lite and i have got it working with a wordpress game portal theme. Problem is that i fail to get the game appear in the theme's window.

    I have tried to use myarcade plugin: import game>embed code

    or

    import game>iframe url

    Then i tried in passing:

    'http://localhost/wordpress/wp-content/uploads/games/embed/G/index.html'

    "G" folder is where my C2 export file is.

    I cannot make it work.

    Do i need to create some special url? Like a url feed or something? If so how can i do that?

  • I am also open to other solutions, I just would like to learn how to gather player stats so that i could display it on my page in general statistics as well as include some crucial info in player profiles.

    Please give guidance / help out!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Dear Construct 2 PRO,

    Could you please share a working way of integrating Construct 2 project with wordpress’ myarcade plugin’s GamerSafe Data Bridge? The said GamerSafe Data Bridge gathers information about scores and it sends the data to be displayed in a website general statistics of games. I find this feature very useful but i do not know how to implement it with Construct 2 project.

    Here is the general info on how to use the GameSafe Data Bridge that I have found:

    How to use the Data Bridge: The GamerSafe Data Bridge feature allows sites that host GamerSafe games to collect useful information about player activities, such as scores and achievements. This feature is very new, so if you have any questions or problems, please email us and let us know. Setup is very simple, just add a javascript function on the host page: <script language="JavaScript" type="text/javascript"> <!-- function setupGamerSafeBridge() { var bridgeConfig = { user: "myUserID", session: "mySessionID", game: "myGameID", salt: "kosher", url: "scripts/GamerSafe/gs_bridge.php", callback: "onBridgeMessage" }; return bridgeConfig; } function onBridgeMessage(message) { console.log("GS Bridge Message: ", message); switch(message.message) { case "achievement_awarded": //do something fun break; case "scoreboard_entry": //record it break; } } // --> Once GamerSafe is loaded, it calls the setupGamerSafeBridge() Javascript function through the Flash ExternalInterface. The host can write server code to generate the user, session, and game IDs, but they are optional if you'd rather not. Right now the salt is just used to do some simple verfication. The system could be made more secure with a bit more work, but that hasn't been a priority for anyone yet. The most important parts of the bridgeConfig are the URL and callback. Use bridgeURL if you want to send a POST request to your server directly from the game SWF. If you use the callback, it will call the javascript function specified. Now, when a player sets a high score or gains an achievement in the game, it will send a request to that URL with a description of the action. The data comes in via HTTP POST. I've written a sample bridge receiver PHP script here. All types of bridge messages receive the following parameters: userID from setupGamerSafeBridge() sessionID from setupGamerSafeBridge() gameID from setupGamerSafeBridge() username sent if the user is logged in to gamersafe message the type of message being sent - see below params a comma-separated list of parameter names specific to the message type hash a security signature for the message Message Types Currently, only a few different messages are sent over the bridge. Adding more is very easy, so just email us and let us know what you'd like. scoreboard_entry: sent whenever a player records a new score. score the value to be recorded scoreboard_id games can have multiple scoreboards, and this is to differentiate them extra a string that can be passed in with a score, specified by the game or the user unregistered_user in the case of a user without a GamerSafe account, this field will contain a user-supplied name display_ascending in some cases, lower is better. you should sort the scores upward. display_time true when the score represents a time, in microseconds achievement_info: letting you know that an achievement exists. you can ignore it if you like. achievement_awarded: sent when a player attains a new achievement. ach_id a numeric ID for the achievement title the name of the achievement description a longer description of the achievement point_value the value, in GamerPoints of the achievement icon_url the URL of an icon used to represent the achievement login: the user has just logged in to gamersafe. Attach this info to your own accounts if you like. gs_account_id a numeric ID for this user. username the user's GamerSafe username. logout: the user has just logged out of GamerSafe. Only really useful if you want to use GS as your portal's account system. Signatures Signatures are sent along with messages from the library in case you'd like to make it more difficult for clever players to submit fake messages to the bridge receiver. You can calculate a correct signature like so: SHA1(salt + userID + sessionID + message

    [+ extra params by alpha order])

    Source: gamersafe.com/developer/data_bridge.php

    Please remember to add:

    Thus, could a senior Construct 2 programmer demonstrate how to make it all work? Should I clarify anything, DO let me know. I am fidgeting to read your reply!