castorncage's Forum Posts

  • 15 posts
  • I believe that's what CORS is for. You should be able to set up a whitelist to allow specific domains to access resources on your server.

    CORS is a server side setting though, I do not know if Netlify supports user modification of CORS policy.

    Thanks. This is the first I've heard of CORS. Time for me to google "Netlify + CORS" lol

  • Hey everyone,

    My game is published, but I'm lost on ways to protect it. I understand the idea of domain locking and I read the two "Simple Protection of Published Games" articles, but I'm running into problems because my game is embedded.

    I exported my game as an HTML5 file and used Netlify to create a URL/host the game. Then, I created a Wix website and embed that game URL on a Wix page. Access to this Wix page requires a paid subscription, but at that point, someone can still find the game URL and re-post it elsewhere.

    Is there any way to domain-lock an embed game to the HOSTED website (my wix page), NOT the embedded website (Netlify)?

    If not, are there any other ways to protect a game in this situation? The protection articles I'm finding here are almost 10 years old so I'm hoping there are other options or solutions. I'm open to anything but am not too proficient on this sort of thing.

    I'm not even concerned so much with my game being stolen (although that would stink), but it's a fairly large game and if enough people access it elsewhere for free, I'll exceed Netlify's free bandwidth limits and have to actually pay for people who play for free.

  • You do not have permission to view this post

  • Hey everyone, I've had this layout issue for awhile now and ignored it, but now my game is finished and I want to fix it because it gives a slightly negative first impression.

    My game loads with the layout slightly off-center and becomes even more off-center after returning from full-screen, but then it corrects itself when I click on an in-game button.

    1. My game loads up with the layout slightly off center:

    2. It stays that way when I go to Full-Screen. However, when I click on an in-game button (go to a new layout), the screen centers itself. In the image below, I advanced the game, then clicked "back" to show you the centering of the start screen.

    3. When I exit Full-Screen, the layout goes even more off-center than at the start, when a white border on the left side.

    4. Then, I click any in-game button and the layout re-centers perfectly for the rest of the playthrough, so long as I don't go back and forth from Full-Screen.

    What's going on here and is there a way to prevent the initial issues? Here's my layout properties and my full-screen button actions.

    Let me know if you need anything else to figure this out. Thanks!

  • Check the newScale value in a System Event(Equal, Greater Than, Less Than, etc), then in the action under that System Event, set it to your desired maximum zoom out size? I hope that makes sense.

    Basically just checking the zoom value is equal or less than, your desired maximum zoom out specs, then make sure it gets set to that specification. Hopefully this helps, and I didn't make it confusing. Sometimes I have difficulty putting thoughts into words.

    Thanks for the response. I understood it but couldn't exactly apply it. I've very new to Construct so if you have difficulty putting thoughts into words, I have double the difficulty putting words into actions LOL!

  • how far it zooms out is the third value in the clamp(currentLayoutScale,minLayoutScale,maxLayoutScale)

    set the max value to something lower, like 1 for default for example.

    to reset the camera to the center of the layout when zoomed out you could do something like this:

    if layoutScale = maxLayoutScale set camera postion or scroll to

    x: lerp(self.x,layout.width/2,speedYouWant*dt)

    y: lerp(self.y,layout.height/2,speedYouWant*dt)

    For whatever reason, that didn't work, but thanks you to, I did figure it out. When switching the third value to 1, it didn't zoom in at all, but zoomed out the same (too much). However, by changing the second value to 1 and keeping the third value the same, that did it!

    Thanks!

  • Hey everybody! Thanks to this community, I've found posts that taught me how zoom via Touch/Pinch, however I'm having some trouble limiting how far out my pinch zoom goes.

    As you see in the photos. My game is a series of stationary layouts with an image on top. I added a zoom function in case the player needs to examine any details on the image.

    Here's a screenshot of my touch zoom event sheet. You'll see a "Scroll to (430, 158)" Action and that's there just to keep the "zoom" centered on the image.

    Here's what my default layout size/scale/zoom is when each layout loads.

    As I mentioned, when I Zoom in, it also scrolls to the center of the image and that part works perfectly. However, when I Zoom Out, the zooming out goes too far.

    I want to set the Zoom Out to stop at the default settings AND stay centered or at least somehow reset it. I feel like I'm close, but have been working on it for a few hours LOL I can't figure it out.

    Thanks so much for your help!

  • Thanks for the reply! That helps.

  • Hey everyone,

    I've exported my game to HTML5 and used Netlify to host it. Most times, it loads and plays just fine, but sometimes the screen goes black as soon as it loads or seemingly randomly throughout the game.

    Searching through manuals here, I came to MIME types and wonder if that's the issue. I wanted to confirm that Netlify is using the correct MIME types, but I can't seem to figure out how to do that. If any of the MIME types are wrong, how do I configure them correctly?

    Thanks in advance!

  • You do not have permission to view this post

  • I'm trying to create a "Hint" page for my game that involves solving puzzles/riddles. Players can get hints, one at a time, getting more specific until finally the answer is revealed. See example below.

    I'm trying to find a way to cycle forward and backward with these hints, but I'm not sure how. I'm currently using a Spritefont. Would an array be the best way to tackle this? If so, could you be specific on how to set that up? Or is another method best? The best tutorials I've found were related to dialogue, but they seemed too complex for what I'm doing and didn't see to allow going "backwards."

    Thanks in advance!

  • Creating Global Variables worked! It's easy! It's beautiful! It's perfect! Thank you both!

  • When you return to layout 1 are you given the same options but the door is now open? You can give the 'Strange Door' button a variable which changes when the door is unlocked, if var=0 then go to layout 2, if var=1 then go to layout 3.

    Yes, when you return to Layout 1 after entering the code, I want it to be exactly the same as before (same buttons/options and same artwork). The only thing I want to change is the destination of clicking "Strange Door."

    I sort of understand your solution. Let me see if I can figure out how to do that. Using your example, I'd want this variable to be permanently var=1 once the code is entered and never revert back to var=0. Will Construct allow that?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Sorry, I had no idea how to word that title question. Here's the situation, which I hope makes things clear.

    I have a point and click game that requires entering passwords. I've attached an example of three different layouts below.

    1. Player clicks "Strange Door"-->

    2. Door is Locked, Text Input for Passcode-->

    3. Door is Unlocked (passcode was successful).

    This work's beautifully. However, there is backtracking my game, and as of now, players have to re-enter the passcode each time they move through the door. I'm trying to avoid that. I want Layout 1 to link directly to Layout 3 (and skip Layout 2 completely) once the Layout 2 passcode was entered successfully.

    If you're still reading...thank you! Here's what I've tried so far.

    I've dabbled with "Destroying" the Strange Door button when the code is entered, and creating an identical button that links to Layout 3. I've also tried visible/invisible settings.

    The problem I'm realizing is that because the code is entered on Layout 2, it can't effect a Layout 1 object unless I make that Object Global, but then when it's global it appears and interferes on other Layouts.

    Maybe I'm overlooking something above, maybe I need to learn about behaviors and instances, which I really don't understand, but willing to learn if you point me in the right direction.

    Any help is greatly appreciated!

  • Just to follow-up, I did some research and ended up using Sprites + Font (in photoshop) and used them as buttons. Absolutely love it, so although it takes extra time to learn and crank each button out manually, it completely solves the problem and allows tons of customization in the future. Thanks again!

  • 15 posts