Ribis's Forum Posts

  • I had the same problem when I was trying to save data in a server, if I remember, the problem was the method GET...

    your JSON file in your server is without the slashes?

  • well, Actually I find a bug...

    when you create your first instance (object), and for example, set 2 different variables...this will be setting by default (like your suggestion)

    after this, when you are making a new instance, the variable would be the same of the old one... but there is a problem, when you remove all of the instance, (appear "you have deleted the last...") and you try to change the variable to make a new default instance variables, (click right in the object on Projects windows), this will not works, contruct2 will load the old variables of the first instance...

    so, I think this should be fixed, because you can't actually set a new default instance... If it was possible, you don't need any extra options to make it, but a new options is good, so, I suggest to insert in the properties of the object, just a button set as default instance, (same to the first instance)

  • This is my second game design. I'm trying to make an arkanoid game. It still at the beginning with almost nothing in it.

    There's a ball with bullet behavior.

    When I test it via LAN preview, I can see the ball move in breaky move, it doesnt move smoothly.

    I know my phone is capable for playing games smoothly, since I play game apps on it.

    So what happens?

    the first samsung galaxy s is very old device, and construct2 isn't a good software to made game for smartphone...

    I mean, that's not true at all, but the first problem is the exporting of the project... this is the first problem of the html5 in general... You can't make a good game with html5 if you want to run in old device... You can see a lot of game with a 3d graphics and see how smoothly works, and when you try to make a simple game with 2d design just doesn't works well like the 3d game...this because of the html5, exporting, memory management ...etc

    If you plan to make for iphone 5/5s/6, the game can be good and run very good, but there are always some limitation...and this in the first problem at all...

    the best way, if you plan to make a very easy game like arkanoid, I suggest you to use eclipse and programming everything... You should find some tutorial "how to make arkanoid in eclipse, or C++/java/etc..."

  • You do not have permission to view this post

  • Im in terested in "get a friendlist who doesn't use the app" Will you make that possible? Thanks

    yes, is possible to generate an avatar and the token for the invite, I already integrate this

  • Thank you. I look forward to checking the plugin out!

    this plugin made by rexrainbow works perfect:

    https://www.scirra.com/forum/viewtopic.php?f=183&t=110919&p=810981&hilit=XOR#p810981

    Here the plugin, I made a simple example: https://www.umbriadesign.it/decrypt.capx

    I never use this plugin(I will use it), but I think, the best method will be like:

    the user register a new account, in the php file, one function insert a key for that user, so, every user has different key, just look at the example..

    anyway, this is very good to prevent easy hack from the SESSION value or webstorage

  • >

    > I suggest to use AJAX and a database to store the variable, the best savegame system...hard to hack, and you can open the savegame with differente device

    >

    So, do I need to rent server space for this?

    Also, how would saving and retrieving that data look like on an event sheet?

    try to find some database free, I belive exsist some service who give to you a free database... but I'm not sure...

    you need to use AJAX plugin, and of course you have to use php to save/update value in your database...

    in event sheet looks like:

    in the action of the event, select AJAX > Post to URL

    "tag" = make some names for the tag, you can see if the AJAX finish to works, or has some error...

    "URL" = url of the php file, for example, if your "example.php" (if is in the same folder of the game, index.html)

    "Method" = POST.

    "data" = this is the data that you want to send to a php file, so for example, if the player register an account in your game (at the start of the game) you have to send user,mail,password like this:

    "username="&usernameinC2&"&"&"password"&passwordinC2&"&"&"email="&emailinC2

    with this, you will send the 3 variables to a php file... and now, when you have the variable, you can make a script who send the data on the database... and to read these variables in php, insert this:

    $username= $_POST['username'];

    $password= $_POST['password'];

    $email= $_POST['email'];

    now, you have to know some PHP.... for example, to make works this perfect, you have to:

    --make a function (in php) that check if an email or user exsist before the registration (and in the database select email/user unique)

    if exsist, echo an error like "user already registered", so, when the AJAX retrieve data in construct2, you can menage the situation.

    --make sure the send data in a database (like mysqli_real_escape_string)

    --when the php file register the user, if the user start with some coins or something else, just insert data in the database...etc

    --in the LOGIN.php, check if the password insert is correct with the e-mail/username, if isn't correct, just retrieve a data as before for the registration.

    if everything is working, load the data from the database from that user...

    now, if you don't know how made it, you can find some tutorial/a full example how to make a php registration/login... contruct2 just send and retrieve data...

    when you are sending data with the "Post to URL ", you can see what you retrive in the condition:

    AJAX > On completed , and now, you can set a text with the AJAX.lastData, and see, if the php works well.

    if you have more question just tell me

  • I just started making a Legend of Zelda clone. Here's the event sheet:

    The Zelda sprite is placeholder, ripped from a rom hack.

    I'm having trouble with object collision. When I walk into a wall, I start sliding sideways along it instead of just stopping. Is there a way I can make myself just stop when I hit a wall?

    h t t p s : //vine.co/v/OVF9PK7FHI0

    very easy to fix, I suggest you to read the manual and start to read some post from this forum:

    anyway, I suggest you to post a capx and use different events logic, same for hyenaman

  • I almost finish my app for facebook... why this post? well, I was trying different plugin of facebook (some works, some doesn't works...)

    So, I made my script to get perfect works my app with facebook with AJAX plugin... and sometime I see some people need help to integrate their app with facebook...

    When I publiush the app, I can start to make a manual with a project to learn how to integrate your game with the last PHP SDK of facebook.

    how works? when you have the files in php, you need to change just the ID and secret code of your app, after that, the script will work perfect just with a standard plugin AJAX of C2, so, you don't need a new plugin, and that system will works for different device...

    for now, I achieved this:

    LOGIN:

    1 - get the first pop up with a specific permission (aboutme, user friends, score....) etc, when you agree, at the second login, you don't need to login again (as the plugin) but the game already load everything without any extra login.

    GET:

    1 - your user info (name, ID, token...etc).

    2 - your score of that app.

    3 - array of the user use the same app (array for c2 ready to use)

    4 - hi-score of the app (you, and your friends, again, the php generate a correct c2array with: score, id, username, url of avatar), so, very easy to load into the game.

    5 - your unlocked achievement (get in correct array for c2, ready to load).

    POST:

    1- post your score (if the new score of the game is > of the old score, this is checked by a new request in php file).

    2 - unlock a new achievement.

    3 - post in the timeline of the user.

    for now, this is what I made, and everything works fine, in the near future, I will made:

    1- get a friendlist who doesn't use the app ( get url of avatar, name, and the token to send some request)

    2 - send request to a friend, or multiple friends.

    3 - send request like "life,coin...etc" and when the user who has the request accept it, when the game is loaded, add the amount/string in the game.

    who is interested to this?

  • the first string, you have to change in Webstorage.Localvalue("amount")

    you never make a C local value.... this is why you get NaN

    anyway, I will repeat everytime, that kind of savegame is not sure, is very easy to hack if you don't make encrypt or some secure string, and can be deleted by cleare the cache of the browser....

    I suggest to use AJAX and a database to store the variable, the best savegame system...hard to hack, and you can open the savegame with differente device

  • TiAm - agreed - that would be awesome! Thanks for the info everyone. Ribis - how would you go about encrypting the values?

    There are two plugin for that... you select a key, and from this, you can encrypt the value when you will save a string...when construct2 will try to open the new string, the plugin convert the string in a correct value (with a correct key),

    this is an example, I try to find the plugin, when I get home I will link the plugin

    anyway, you can try to save the data in different way, I mean, if you need to store some coins, like 50, you can save like this:

    "23y9812yu3982u" this is to get confused, just random string "50" real value "u23u2undu" a new random string"25" check if they hack the coin "u3342uy2382938" random string

    without encrypt, you can make your own secure script... can be difficult, but can get harder to hack a single value...

    50 is the real coin, construct count just the 50, if they hack it, a function check if a coin/2 is = to 25 o close to it... so, they need to hack 2 value, but the original string will be:

    23y9812yu3982u50u23u2undu25u3342uy2382938

    construct2 will count the "u" tokenat, you now where the 50 and 25 are, for example

    and if you store like 5 variable, you will get a long string... and you can mix it... but there is a plugin to encrypt, so, this is just for fun

  • If someone cleans their cookies will it delete saved data? And how easy are they to hack?

    the last time I tried, if you clean all of the cache of your browser, the savegame will be deleted...

    about the hack, I belive you can encrypt the value....

  • Hi for all!

    The question is about:

    I have a personal wiki-site. I have an application stored on that site. This app supplies 2 different languages (also like a site).

    How can I run my application with parameter (or any another way) that will have an information about page language? If I will run app from english page, it must be in english, if I'll run it from russian page, it must be in russian.

    For now I can make it just with WebStorage. But it saves data user must to input by himself when he will start this app for the first time (if an english-speaking user will run it first time he'll see default-russian text first, then he have to switch into english mode, just after that language option will be saved for the next time).

    I want user to avoid switching. If he will start app from english page - he must take an english version of program.

    How to make this? How to run application with some language parameter?

    You can do it with php... how the language is detected? just add one variable $language=

    I suggest you to use php, when you have your variable in php, just set:

    $_SESSION['language'] = $languageinwebsite;

    after this, just make a new page php who call the echo of the "echo $_SESSION['language'];"

    in construct2, make a call AJAX of the page where you put the echo SESSION

  • Ribis

    rojo 's canvas plugin + rex_canvas_ext behavior (Load image from URL)

    thank you, I will try it

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The only way I found to do this was to use TiledBackground objects instead of Sprites, and resize the TiledBackground to the size of the loaded image.

    thanks for the reply, I solved this with a lot of frame... one sprite, with 200 frame (so, they are the same...so, doesn't change the memory of the sprite)

    with this is ok, because I can set a limit for the score of the player... 200 it's enough

    and the frame it's = to the IID of the obj