haypers's Recent Forum Activity

  • Sorta. Unbounded scrolling allows the camera to move to any area, as opposed to bounded scrolling that restricts the camera to locations in the layout bounds. I think your problem is the 'fullscreen mode'. I always use 'letterbox scale'. Try messing with that.

  • Howdy yall. So, I've got a mobile app I building for android. I have added In-app-purchases before, but they were always non-consumables. I've never tried to add in-app purchases for consumable in-app currency. But I kinda need to for this game I'm working on. This is all fine and dandy, but now, I need a place to store the amount of in-app currency any player has, that won't be destroyed as easily as local storage. I need to save this number to the cloud somewhere, and associate it with their google play ID or somthing. I don't know any JS, but I'd learn a little if I had to. What I really need is almost like a cloud dictionary, where I can store In-app currency values for any given google play player ID.

    What services do you guys use to store cloud data? Can you host a little database with like google drive or something? IDK, I've heard of people doing that before. How do I go about saving player data to the cloud for as cheap as possible?

    Any info is appreciated, thanks.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • awesome! this works great! Now, I will note that one of the reasons I am trying to do this myself rather than using the physics Engine is because I need as low CPU usage as possible to run on mobile. So, If anyone else wants to use this method like me, here is my set up:

    | Local number nx‎ = 0

    | Local number ny‎ = 0

    | Local number vn‎ = 0

    * On function 'bounceOff'

    * Parameter 'ballID' (Number)

    * Parameter 'angleOfWall' (Number)

    -> System: Set nx to cos(angleOfWall - 90)

    -> System: Set ny to sin(angleOfWall-90)

    ----+ Ball: Pick instance with UID ballID

    -----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny

    -----> DebugText: Set text to "vn: " & (round(vn × 1000))÷1000 & " nx: " & (round(nx×1000)÷1000) & " ny: " & (round(ny×1000))÷1000

    -----> Ball: Set VelX to Ball.VelX -2×vn×nx

    -----> Ball: Set VelY to Ball.Vely -2×vn×ny

    This is a function I created that I can use to bounce the ball off any angled platform. It works great. Thanks R0J0hound. Now, because I am trying to go for as low CPU usage as humanly possible, I found that you can use that function and that debug text to get the exact values for nx and ny for any slant. Every angle has its own, and they only change if the angle of the slant does. So, If you find those values, you can set up bounces like this:

    + System: Every tick

    + System: For each Ball

    -> Ball: Set VelY to Self.VelY + worldGravity

    -> System: Set newx to Ball.X + Ball.VelX

    -> System: Set newy to Ball.Y + Ball.Vely

    ----+ System: newy > 1038 + (0.464×(newx))

    ----+ System: newx < 360

    -----> System: Set nx to 0.423

    -----> System: Set ny to -0.906

    -----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny

    -----> Ball: Set VelX to Ball.VelX -2×vn×nx

    -----> Ball: Set VelY to Ball.Vely -2×vn×ny

    -----> System: Set newx to Ball.X + Ball.VelX

    -----> System: Set newy to Ball.Y + Ball.Vely

    -----> Ball: Set position to (newx, newy)

    ----+ System: Else

    ----+ System: newy > 1372 - (0.464 × newx)

    ----+ System: newx > 360

    -----> System: Set nx to -0.423

    -----> System: Set ny to -0.906

    -----> System: Set vn to Ball.VelX × nx + Ball.VelY × ny

    -----> Ball: Set VelX to Ball.VelX -2×vn×nx

    -----> Ball: Set VelY to Ball.Vely -2×vn×ny

    -----> System: Set newx to Ball.X + Ball.VelX

    -----> System: Set newy to Ball.Y + Ball.Vely

    -----> Ball: Set position to (newx, newy)

    ----+ System: Else

    ----+ System: newx < 29

    -----> Ball: Set VelX to -Ball.velX

    -----> System: Set newx to Ball.X + Ball.VelX

    -----> System: Set newy to Ball.Y + Ball.Vely

    -----> Ball: Set position to (newx, newy)

    ----+ System: Else

    ----+ System: newx > 691

    -----> Ball: Set VelX to -Ball.velX

    -----> System: Set newx to Ball.X + Ball.VelX

    -----> System: Set newy to Ball.Y + Ball.Vely

    -----> Ball: Set position to (newx, newy)

    ----+ System: Else

    -----> Ball: Set position to (newx, newy)

    That way, the computer doesn't need to calculate ny and nx for slants that you know will be common. You can just find them beforehand and plug them in. That condition is the formula for a slanted platform near the bottom of the game layout. It works great.

    That is essentially the entirety of the mini physics engine I just built. Works great.

  • Ok! I'll try it out today. Thanks.

  • Howdy. In my ever increasingly random experimentation in construct 3, I have hit another problem that probly has a super simple solution, and I'm just to dumb to see it.

    For many reasons, I have a goal to try and do this without using the physics engine behavior. I'm trying to learn how to do it myself. Just cuz.

    Here is my setup. I have a ball Sprite. It has an xvelocity and yvelocity instance variable. I have made a super simple physics script. Every tick the ball is moved in the x direction the value of it's xvelocity and it is moved yvelocity in the y direction as well. This allowed me to add a gravity constant to the yvelocity every tick. Kool. I have a ball that can fall in an arc. Now, I want the ball to bounce off a platform. With me still?

    I can detect when and where I hit this platform.

    My goal is to make a script that can take three inputs (x velocity, y velocity, and the angle of the platform's surface) and output 2 values(the new x velocity and new y velocity). Or in other words, I want a function that can bounce the ball given any flat surface angle. I just want the x and y velocities to change when this function runs.

    I think this is a trig problem, but I can't figure it out. Any ideas?

    Tagged:

  • Well, I'm still stuck. I can't figure out what is wrong. I submit the score, no errors appear, I received all player data, I just can't post any scores. Maybe it is because if you are the top score holder, you must wait to be beaten before you can post another score? IDK. If someone who is experienced with the google play leaderboards could show me a screenshot of their script, or give some insight that would be great!

  • Cool! I found the next snag! Making progress! So, this time the problem is simple. I submit a few scores to my leaderboard about a week ago now, and It showed up the day after. I submit a better score that day, and the old one was replaced the day after. Since that day, I have tried submitting multiple better scores to the leaderboard from three different google play accounts, and none of them have shown up. The only thing I changed was a script that lists a google play error on the screen if one ever occurs. I turned tamper protection off on all leaderboards in case they were the culprit, and have never received an error. Any ideas? I have waited multiple days for these entries to show up, and have checked all my ID's twice.

  • Interesting. It has been a long time since I saw a post here. I'm glad you pointed that out. When I bought this pluggin, I originally thought it was great. At first look, it is. But after some testing, I had to stop using it for those reasons you pointed out. I also noticed that when making new geastures(despite the difficulty) gestures that are declaired in script first are way more likely to be detected than gestures delcared later in the script. After five gestures or so, you can expect not to be able to detect any more.

  • OK! so, once again, I have discovered that I am an idiot. So, basically, I have learned that whenever you use the "submit score" action, It is really just updating any previous scores that you had. So If you submit a score of 10, came back an hour later and submit a score of 12, the score of 10 would disappear, and be replaced with a score of 12. I should have assumed that would be how it worked, but like I said. I'm an idiot. Also, the default tab of the built-in leaderboards display is the "today" tab. You can change it to the week or to of all-time as well, and so that also fixes my problem of wanting scores to disappear after a few days. I also discovered that the google play saved games feature has been suggested to scirra but is currently not supported. So, If anyone knows of an easy way to save players' games to the cloud, let me know. other than that, I think this thread has answered all of my questions. Thanks yall.

    Here are some places that talk about the saved games feature:

    https://www.construct.net/en/forum/construct-2/general-discussion-17/requestgoogle-play-saved-games-93143

    https://construct3.ideas.aha.io/ideas/C3-I-1015

  • Well, I've got the google play services working. YAY! Now, I need to decide how I am going to implement it. Let's say you have a leaderboard that you want every player to only ever have one spot on. Let's suppose this leaderboard displayed what players had the highest rate of winning games. I don't want my player to put up a new entry every game, because they would quickly fill the leaderboard if they are good. And if possible, I only want entries to last a week before diapering unless the player has updated them. Now, I don't know if that is possible with construct 3 and the google play plugin, and if not, thats ok. I have other leaderboards I can make. If anyone has and info on that, let me know

    Also, I'll bring it up again, for anyone not reading all the previous posts, there is a saved games feature in the google dev console when setting up game services, and I would like to know how it works or if any of you have ever tried to use it.

    Sorry for the strange variety of topics in this one thread. I figure at this point, it would be annoying to make a new one, and I have never used this plugin before, and am only just understanding what it can and can't do. Thanks yall.

  • Ah, ok. So the plugin is more like mobile advert or IAP in that they don't work unless already exported to android. Ok. That's fine. I can work with that. My other questions hold. Thanks for everything Nepeo.Perhaps I'll look into linking my preview with a web setup, but for now I think I'm just going to move on with my other issues.

  • The preview is not working, but when exporting to any track on the dev console, even internal, the board works. I haven't found where to put the preview URL in yet, but I've been messing with it a lot. I'll let you know if I figure it out. If one of the construct guys could take a look at the API site again, I think they would find that things have moved around. The instructions they have in the manual are clearly outdated. The tabs and directories are not named the same, and even if you find the right page, I don't think that is where you enter the URL anymore. I'll nudge a moderator in a few days if someone doesn't respond. I don't want to bother them more than I already have.

haypers's avatar

haypers

Member since 10 Mar, 2018

Twitter
haypers has 7 followers

Trophy Case

  • 6-Year Club
  • Entrepreneur Sold something in the asset store
  • Forum Contributor Made 100 posts in the forums
  • Popular Game One of your games has over 1,000 players
  • Regular Visitor Visited Construct.net 7 days in a row
  • RTFM Read the fabulous manual
  • Email Verified

Progress

12/44
How to earn trophies