Mayfly's Forum Posts

  • Hi,

    I am trying a cycle training game concept. I don't need too much information from the geolocation, but I would like to give the player their speed and distance traveled.

    I have started experimenting but get quite poor results. Maybe phones are just not able to be used in this way, although Strava / other apps seem to get usable results from just a phone.

    I have a text display which is just the geolocation.speed - converted into MPH (Sorry, I am from the UK). This figure is constantly 2-3 mph our, maybe worse when in poor signal (under trees) when I compare it to my garmin watch speed.

    Calculating ride distance I have tried two methods.

    First I've tried getting the speed and working out time since last speed data, then using s = d x t to calculate a distance. This seems to calculate either too much or too less depending on your speed, but overall about 5-10% error compared to my watch.

    The second method I tried was creating an array, then every time a location update comes in I would push into a row the long / lat and some other info. I would then use the Haversine method. I know its not 100% but I was hoping its good enough for what I want. Seems very hit / miss - almost 30% out at the moment (maybe I've messed up the calculations as its a little more complex. I couldn't get the same results as some online tools - I wondered if its rounding errors)

    Has anyone done any apps like this or any thoughts on better ways to do it?

    Maybe I am destined to learn how to create a Garmin IQ app instead - its just there are some smart features I thought of that would be quite easy to build in Construct once I nail bit better accuracy (say 1-3%)

    Thanks,

  • Hi,

    My brother is looking at options for a business app.

    Initially i was thinking of using my knoledge on construct 2 to build him something.

    I know how to connect to something like google sheets - and i created an invoice app which has been upgraded through the years.

    Subscribe to Construct videos now

    Ideally I'd want to make it so as a customer you can log in, book a service, check your service status.

    Then as the owner you can manage bookings, complete invoices and email off etc..

    Does anyone have any suggestions on alernatives to creating this? Anything that is nice and easy to pickup / build like construct? I also don't know too much on the GDPR side of things as everything I have made so far is just prototypes etc...

    Thanks,

  • I've not seen any official updates in a while and tried to reach out to the developer several times over the last year (I lost my login so was trying to forward my invoice recipet on to get a copy of the plugin again) - I think its dead :(

  • Nandynho

    Is there a way to set an input parameter by default? or change the height of the pop up?

    For example I have a box to type in your user name and it would be good to have this by default as the player username from the game variable

    I also have trouble on a mobile that the pop up is too tall and you have to scroll :( and it also forces focus bringin up the keyboard over the top of everything

  • dop2000

    Yep - that's what I've been updating in it this morning. I added a timestamp value to the array and it only updates at the start of each shot (1 row) and then when that particular object is moving.

    It has actually halved the data in the array for a short match (400kb and 400,000 characters). I've also renamed my animation frames to "D" and "T" rather than "Default" and "Toucher" to save characters!

    I think I can strip out two of the values in each row two and call that at the start of the replay (The bowl size and colour don't change once the match has loaded) - This should cut down too

    I do need to work out a more efficient way of checking if the timestamp is in the array as the method I've put in at the moment works ok for a small array. it's too slow at the end of the match when the array is larger.

  • Hi dop2000

    At the moment I used the replay template that was on here (it's very old).It is putting all the data into an array already.

    Each physics item has its own array. Then at a set internal (I have a variable to change / experiment, currently set at 0.1s) - it will push the X, Y position, rotation and animation frame to an array. As it does this is add's one to a variable so that you can loop from 0 to this variable to replay the match.

    It works well and was very easy to setup - trouble is it also records the position when statioary and as you can image when you combine all 10 arrays into one its alot of text. (Each player has 4 bowls, there is the jack and wood on the mat that also need recording)

    On the PC because I can use invoke download, I've made it so I can download asJSON all arrays compiled together. I can also load in one of these files and load up a replay fine. Trouble is this is blocked on android. The shortest match posible is around 800kb JSON file with around 600,000 characters.

    I might try and modify the code so that it only pushes to the array when the object moves - storing a value to represent what 'frame' this occurs at. Then if the frame number matches the loopindex it will set the position - otherwise leave where it was. This would cut out alot of the text as most of the time the objects are stationary except for one object on the mat (or a couple if there is a collision). I am guessing this would be better leaving as an array for each object as if I tried to create on big 3D array, I am guessing it would store alot of "0" when most objects are still.

    I did manage to get it posting the array data to a google sheets - Without an optimization though I am hitting the fact that google has a 50,000 character limit per cell. (I have tested splitting the POST request into 50,000 at a time but this is just bound to give me problems if I don't make efficient.

    I started splitting out a way of storing just the last shot yersterday so a happy meduim might be to allow users to save / submit just one shot. (I'd like to allow submitting your best shots / any bugs encountered)

  • Hi dop2000

    Thanks for the reply. I'll check out the link now to see what I can do. I have the cranberry plugins which I paid for back in 2015. I know the file-plugin was part of this, but at the moment I've not managed to sucessfully use it.

    I've been trying for a few hours to optimise the data but its still too much. I eneded up being able to send a small portial of the array over to google sheets. But this is about 1s of in game data. Once you get over this it must fail as google stays empty.

    I guess i could make the array save less info and make the replay not as smooth to cut dwon on the data. The array stores 5 bits of data for 10 objects :( (8 player bowls, 1 jack and 1 wood - for each one it stores the x, y, size, rotation and animation info)

    It's a shame as the JSON file when you download through PC web is only like 800kb for a whole match being saved (Short match). I was thinking of trying to save the angle / force for each shot instead as this would be alot less data - but i believe the phsics wouldnt work 100% the same everytime so it might give in correct replays

  • Pier8

    Do you have discord or skype? I can help you with building and signing, but the Cordova CLI method. That is what I use to compile my android games

    https://play.google.com/store/apps/developer?id=touchmonkeygames&hl=en_GB

  • My bowls app uses arrays to store the positions of objects to create replays.

    I am trying to find a way to download this data so that if needed a user can submit it so I can review any bugs.

    On a HTML5 build, the invoke download from the browser plugin works fine and I can save and load array data as JSON information. The problem is that this is blocked when compiling into an android apk.

    If there a way to unblock it - or a suitable alernative method to achieve what I am trying to do?

    I have tried to use the cranberry save file plugin but that didnt seem to do anything. I also tried to upload the data (google sheets / zapier webhook) but there are too many values in the array and both these methods time out without completing

    Thanks,

  • LaurenceBedford

    I'll try and get a tutorial written up although there are quite a few steps to it.

    If you use anything like Skype / Discord let me know as its easier and quicker to explain through there. Might be a while before I get the chance to write everything down onto here as depends how much you already know in terms of google play etc..

  • Updated Menu and themes for my Bowls App:

  • orangpelupa I managed to get mine working again today. Do you have skype or discord? I can give you a hand to get your's working?

  • orangpelupa

    Did you manage to fix this? I can't get my app to connect at the moment - it says logging in and then closes the window down.

    The strange thing is I had an app that had google play working last month. Leaderboards and acheivements. Nothing has changed on this (My app is in the store and I've not updated it) and that too has stopped working - it was working last month. I've tried on 3 devices and the same issue.

    Ashley do you know of any changes to google play services in the last month that might impact Construct games?

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • I had google play services working fine in my app last month.

    Today I have noticed its stopped working - the app has not changed at all as its been installed on my phone.

    When logging in the screen says connecting then flashes off.

    Any one else had this issue / got a fix?

  • Just a bump R0J0hound and vikuserro to see if you might be able to help

    - I've updated the peerjs.min first line. If i make the id "" instead of my old key it can connect in Construct 2 in chrome testing the app. But if I publish to html5 it can;t connect at all. Cordova doesnt work - but that is probably a plugin install build issue.