Accelerometer will not work

B1984B1984 Member, PRO Posts: 91

A really simple movement does not work on my android phone. The phone just loads forever and I have to exit the game. All I want is for the main actor to move left or right when the player tilts their phone.

Help please.

Comments

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772
  • B1984B1984 Member, PRO Posts: 91

    Thanks Jamie, I tried that first but had the same outcome. I'll try it again, maybe I missed something.

  • B1984B1984 Member, PRO Posts: 91

    Yup, still doing it. Here is what I put in:

    When I test it on my android phone the game's load wheel just spins forever but the game never loads.

  • The_Gamesalad_GuruThe_Gamesalad_Guru Member Posts: 9,922

    I don't know if GS has access to the accelerometer on Android devices. I have a game I'm working on that uses it and can test it this weekend on a kindle fire.

  • B1984B1984 Member, PRO Posts: 91

    Alright, well any suggestions for a good move/attack system in the mean time?

    I have a space ship that moves left and right and can fire two types of weapons. I don't want the weapons to fire when the ship moves like I see in a lot of space shooters. But If I have move controls + fire buttons The player has to remove his finger from the move button to hit the fire button which makes them a sitting duck. If the player tries to move and fire at the same time, GS becomes confused and hesitates or misses the command.

    I wanted the game to move left or right through tilt and have two fire buttons, but since that is out, what would be another possibility?

  • freneticzfreneticz SwedenMember, PRO Posts: 774

    i tested one of my new game yesterday on my Nexus 5 that use accelerometer and that work, not good but thats likely a code issue from my side

  • B1984B1984 Member, PRO Posts: 91

    Ok... I don't know what's going on but I removed all the accelerometer stuff and the level still refuses to load.

    It worked fine before the accelerometer stuff, and it works fine on the PC. I generate the apk, sign it and test it... will not load. It just spins and spins forever.

    What the hell man...

  • B1984B1984 Member, PRO Posts: 91

    Can a scene have too much? I have 21 game attributes for this one level but they're all needed as far as I can see. I didn't have any issues until the accelerometer experiment but I've taken all that out.

  • B1984B1984 Member, PRO Posts: 91

    Wow... this is beyond messed up. I've deleted every single feature and asset added for the whole week. I've published it as a separate game I've deleted all the attributes... still nothing. The scene will not load no matter how many times I rebuild the rules...

    This makes no sense at all! So frustrating...

  • B1984B1984 Member, PRO Posts: 91

    So now what do I do?

    I've been sitting at this desk for 12 hours trying to fix what was suppose to take 10 minutes! All I did was try to add an accelerometer control to one little actor, and I've since removed it. But no... even after removing every single aspect of the scene and starting over from a week ago, rebuilding every single rule and actor, it refuses to load the scene no matter what.

    Yesterday, works fine, just needs better control. I'll add that accelerometer feature and see if it's more fun that way.

    Today, 12 hours of hair pulling, eye bleeding torture.

    How can one feature do so much damage? What am I suppose to do? Throw away the whole game and move on?

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Did you add any new images or sounds since it worked last? If so maybe one of the files you imported is corrupt and crashing the project.

  • B1984B1984 Member, PRO Posts: 91

    I designed a new skin for the battleship, but I deleted all the sound and image files in that scene just to see if that was the cause. Nothing... could their ghost be haunting this scene?

  • B1984B1984 Member, PRO Posts: 91

    Good call. I have 25 other scenes so I placed an actor in every scene and then as I tested it I crossed each off my list. The Battleship is the bad guy... but how? I replaced his textures twice but it's all mine and they were made the same as all the others...

  • B1984B1984 Member, PRO Posts: 91

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Sometime files go corrupt, computer ghosts or something. I'd open the file in your image editor, make sure it's RGB, re-save it under a new name, making sure it's a png file and re-import. Keep your fingers crossed! :)

  • B1984B1984 Member, PRO Posts: 91

    I'm on the right path but I no longer think it's the image. I tested this by building the same bs, same image and all, in a new level. Works fine. I deleted the bs and all images from the actual game and it still permaloads.

    The journey continues.

  • jamie_cjamie_c ImagineLabs.rocks Member, PRO Posts: 5,772

    Bug squashing can be a real pain sometimes, good luck with it!

  • B1984B1984 Member, PRO Posts: 91

    Day 2: The Raid

    I've tracked the bug down to a few possibilities... however there are no easy options available except if GS comes with a cache cleaner or something to delete actor's attachment with long dead image/sound files. Anything like that exist?

    Didn't think so...

Sign In or Register to comment.