Colonel Justice's Recent Forum Activity

  • No clue how Construct handles https or shows certain data in the inspector, but by default, the URL is indeed encrypted by the time it leaves the browser to the destination server (which in this case seems to be your local machine).

    After receiving the request a secure channel is established between client and server and everything goes through that channel from this point onwards. This is done by asking the DNS server to provide an IP:port mapping for the channel. At no point prior is data sent visible, other than some header information regarding the target, which the DNS reads to point to the destination host.

    In order to hide transaction calls from the player, you would need to encrypt the payload on client side and decrypt it on the server. Obfuscating variable names seems to be a poor measure, since ?asda34859=4000000 can be crosschecked with the score the player has made in that session and figure out that asda34859 is the score variable - not to mention development hell to map the obfuscated variables with the real database names.

    For starters, you could encode your payload in base64 and split the string in 2-3 variables.

  • Join sprite and 3d object in a container.

  • Create a layer above the 3d rendering layers, and make sure it's set to 2D.

    Set the parallax and scaling rates to 0%

    Place your 2D content on that layer.

    If necessary, make the HUD layer global to be reusable in different layouts.

  • Can you please share a .c3p that demonstrates the issue?

    You don't need to load the JSON string into the array every tick, once e.g. at start of layout is enough.

  • Try:

    On start of layout:

    -Add local variable (string)

    -Set variable to tilemap.asjson

    Repeat 5 times:

    -Create tilemap

    -Set tilemap from json: variable

    -Set z-elevation to -1 -loopindex

    EDIT:

    Be sure to disable collisions on the tilemap copies.

  • Hello fellow constructeers,

    I was wondering if there is a feasible way to alter the texture offset on a 3d shape.

    Let's consider the following scenario:

    Consider 16x16 box 3d shape. The shape has set a tiled background (256x256 image) as face. The 3d shape gets cloned 16 times (e.g. create, then set from JSON) and the copies are placed next to each other. Altering the y-offset of the tiled background by loopindex * 16 during the creation loop of course changes every box instance.

    The common workaround is to put box & texture in a container or create a hierarchy.

    This though is resulting in unnecessary object count overhead.

    I was wondering if there is another way (maybe JS) to offset the box face per box instance?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • The object you want to apply the image texture from has to be on the same layout.

    Be aware though of having more than 1 image object on the layout, since you can't tell which instance is chosen when the face is applied manually.

    To overcome this issue, you can create a container with the 3d shape and the sprite / tiled background / 9 patch object.

    Like this, you can control animations and such at instance level.

    Regarding the transparency, the rendering impediments described in the manual / tutorial apply.

    https://www.construct.net/en/tutorials/using-3d-construct-2746

  • Use int(random(1,10)) to convert to an integer value.

    Additional information:

    Repeat X times makes only sense with integer values, because you can't repeat something only a fraction of times. That's why it's converted during the call.

  • Do you want to display the score in the 3D environment or just have the score displayed on a HUD overlay?

    For the latter, use the method I described earlier.

    If you want to have text rendered in 3D, well, that's another story.

    As you pointed out correctly, you can only use sprites, tiled backgrounds and 9-patches a source textures for 3d shapes.

    You could, however, do the following:

    1) Use a spritefont object for the scores

    2) Add a hidden 2d layer to the project and place the spritefont on it.

    3) Add a drawing canvas and sprite object to the same layer. Set the 3d object face to the sprite.

    4) Add some events:

    Every tick:

    -Canvas: Paste spritefont on drawing canvas.

    -System: Wait for previous actions to complete.

    -Canvas: Save image(PNG quality).

    -> On Canvas image saved:

    -> Sprite: Set image from URL: Canvas Saved Image URL.

    Voila.

  • Create a 2D layer and put it on top of the 3D layer, then put the text on that 2D layer.

  • When changing an image via URL download, it affects every object because the image information is just referenced in memory - that‘s why the copies you create during edit or runtime are called instances.

    There are some workarounds to tackle this challenge though. For example, you could use a sprite with let‘s say 100 placeholder frames, and then everytime you want to load an image, change the animation frame to the desired (empty) frame beforehand.

  • Yes. The performance will probably be sub-par, but yes.

Colonel Justice's avatar

Colonel Justice

Member since 16 Mar, 2011

Twitter
Colonel Justice has 10 followers

Trophy Case

  • 13-Year Club
  • Jupiter Mission Supports Gordon's mission to Jupiter
  • Forum Contributor Made 100 posts in the forums
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

18/44
How to earn trophies