Unconnected's Recent Forum Activity

  • I had a strong feeling I should of just left this in general. I did move it to Bug, I never heard of this.

    Thanks.

  • Problem Description

    Adding 0.1 to Zero every X Seconds should hit 1, but hits 0.99999

    Attach a Capx

    https://www.dropbox.com/s/i9n5l1ym15b0a ... .capx?dl=0

    Description of Capx

    Every 1 Second add 0.1 to Variable 'Number'

    Steps to Reproduce Bug

    • Run in Debug
    • Look for Variable 'Number'
    • 'Number should hit 1.0

    Observed Result

    Variable 'Number' misses value of 1

    Expected Result

    Variable 'Number' hits value of 1

    Affected Browsers

    • Chrome: (YES)
    • FireFox: (YES)
    • Edge: (YES)

    Operating System and Service Pack

    OS: Windows 10 Pro 64 bit

    Version: 1709

    Build: 16299.334

    Construct 2 Version ID

    Beta release r256

    I feel this must have been discovered already.

    I didn't know how to look it up, I kept getting results not related to this.

    I ended up using

    round((Number + 0.1)*10)/10

    to get the results I wanted.

  • I believe I found out what was causing it.

    The size of the text object has something to do with it.

    I actually converted some of my text objects to sprite font.

    It acts the same way.

    The size of the text objects that were affected where a lot larger than they had to be.

    I also think it happens if the text object is to small for the text to display correctly, I am not 100% sure on this one..

  • I believe I fixed the original setup I had.

    I was calling a function to Zoom and Pan to a specific spot.

    It was interrupting TouchPanID and TouchZoomID getting set back to defaults when not in touch.

    I found if I manually set TouchPanID or TouchZoomID to 0 instead of default -1 it had the same results.

    Now thinking of it ScrollX and ScrollY wouldn't have mattered regardless of parallax and scale rate.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I don't have much of a capx.

    I took the built in Touch zoom/pan example and placed it in another capx..

    The few events I added made a logic bug.

    It would have been easier for all involved to just make a new with the C2 Touch Zoom example.

    I can promise it isn't dividing by or multiplying by 0, unless it is random from input feedback.

    The variables are all integer, unless litetween is affecting it some how.

    The Built in Touch zoom/pan example in C2 only zooms into the screen center.

    The fact that it has pan makes it seem like it doesn't.

    With combination of Pan and Zoom, it will look like it isn't zooming to middle of screen.

    Your capx. is mostly the answer, It is very simple.

    I actually understood it instantly.

    I was having trouble with understanding zoom in C2 Zoom tutorial.

    Because of your capx, I don't have to use 0 scale rate and parallax 0,0.

    I believe that it was what was causing my problem, and that it was only needed for zoom.

    I once had pan working great on 100 scale rate and parallax of 100,100.

    I just need to redo pan now, I will have to do that later today.

    I always try to mimic modular programming with the events.

    Thanks for the file.

  • I know this is a common topic and C2 also has a tutorial built in for this.

    This one is a bit different.

    I used the C2 tutorial to get my touch zoom and pan to work correctly, and it does.

    I added a UI Button that when pressed will Zoom and Pan to a specific point.

    It uses an invisible object, ScrollTo behavior, and litetween.

    The tutorial and the UI Button have their own variables.

    The only thing they have in common is LayoutScale, ScrollX and ScrollY.

    The UI Button logic is below the Touch Pan/Zoom in the event sheet.

    If player touches screen while game is auto zooming/panning it gets ignored.

    This is because ScrollX, ScrollY and LayoutScale gets overwritten each tick when ran.

    During runtime, sometimes out of nowhere LayoutScale, ScrollX and ScrollY both get set to NAN and screen goes black.

    It doesn't happen often and I can't detect a pattern to it.

    I can't even reproduce it.

    I believe this is the issue.

    The Tutorial uses a Layer with Scale rate 0 and Parallax of 0,0.

    The Invisible object is on a layer that has Scale rate of 100 and Parallax of 100,100.

    I figure the math of the original tutorial is messing up because of this.

    I am very sure it has to do with ScrollX and ScrollY and not to do with LayoutScale.

    I did think maybe the litetween was interfering somehow...

    I am only hoping for the built in C2 Example Tutorial with a few added events, but if someone has something more simple I would appreciate it.

    I did study it to a point, but I only understand about 98% of the Example Tutorial.

    I mostly just copied it and pasted it into my own project and changed the variable names a small bit.

    I am curious if someone could share a capx with Touch Pan/Zoom with the ability to Pan/Zoom to a specific point when the game calls for it.

    Maybe use the

    "Example: Touch - zooming" capx

    and add a feature to zoom and Pan to any given spot on button touch.

    I would ask for an explanation on how to fix it, but I lack the ability to test zoom touch when developing...

    Thanks in advance.

  • I am having performance issues on my project when exporting to apk(Android).

    I looked in debugger and it is mostly draw calls.

    I have my window size set to 800x450.

    At 800x450 on mobile I usually get around 27-32 fps, when idle and nothing happening.

    I am curious if 400x225 is too odd/small of a Window Size to use in an App Store.

    I did test it on mobile and my fps stays around 59 with some uncommon spikes to 32.

    I didn't reduce the size of objects for the testing.

    I don't have much logic running at any given time.

    I used functions and activate/deactivate groups to allow things to run as needed.

    I was wanting to keep it 16:9 ratio.

    800x450 and 400x225 have that ratio.

    I am curious on what Window Sizes people use on Mobile.

    Is 400x225 is too odd/small of a Window Size to use in an App Store or will it cause problems going that small?

  • I know some things are handled differently.

    In C3 my webfont events for C2 wasn't working, I had to change it to Face Font.

    The call name of the font changed too.

    I had to figure out the new name by seeing what C3 was calling it.

    I forgot how I found the new names out though, it wasn't hard to find.

    ReplaceColor only has 3 Parameters now instead of 7.

    I made extra events connected to a variable that changes which events are called, depending on what Construct I am using.

    If c2 then do webfont

    else do facefont.

    Other than that I don't notice much.

    I don't use C3 for anything other than export..

    It doesn't run very smoothly for me.

    *************************************

    Update on my blacked out text object.

    Seems like it happens during export.

    I was testing export settings.

    I still don't know what is causing it though.

    When originally testing I exported to apk over 6 times with different settings each time.

    The text object was only blacked out on a few exports and not the rest.

    I changed Z-order and what layer the object was on during the exports with the same results.

    It seemingly does not alternate between showing text and blacked out in the same apk.

    Closing and reopening the apk doesn't seem to change the results.

    I find it odd that it is only affecting the one text object.

    The only unique thing about this instance text object is it's fade.

    It is the only text object that repeatedly gets it's text changed, opacity gets set to 100 and fades using fade behavior.

    I use instances of the same text object in different areas, they do not have issues.

    ********

    I completely removed fade on the affected text object and it sometimes still appears black when exported to apk.

    It for sure has something to do with exporting.

  • I have a few text objects in game.

    For some reason only 1 is blacked out.

    It looks perfect in C2 and C3.

    I then export it to APK, and sign to test it.

    When I run it on mobile the text becomes a black bar.

    The black bar is equivalent to the text object's size.

    I checked object and layer, neither have blend modes.

    I even changed what layer the object is on and the Z-Order.

    If it had a blend mode or an issue in the project file, it would show up when running on PC.

    Can anybody speculate or know why it does this?

  • I think it was relevant.

    I was having trouble using 'Replace Color' in C3.

    I initially thought it was a bug too, it took me a while to find the solution.

    I used a third party search engine to find the two posts.

    I didn't realize it was closed until after I posted, it is very easy to miss.

    I did know it was about a year old though.

    I posted it just to help others as well, usually a link can prevent a few new posts.

  • C2 uses 7 Parameters while C3 uses 3.

    You only need Paramenter 0,1 and 2 in C3.

  • rexrainbow

    Ill throw in a request for randomgen and shake mod if nobody has yet

    I need a way to shake objects too...

Unconnected's avatar

Unconnected

Member since 6 Apr, 2016

Twitter
Unconnected has 1 followers

Trophy Case

  • 8-Year Club
  • Forum Contributor Made 100 posts in the forums
  • Coach One of your tutorials has over 1,000 readers
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies