TetroniMike's Forum Posts

  • Found this, which may explain it:

    https://www.construct.net/en/forum/construct-3/general-discussion-7/not-work-mobileadvert-ios-159106#forumPost1037989

    Post by Artpunk:

    I found that the MobileAdvert > Test Mode property doesnt seem to work for iOS in the same way it does for Android.

    In order to test ads on iOS, you have two options:

    You can use the test ad-unit IDs that AdMob provides (ths is the easiest way to test)

    You replace your real ad-unit ID with test ad-unit IDs.

    https://developers.google.com/admob/ios/test-ads

    The second option is to add you test device (iPhone, or iPad) to 'Test Devices' in your AdMob account. To do that you need to use an app to retrieve your IDFA number from Apple device. Doing it this way, you can use your real ad-unit IDs.

    https://support.google.com/admob/answer/9691433

    In both cases, you export your xcode project from C3 > open Xcode on Mac > connect your test device to Mac > build project, game launches on device and you should get ads.

    So I suppose I'll test a new build with Test Mode off. I already have my devices registered as test devices in AdMob. We'll see how it goes!

  • No, I wait for the user to request a video ad, then do 'Create rewarded advert'. In my testing it generally only takes a few seconds to create/load a rewarded ad. My 'On rewarded complete' code just gives the user their reward.

    Do subsequent 'Create rewarded advert' processes take a significantly longer time (e.g. multiple minutes), and Creating well ahead of when I actually need the ad will fix the issue?

  • (Continuing the conversation from this post: https://www.construct.net/en/forum/construct-3/how-do-i-8/ios-reward-ad-show-once-184263?kws=rewarded#forumPost1115233 )

    When testing my app on iOS, on an actual iPhone device, installed for testing via XCode, the 'Rewarded advert' only shows once. If I continue playing my game and trigger the reward again, the ad never loads. Interstitials work fine, and banner ads work fine.

    Post by Resurrected Studio:

    The IOS Simulator shows only 1 reward add and multiple interstitial adds(confusing i know).

    Test on your mobile with remote preview to see the reward ads working :).

    So iOS Simulator limits the number of reward ads you can show, I guess. Is this also true when installing to an actual device from XCode? I'm experiencing exactly this (only 1 reward, multiple interstitial) on an actual device. Note: the MobileAdvert plugin is in "Test mode", could that be affecting this?

    The ads are working as intended on Android, both when installed manually via APK or from the Google Play Store on a Closed Testing track (both versions have MobileAdvert using "Test mode").

  • Thank you Ashley! Noted!!

  • I attempted replacing the "project-name" folder and the "www" folder, and that seems to have worked quite well. Please let me know if I'm mistaken and need to include other folders when updating an existing Xcode project.

  • When I export to iOS as an Xcode project, and then update my game and make a new export, what files do I need to replace in the Xcode project folder? If I can just move over the updated project files and avoid all the setup and tweaking I otherwise need to do Xcode each time, that would be incredible.

    Here's a file/folder list of the root folder of the export:

    • project-name/
    • project-name.xcodeproj
    • project-name.xcworkspace
    • cordova/
    • CordovaLib/
    • frameworks.json
    • ios.json
    • platform_www/
    • Podfile
    • Podfile.lock
    • Pods/
    • pods-debug.xcconfig
    • pods-release.xcconfig
    • pods.json
    • www

    What files represent the actual game, that I can just copy over and overwrite in the project-name.ios.project folder?

    Tagged:

  • Without a layer you could draw them to a drawing canvas at 100 opacity and then make the canvas have opacity.

    Ah! I haven't messed with the canvas features yet, I'll try that!

  • I have a bunch of objects that can overlap. These objects can be in front or behind (z-wise) other objects in the scene. I'd like to darken all the COLLECTIVE pixels behind a selection of these objects, without having them darken each other. I cannot have the shaded area be its own layer, unfortunately, as the shading can exist between objects in the main layer. Please see the photo below for a very simplified example.

    Is this possible? How do I achieve this?

  • I got it working! First, whenever I call my function that captures the windows [X] close button, I first release control (to help prevent duplicate "listeners") by removing all listeners from the 'close' signal. You'll note the below code is very similar to previous solutions, but adds an extra line that I guess was a recent requirement to listen for 'close' signals: var gui = require("nw.gui")

    Browser -> Execute javascript:

    "var gui = require(""nw.gui""); var win_main=gui.Window.get(); win_main.removeAllListeners('close');"

    Then, I run a second command that listens for the 'close' signal.

    Browser -> Execute javascript

    "var gui = require(""nw.gui""); var win_main = gui.Window.get(); win.on('close', function() { c2_callFunction('nw.js close',[]); });"

    I have a Function titled "nw.js close" where I run the code I want to run when the player clicks the window [X] close button.

    And then when I want to release control I run just that code at the top of my post, removeAllListeners.

    This works in the latest NWJS 0.84.0 on Windows, and I'll be testing my update on Mac and Linux next week.

  • This is in response to this post, which I cannot reply to as it is over 1 year old:

    https://www.construct.net/en/forum/new-post?topicID=157025

    in turn, that post was a response to this post:

    https://www.construct.net/en/forum/construct-2/how-do-i-18/window-close-113911

    The above mentioned Browser -> Execute Javascript solution works on NWJS v0.54.0, but I can't get this to work with NWJS v0.84.0 - now I recognize that version is not officially supported by Construct 2, but everything else NWJS-related works just fine, this is the only item that is not working. Any ideas?

    This is for the game Hypnospace Outlaw, and before you suggest it we cannot port to Construct 3 for a number of reasons. I'm trying to update the game to fix (1) Steam Cloud Saves, (2) mod.io integration, and (3) issues with newer graphics cards that new NWJS versions seem to resolve. While I was at it I figured I'd add some quality-of-life fixes and additions, like overriding clicking the [X] button so that players don't accidentally close the game when they're trying to click something at the top-right corner of the window.

  • I did some Googling and found this, so take this answer with a grain of salt: if you have not, you may need to "Publish to the web". Via this article: philipdev.se/ideas/google-spreadsheet-data

  • Alright so I've learned a few things:

    1) AdvancedRandom can take a string of presumably any length - I used Update Seed and put in a string with over 1,000 characters and it worked as expected.

    2) Repeating the random() function 1,000,000 times BARELY noticeably lags, maybe 1/20 of a second.

    3) Updating the seed each time I use random() to "MYSEED_[n]" has no noticeable effect on FPS, even if calling it 100 times every single tick. (n = number of times I've used random())

    For both 2 and 3 I enabled "Replace system random" in the AdvancedRandom properties.

    So it looks like my current implementation will work fine (unless the player has been playing on a single save file for literally days without a game over). And so will your idea of updating to MYSEED_[n] each time random() is used :)

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Well... More than 7 characters.

    "MYSEED_1234567" is 14 characters, hence why I ask. I suppose I can test myself and figure it out :P

  • So pre-generating numbers is great but what if I need like 8,000,000,000 of them? Since the game generates as you progress, I can't be sure how far players will make it. Granted, 8 billion will most definitely be enough, but yeah.

    Now that I've thought about it, re-seeding each step is an idea, I'll look into it. Does Advanced Random have a seed string maximum length? Because like I mentioned the game could potentially get into the millions of steps.

  • Ok so let's simplify the problem. When using seeded randomness I am guaranteed to always get the same numbers in the same order, if I use the same seed. So let's say I do the following:

    Start of Frame:

    - Set AdvancedRandom Seed to "SOMESEED"

    Repeat 10 times:

    - Set Var to Floor(Random(0,10))

    - Set Text to Text.Text & " " & Var

    AdvancedRandom has now generated 10 random numbers. The above code will output the following, for example:

    1 5 7 6 3 8 3 2 4 6

    Now, let's say at this point I want to save my game and come back later. So I save the seed "SOMESEED", I save the string of output numbers (in bold above), and I quit. When I load up this save file, and generate 10 more numbers using the same string, my string will be:

    1 5 7 6 3 8 3 2 4 6 1 5 7 6 3 8 3 2 4 6

    Which is just the 1st 10 numbers twice.

    If I do all of the above without saving, quitting, and loading the save file, I'll have 20 random numbers. The intended functionality would allow me to save, quit, and load while resuming at the "step" that AdvancedRandom left off at. But there's no way to do that that I can find.

    Basically, I'd like a player that uses "SOMESEED" and plays for 20 steps to get the same results as a player who plays for 10 steps, then quits, then resumes and plays for 10 more steps.

    Does that make sense?