AnD4D's Forum Posts

  • Have you tried setting the "Content-Type" header to "application/json" before making the request?

    If you are not doing that, then it must be trying to send as plain text, and then you need to escape certain special characters. But I am just vaguely recalling all of this, so it might not be accurate.

    It seems to have a problem submitting commas. It posts the word just after the comma, then stops. I'll try the ecryption approach. Kinda makes sense for stored data to be encrypted anyway. Hopefully Construct gets an official plugin soon.

    have you tried "urlencode" before sending the text? you will then need to urldecode in php on the other end.

    I have not. I will do that if the encryption plugin fails :D

  • No, but I will try that asap and then get back to you!

  • Hey DiegoM

    As an example, it's basically a series of JSON codes embedded into a single JSON.

    {"c2dictionary":true,"data":{"MiniWidth":480,"MiniHeight":280,"MiniX":1440,"MiniY":800,"ModData":"{\"c2dictionary\":true,\"data\":{\"and4d\":0,\"challacc\":0}}","GiveawayData":"{\"c2dictionary\":true,\"data\":{\"MaxEntries\":100,\"Word\":\"! \"}}","CounterData":"{\"c2array\":true,\"size\":[0,2,1],\"data\":[]}","StoreData":"{\"c2array\":true!comma!\"size\":[1!comma!3!comma!1]!comma!\"data\":[[[\"Scribble \"]!comma![\"ScribblePlus\"]!comma![\"50\"]]]}"}}

    This is then uploaded via AJAX, calling a php file which stores it into a database.

    If any section of the data includes a comma, it breaks the json (which makes sense), yet if I use certain symbols it breaks the upload, and it never reaches the database.

    I'm currently in the process of testing an encryption plugin, but I always hate using non-official plugins in Construct 3.

  • I note that whenever I submit an AJAX to website (to store data, such as leaderboards) there are occasions where I was unable to actually upload anything.

    I asked this question over a year ago to a deadly silence, but hopefully someone can help out this time...

    https://www.construct.net/en/forum/construct-2/general-discussion-17/ajax-post-limit-143358

    After some investigation, it seems that the problems come when I post anything that includes a symbol, such as & or #. This blocks the upload of data entirely!

    I'm able to get around this by using the replace action, that replaces the symbols with words. For example, # becomes !hash! and & becomes !and! (apparently ! is not an issue).

    However, I'm worried that I will end up missing a symbol somewhere along the line, especially with there being dozens of them.

    Can anyone think of a clever way of encrypting the data that's uploaded (that is ajax/php safe) then decrypting it when Construct downloads it again?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Due to the way Twitch secures things, it doesn't like one site talking to another, which means any program that is hosted in the cloud can't get certain info. If I made a local version, I'd be able to grab that data without issue.

    The work around I found is that most local chatbots will post a message, such as "Thanks for the 10 bits!" into the chat. So my cloud bot will scan for such a sentence, then can trigger events based on seeing that message appear.

    Unless I misunderstood what you meant.

  • I stream from time to time, but not to do it as a job. I do it to meet people and test out the code, primarily :D

  • You stream russpuppy?

    If you want to try it out, you can check out what it can do by visiting https://www.challacc.com

  • I was trying to share the code for quite a while, but it had the word "TwitchCraft" in the title, and Scirra kept rejecting it because the word Twitch is copyrighted, even though that's not how copyright laws work XD

  • Hi russpuppy

    Yes, I'm able to get all of that working. It's pretty insane what I've been able to achieve slapping Construct and Twitch together :D

    The fact we can now make Twitch extensions just opens up so many more doors when combined with the multiplayer plugin :)

  • The debugger pause button should work. If it doesn't work, please file a bug report following all the guidelines - we need all that information to help, I can't debug a video.

    Will do Ashley sorry about that. Found out that it's the multiplayer plugin in C3 that's causing the bug, so I'll file the report asap.

  • Ashley Sorry to tag you again on this project, but I think this might actually be a bug with the program. I'd post it, but sadly I'm unable to actually replicate the bug with a smaller project.

    However, based on the fact it's refusing to pause, which should be beyond what I'm able to affect, I'm pretty certain this is not a bug with my code.

    Subscribe to Construct videos now

    The video above shows what I mean. Time and ticks continue, even when the debugger is paused.

  • Anyone else getting a weird error when saving to the cloud?

    It's been fine up until v199. I see "Unknown error while saving ***.c3p to One Drive".

    I figured I could just get around this by changing saving to my hard drive instead until the new build and this "bug" is patched out, but C3 doesn't recognize when I save offline. Each time I press CTRL-S it asks me where in the cloud I want to save... even though I JUST saved it to the hard drive.

    Super annoying.

    So, yeah, anyway, anyone else going through this?

  • Can anyone tell me why events still run even when I hit the pause button in the debug screen?

    This is starting to become quite annoying, as in Construct 2 I would occasionally pause the game, then go through frame by frame to see what's happening.

    This is a big problem now with physics objects. I select a physics object from the debug list, then pressing the pause button, and while the object on screen freezes, the object highlighter continues to move. It then goes off screen and the object is destroyed and it's removed from my list... while it's paused.

    Again, this is a direct conversion from Construct 2, and in there it actually pauses.

    I've tried the physics on both fixed and framerate independent. Is there a setting I'm missing? A "Make Pause actually pause" button?

    Physics is just one example. If I have my level restart after 10 seconds, even when paused the game will restart after those 10 seconds have passed.

    Also... I'll likely bring this up in another thread at some point, but is anyone else seeing a HUGE cpu increase from C2 to C3? In C2 I was hitting 2-4%. In C3 the exact same project is averaging around 12-20%.

    This is on a screen with zero sprites. When I look in the CPU profiler I can see the engine/other reaching 8% or greater. What's going on there then?

  • You need to extract the name of the color into a text variable, and then do something like this:

    .

    Or you can get the numerical values for all 9 colors and replace them in the database. For example, "blue" is -1049599

    Thanks!

    That's what I ended up doing, but with that token expression. When I tried to write "rgbex(0,0,0)" or (0,0,0) into the number instance variable, it wouldn't let me. I didn't then think to simply write it in as an action.

    newt - https://construct3.ideas.aha.io/ideas/C3-I-1347

    Did this 2 weeks ago :D

  • I have a database that has saved 350 drawings from Construct 2. I have the X Pos, the Y Pos and the colour.

    Example - 256,720,black

    However, for some reason I can't get my head around, in Construct 3 I can no longer simply put in a colour. Instead, I have to have 256,720,rbgex(0,0,0).

    "Ok, that's fine," I thought, "I'll just set up a few events that will change black to the rgba codes."

    So I create a string variable, then if it detects "black" in the 3rd array, it'll change it to the rbgex code.

    However, that doesn't work because the Drawing Canvas can only work with numbers. If I try to put my new colour variable into it, it won't work.

    So I change the variable into a number instead. However, now I can't have "rgbex" at the start! In fact, I can't even use the commas separating the numbers!

    In the end I went back over to the string variable and used a tokenat expression.

    So... just to confirm:

    Construct 3 = rgbEx(int(tokenat(Drawing.Colour,0,",")),int(tokenat(Drawing.Colour,1,",")),int(tokenat(Drawing.Colour,2,",")))

    Construct 2 = black

    Give me a break! Please, someone tell me there's an easier way! I now have to go in and set this up for every colour I decided to use. Luckily for me, I only used about 9 colours, but what would I do if I had used more? Is there a smarter way to do this?

    I love Construct 3, but I'm hating this one step forward, one step back feeling I'm getting.