jsutton's Recent Forum Activity

  • Instance variable "last touched"

    On any touch start, pick all set to 0

    pick nearest to touch.x,touch.y set 1

    then pick all = 0 do whatever.

  • The good news, I'm about done trying to get this to work so I won't have a ton more questions lol.

    Ajax post, site&file.php?, Data: "cellname="&var1

    That's the normal way to $_POST (ajax thru php to mysql)

    With the binarydata post I have tried everything I know to get that to go through.

    Just double checking this, is the data labeled (meaning, did you call it binarydata or give it a tag? Or are you expecting it to be labelled on the URL line? (I assume yes to the latter, but it isn't working.)

    What's interesting (and why I ask this) is that I'm almost positive in the C2 we could put the cellname in the URL line (double checked this in an old copy of c2 and no. It had to be labeled on the data line for a POST. Example

    However, that no longer works and the "cellname=var1" has to in the c3 data. Example

    Based on that, I have no clue how to point the binarydata where I want it to go.

    No real worries, I'm going to punt and just do jpeg 20% with base64. I know for certain that works (even if larger) and I need to get back to writing code. (I've just been messing with it long enough I'd kinda like to figure it out. Appreciate the input.)

    ***I should add, I realize the above pictures are not of the send binary to URL, but the same concept applies.***

  • The last time I looked at this was a couple years ago, 2018ish. Back then it was an Android problem that they were going to fix (supposedly soon). You might check the forums and see it there is now something you can put in your config file to fix the pause on unfocus. That's almost always a browser issue.

  • I hate to be the bearer of bad news, but networking is the issue (99.9999% sure). (the c3 multi works fine inside a firewall, past that it must have a cross-origin problem of some sort and it does not handle what you want. See: construct.net/en/forum/construct-2/beginners-questions-19/multiplayer-works-lan-only-100219 I've used the photon plugin for a couple little real-time racing games. It works pretty well and is very similar to c3 multiplayer and works across all the platforms I've tested.)

    construct.net/en/make-games/addons/534/photon-engine-c3

  • Let me try and rephrase this.

    I can access the url where the blob is located (url sent to a variable, copy/paste the URL into a browser and view the data.), what I can not figure out is how to grab that data out of the browser so that it can be sent to a server for storage.

    I'm beginning to think I need an ajax/php to call that url and grab the raw data from the browser, and not using C3 for anything other than the ajax call. Is that correct?

    (Sometimes it's hard to tell where C3 limitations begin, usually it can handle most anything.)

  • Things I'd check:

    The images that are not showing up for peers are showing on the host.

    Everyone is on the same network (if not, the photon plugin can go outside the network).

    Past that, I'm a bust on helping.

  • The multiplayer gets kinda confusing is why I asked.

    It took me a long time to figure out that the host creates all of the sprites and it moves all of the sprites (which is why I asked the previous question).

    When a player joins, the player says hello to the host, host creates that players sprite. When player moves, player doesn't really move. Player sends a request to the host, the host moves for the player, and it syncs back to the player screen.

    If you have it all coded that way, it's probably something minor.

    Just wanted to check that (it's about 90% of questions in the forum).

  • Ashley

    Other than base64, is the raw binary data accessible? If so, how would you recommend retrieving it from the localhost? (By accessible I mean being able to copy it and send it to my server, then import it and load as an image.)

  • Dumb question, but you have the host creating all of the images?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Addendum: Data from the URL returns in this format.

    If I request the URL and look at the ajax it is different.

    It looks like the data on the html page is what I want, but there doesn't seem to be a way to get it with ajax or without using the construct hosting server. Is that correct?

  • 1. Using Base64 to export (via php) works fine.

    2. I'd like to use float64 (or whatever to compress as much as possible), but all float64 seems to do is store/get float data URL from the construct server and displays it as a text file (or load it into a sprite).

    Is there a way to get the actual binary data WITHOUT using the construct server? (for example, one can get the base64 data and send it, but using float64 is just a redirect to the C3 server URL: blob:https://preview.construct.net/YOUR_IMAGE_FILE)

    The URL only works for that session. Once project is closed the data is no longer retievable.

    (Image: PNG = 119kb, JPEG 20% = 4.9kb)

    [With base64 it's possible to get the image small using jpeg 20% quality and get the actual data, but would like to see if I can get a PNG down to that size using float64 or some other compression. If I were using just a couple images in a single session, the URL would be fine. But I'd like to save the images to a database for future retrieval.]

    Tagged:

  • Just sharing a solution that works pretty well so perhaps I'll remember next time.

    + Touch: On any touch start

    + Touch: Is touching Sprite

    -> Sprite: Spawn TextInput10 on layer 0 (image point 0) (create hierarchy: False)

    -> TextInput10: Set focused

    + TextInput10: [X] Is focused

    -> TextInput10: Destroy

    -> Sprite: Set visibility Visible

    + TextInput10: Is focused

    -> Sprite: Set visibility Invisible

    -> TextInput10: Set CSS style "border-radius" to "10px"

    -> TextInput10: Set CSS style "font-size" to 2.5&"vh"

    -> TextInput10: Set CSS style "border-radius" to "15px"

    -> TextInput10: Set CSS style "outline" to "transparent"

    Basically just replacing the textinput with a sprite unless it's in focus. From an aesthetics standpoint, the pins looks 50x better this way.

jsutton's avatar

jsutton

Member since 31 Mar, 2015

Twitter
jsutton has 1 followers

Trophy Case

  • 9-Year Club
  • Forum Contributor Made 100 posts in the forums
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies