kncuser's Forum Posts

  • Allan told you this from the very beginning - that you were probably sending progression events in Construct events that run on every tick. Then you posted a correct test project which got us puzzled.

    You need to send progression only in triggered events (like "On click", "On touch", "On layout end" etc.), or in events that you definitely know will run only once.

    Fair point, but remember: When Allan said it was working, I was still reading inflated data coming in on my GameAnalytics dashboard. Had I realized - then - that the GA log was in the console, I would have checked it at that point (chalk up a screwup for the noob).

    I really didn't trust the code I first uploaded and still didn't trust it until now (more on that in a minute). Even though Allan had success with it, it generated excessive events for me, so far as I knew, I still had a problem at this end.

    Granted, I should have looked for the logs instead of editing the project any further, but - hey, live and learn.

    This said, I went back into the original test file just so I could be on the same page. Indeed, it shows perfect operation as per the Console. But if I'm reading the Console right, GA has held events from *previous* plays in its queue to send later:

    If this is the case, I now understand why I though there was still a problem: Progression events from previous tests were stuck in the queue and being sent concurrent with the *properly coded* project sending accurate data.

    At least this gives me an explanation why I thought there was a problem with the test project too. Until this moment, I was a bit puzzled myself.

    Thanks again.

    -Kurt

    P.S.: It wasn't until after the first test project that I fell into the trap of experimenting using a system variable (an every tick event) as the event condition. I didn't realize these events required a System > Trigger Once condition as well to prevent them from running every tick. Otherwise, I usually don't make this mistake.

  • Oh, Headbang Games is right.

    kncuser, you had it correct in the file you posted yesterday. But now the mistake is definitely in your events.

    Well, even in the "correct" version, the problem was still there, so I don't know how "correct" I'd call it. Still, Headbang Games solution worked like a charm!

    I prefer this setup as there's no ambiguity. The game is told to send one progression event - period. Since it's the only thing I have requiring the trigger once command, I can also put it in its own condition.

    I tell you though, the GameAnalytics SDK manual is sorely lacking if their events require "trigger once" commands to operate reliably. Yes, the multiple events may be caused by the way C3 operates, but if that's the case, it should be in the manual somewhere. Wound up wasting three days over this.

    -Kurt

  • I give up, this doesn't make sense..

    If you are testing in desktop browser, press F12 and see if there are any GA messages or errors in the console log. You can also add "Browser Log" actions to your code to see when these events are triggered.

    I still need to look at the GA error log, but the Google Chrome inspector speaks for itself (!)

    EDIT: Apparently, the GA error log shows up IN the inspector - I'm an idiot.

    Those events increase in number by about 100 every second. It is like the command is running every tick, but it's also running 100 events per tick. I'd venture to say the command is running in some sort of infinite loop.

    I also tried adding a session start/session end condition before the progression events. All it did was change the way the sessions were logged, but a gazillion of them still popped up:

    -Kurt

  • Holy crap. That escalated quickly.

    -Kurt

  • Well, there are only two possibilities - either your "On click" event is triggered several times, or there is a bug in the plugin which sends the progression event several times. Like I said, this never happened to me, so I suspect that the problem is with your code.

    Are you testing your game on mobile?

    GA plugin doesn't work with worker mode, and I don't think it's related to this issue.

    I'll assume worker mode is unrelated then.

    I'm testing on desktop. All click events. No touch events ATM.

    That said, I've redesigned the event sheets on the test project with a global variable to run the progression events - along with a visible counter. Text output looks fine for each of the three layouts.

    Here's the c3p (keys removed) for anyone who wants to verify the work:

    dropbox.com/s/fy2kgifxlv8ubha/v2-Progression-Test-No-Keys-GA-SDK.c3p

    And despite all of this...there's still something wrong with the metrics. The two starts make sense; I opened it once without playing. The two endings do not make sense.

    -Kurt

  • the sdk says there are two levels of debugging logs that get output to the console. you could try that...

    I'll look into the debugging logs. Couldn't find them initially, but I wasn't looking that hard.

    Does this problem happen with the test project you posted? I agree with Allan, you are probably sending this event many times in your game. This can happen, for example, if you use "Is touching button" event instead of "On touched button".

    I've implemented GA in many games and never had this issue.

    You can try adding a counter (global variable), which increments every time you are sending the progression event, and display this counter in all layouts in your game. Also, check Realtime-> Live Feed in GA dashboard.

    It happens with the test project, but to a lesser extent. The game has been played 2 times, but Screen03 reports five completions:

    The only touch command used was when I tried tying GA to one of the button "on click" events - which should be sending the event only once. The problem seemed to get worse when I moved it to a "SpinnyGear: Visible" event (SpinnyGear is a sprite that is toggled visible and left to run for 1 second before the layout progresses).

    Given that this is showing up in the test as well, I'll try the global variable on it; see what happens.

    I've checked the live feed. With 10 events shown on it at any time, all I get to see is rampant duplication of said events.

    FYI - I don't know if this is directly relevant or not, but I can't get GA to operate with worker mode enabled.

  • I would be happy to take a look at your test file.

    Here it is:

    dropbox.com/s/u9ny8z94aly33ky/Progression-Test-No-Keys-GA-SDK.c3p

    -Kurt

  • My thoughts as well - except that I've tried tying the completion event multiple ways:

    1. 1. To a successful mouse click of a button. Really shouldn't be throwing multiple ticks because of that.
    2. 2. To an animated gear sprite that's toggled visible only upon completion of the layout. That shouldn't be throwing multiple ticks because of the animation either, and it stands alone.
    3. 3. On load of the next layout. After all, if it is tied to the # of ticks, one would expect the same number of Completion events for the previous layout as Start events for the next, given the condition they're under. But the Start events are never inflated. Only the Completion events.

    I can upload a .c3p of the test layout, though if anyone wants to test it with GA, they'll have to add their own keys.

    -Kurt

  • NOTE: I'm not sure if this is a Construct 3 issue or a issue with gameanalytics plugin, but I thought I'd see if anyone else has experienced this. Also, if the mods believe this belongs in the SDK forum, please do move it to its appropriate place.

    Today, I set up the GA SDK in Construct 3 on a project I've been working on. Said project is quite simple, with the user simply progressing through four different layouts - three of which have an "Add Progression Event Start:"MainGame01":"Screen0X":"" upon the start of the new layouts, and an "Add Progression Event Complete:"MainGame01":"Screen0X":"" at the completion of each layer. Each layout increases the Progression number Screen0X by one (e.g., Screen01, Screen02, etc).

    Though the SDK does communicate flawlessly with the GameAnalytics website, I have a particular problem with the third layout progression event (Screen02) reporting nearly 100 Completion events for each single run of the game. GA reports I've played the game 32 times, but Screen02 has 566 event completes, but only five starts. Both of the other layouts started reporting absurdly high completion numbers exceeding their start numbers as well.

    This is a simple educational matching game, and the completion is generated by a single button click, so Construct *should* be sending only one entry.

    I decided to create an entirely blank Construct 3 project to test this. It has three layouts, three click-through sprites, and the exact style of GameAnalytics progression events as my main project - functionally, its identical to my main project. I gave it its own keys within my account, created a new "Game" within the GA dashboard for the test, and played the game through twice.

    It reported correct metrics (two plays) for all events *except* Screen03 - of which it reports 5 events. It's impossible - I've played the game twice.

    Has anyone else encountered behavior like this from GA? I'm also running both projects with Workers disabled, as GA doesn't seem to run without it turned off (at least, as far as I can tell).

    -Kurt

  • I've been cruising the Construct libraries - both C2 era and C3 - for plugins that would provide some sort of PDF support within the game. I've run across Pode's PDF Creator for C2 (where forum member paulh expressed a similar interest as mine; using the plugin to generate a quiz certificate) and the promising (if untouched for years) jsPDF plugin.

    I wouldn't particularly be considering old plugins like this - and I'm sure it makes the devs cringe in regards to backwards compatibility - but there doesn't seem to be any PDF support for C3.

    Before I spend time even trying to port either of these .js-based C2 plugins to C3, I figured I'd see if anyone else has tried to do so - or has a better solution.

    Thanks!

    -Kurt

  • Thanks dop. I gave this a try and also considered whether substituting the 9-patch for the sprite would work.

    Ultimately, I decided pinning the extra target sprite would be a lot simpler, and perhaps more reliable in gameplay.

    So far, it is working pretty well.

    Thanks!

    -Kurt

  • I'm working on a simple, visual matching game for kids, where they must must drag and drop a word (as SpriteText) over a 9-patch box correctly.

    The SpriteText obviously uses the DragDrop behavior, and it either tweens to its original position when dropped in the wrong area. However, on collision with the correct 9-patch, I want the text to lock on to the coordinates of that box.

    I have been able to achieve everything I've described above, except the Collision behavior doesn't seem to be available for SpriteText. To make it work, I've had to pin the SpriteText to an invisible Sprite.

    But, far as I can see, the SpriteText object type already has a collision box coded in by the program, and if I run Debugging, the object does actually have a collisions parameter which is set to "True."

    So am I doing this wrong, or is this literally a feature that Construct 3 has mostly implemented in the back end, but is simply turned off for some reason? It's a major time suck to edit the smaller, pinned sprite (smaller to ensure the bounding box works right) directly under a larger object on the same layer.

    Many thanks for any assistance the forum can provide.

    -Kurt

  • kncuser

    I literally ran into this issue myself just now - turns out I'd been doing all my z-tweening on objects at the centre of the screen, which works fine. I then tried it on an off-centre object and was stumped as to why it was tweening weird. I figured it out and came to post here, but you'd beaten me too it! :-)

    I'm guessing you could simultaneously tween the x,y back to the initial position? I'll give it a go and report back.

    If that works, do let me know (I could try it here, but not being too good at the tween function at present, I'd probably just screw up for the next two hours). Not having that much luck with the Sprite font scaling on pinned, and the antialiasing looks pretty terrible when scaled down to 50%. Don't know why - the Sprite font itself looks excellent.

    -Kurt

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Both spritefont and text objects scale fine using z-tweening:

    https://www.dropbox.com/s/9lgyx16nidbuiwg/scalingWithZ.c3p?dl=0

    I tried it, but couldn't get past the issue that Z-tweening means every box will increase in size from the center of the layout, rather the center of the 9-patch.

    I do like the fact that it allows for smooth tweening though.

    I realize it may be the only way to overcome the text object scaling the way I want it, but I'm not sold on using this function (though I am for other elements of the game - I'm glad you brought it up)

    -Kurt

  • dop2000 - Setting the size of all the 9-patch objects this way did the trick. Not bad for efficiency's sake either.

    It did take me me a second to realize I should run the pin on the start of the layout - I had it set on mouse click initially. The image was continually reducing on size on each hover.

    That said, is there a way to scale text this way too? I realize pinning it as one would for a sprite only increases the size of the text box itself, not the text. I realize I can set the font size larger, but the position will drift on hover.

    mekonbekon I haven't tried this method, but I will as I'm curious about adding the tween functionality. Will report back.

    -Kurt